Skip to content

Can't find variable: Highcharts #1560

Open
@welken

Description

@welken

code:
let aaChartModel = AAChartModel()
.chartType(.areaspline)
.margin([kScaleValue(0), kScaleValue(16), kScaleValue(0), kScaleValue(16)]) // 设置边距(上、右、下、左)
.animationType(.easeFrom)//设置图表渲染动画类型为 EaseFrom
// .yAxisMin(6) // 设置 Y 轴最小值为 0
.dataLabelsEnabled(false)
.legendEnabled(false) // 隐藏图例
.markerRadius(0) // 隐藏数据点
.categories(timeArray)
.series([
AASeriesElement()
.enableMouseTracking(false)
.data(voltageArray)
.lineWidth(2)
.fillColor([
"linearGradient": [
"x1": 0,
"y1": 1,
"x2": 0,
"y2": 0
],
"stops": [
[0, "rgba(255,255,255,0.05)"],
[1, "rgba(38,98,240,0.1)"]
]
])

        ])

    let aaOptions = aaChartModel.aa_toAAOptions()
    
    aaOptions.xAxis?
        .visible(false)

    // 配置 Y 轴
    let aaYAxis = AAYAxis()
        .visible(false)
        .min(5)

    aaOptions.yAxis(aaYAxis)
    
    let aaTooltip = AATooltip()
        .enabled(false) // 隐藏工具提示
    
    aaOptions.tooltip(aaTooltip)

    
    chartView.aa_drawChartWithChartOptions(aaOptions)
   error:

☠️☠️💀☠️☠️WARNING!!!!!!!!!!!!!!!!!!!! FBI WARNING !!!!!!!!!!!!!!!!!!!!WARNING☠️☠️💀☠️☠️


code = 4;
domain = WKErrorDomain;
userInfo = {
NSLocalizedDescription = "A JavaScript exception occurred";
WKJavaScriptExceptionColumnNumber = 43;
WKJavaScriptExceptionLineNumber = 58;
WKJavaScriptExceptionMessage = ReferenceError: Can't find variable: Highcharts;
WKJavaScriptExceptionSourceURL = file:///var/containers/Bundle/Application/DA111DF6-43C9-4F81-90F2-7F408AD2FFC9/SuichebaoiOS.app/Frameworks/AAInfographics.framework/AAJSFiles.bundle/AAChartView.html;
}

==========================================================================================
☠️☠️💀☠️☠️WARNING!!!!!!!!!!!!!!!!!!!! FBI WARNING !!!!!!!!!!!!!!!!!!!!WARNING☠️☠️💀☠️☠️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions