Closed wangxihu closed 4 years ago
重复问题, 关于自定义 tooltip 的 position 的内容, 参见 https://github.com/AAChartModel/AAChartKit/issues/966
你好,我的podfile
之前用的
pod 'AAChartKit'
我在podfile文件中添加了
pod 'AAChartKit', :git => 'https://github.com/AAChartModel/AAChartKit.git'
后, 执行pod install
pod 'AAChartKit'
是4.0.0版本的
pod 'AAChartKit', :git => 'https://github.com/AAChartModel/AAChartKit.git'
是5.0.4版本的
然后我用5.0.4版本的aa_drawChartWithOptions
方法设置Options没有绘制出曲线图表,aa_drawChartWithChartModel
方法是可以绘制出曲线图表的
但是我要用到双y轴坐标需要重新配置Options请问在5.0.4版本中如何做?(我在4.0.0版本已经配置好了双y轴,然后为了调整悬浮窗的位置更新到最新5.0.4版出现了此问题)
//// //浮动提示框的的位置设置
//// aaTooltip.positionerSet(@AAJSFunc(function (labelWidth, labelHeight, point) {
//// let position = {};
//// position["x"] = point.plotX;
//// position["y"] = 20;
//// return position;
//// }));
请教大神!
贴一下你的配置 AAOptions 和调用 aa_drawChartWithOptions
方法的代码看看(不要截图)
另外贴一下你的控制台的关于 AAOptions 的 JSON 格式的打印信息
我这边在终端执行 pod search AAChartKit
命令, 搜索 AAChartKit, 得到的搜索信息如下
-> AAChartKit (5.0.4)
📈📊🚀🚀🚀An elegant modern declarative data visualization chart framework for
iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area,
areaspline, column, bar, pie, scatter, angular gauges, arearange,
areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall
and polar chart types.
极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线
填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十
种的信息图图表,完全满足工作所需.
pod 'AAChartKit', '~> 5.0.4'
- Homepage: https://github.com/AAChartModel/AAChartKit
- Source: https://github.com/AAChartModel/AAChartKit.git
- Versions: 5.0.4, 5.0.3, 5.0.2, 4.0.0, 2.1.6, 2.1.5, 2.1.2, 2.1.0, 2.0.9,
2.0.8, 2.0.7, 2.0.2, 2.0.1, 2.0.0 [trunk repo]
-> AAChartKit-Slim (0.0.1)
An elegant and friendly chart library for iOS developer
pod 'AAChartKit-Slim', '~> 0.0.1'
- Homepage: https://github.com/AAChartModel/AAChartKit-Slim
- Source: https://github.com/AAChartModel/AAChartKit-Slim.git
- Versions: 0.0.1 [trunk repo]
-> AAChartKit-temp (3.0.2.1)
An elegant and friendly chart library for iOS developer, temp fork of
AAChartKit
pod 'AAChartKit-temp', '~> 3.0.2.1'
- Homepage: https://github.com/AAChartModel/AAChartKit
- Source: https://github.com/yacosdad/AAChartKit.git
- Versions: 3.0.2.1 [trunk repo]
按理说你使用
pod 'AAChartKit'
直接更新也是能够得到最新版本(5.0.4) 的 AAChartKit 的.
Analyzing dependencies
Downloading dependencies
Installing AAChartKit 4.0.0 (was 5.0.4)
Generating Pods project
Integrating client project
Pod installation complete! There are 17 dependencies from the Podfile and 16 total pods installed.
是因为我pod没升级还是什么原因吗,我先贴代码吧,其实就是把项目中的aaOptions配置粘出来加个aaYAxisTwo,没改啥东西
- (void)configTheChartView:(AAChartType)chartType {
self.chartView = [[AAChartView alloc]init];
// self.chartView.delegate = self;
self.chartView.scrollEnabled = NO;//禁用 AAChartView 滚动效果
//设置 AAChartView 的背景色是否为透明
self.chartView.isClearBackgroundColor = YES;
self.chartView.frame = CGRectMake(0,25, Screen_Width-24, 240);
[self.chartBgView addSubview:self.chartView];
self.chartModel = AAChartModel.new
// .yAxisReversedSet(YES)
// .xAxisReversedSet(YES)
.zoomTypeSet(AAChartZoomTypeX)
.xAxisLabelsEnabledSet(YES)
.yAxisLineWidthSet(@0)//Y轴轴线线宽为0即是隐藏Y轴轴线
.xAxisVisibleSet(true)
.yAxisLabelsEnabledSet(true)
// .yAxisAllowDecimalsSet(YES)
// .yAxisMaxSet(@1000)
.yAxisGridLineWidthSet(@0.3)//y轴横向分割线宽度为0(即是隐藏分割线)
.xAxisGridLineWidthSet(@0)
.chartTypeSet(chartType)
// .dataLabelsFontColorSet(@"#ffffff")
// .yAxisCrosshairColorSet(@"#ffffff")
.titleSet(@"")
.titleFontColorSet(@"#ffffff")
// .subtitleSet(@"虚拟数据")
// .yAxisTitleSet(@"电压(V)")
// .backgroundColorSet(@"#0C172E")
.yAxisLabelsFontColorSet(@"#ffffff")
.xAxisLabelsFontColorSet(@"#ffffff")
.colorsThemeSet(@[@"#FFCC00",@"#7DD875",@"#FF3B30"])
;
self.chartModel.markerSymbolStyle = AAChartSymbolStyleTypeInnerBlank;
self.chartModel.markerSymbol = AAChartSymbolTypeCircle;
self.chartModel.markerRadius = @0.f;
// self.chartModel.xAxisCrosshairDashStyleType = AALineDashSyleTypeLongDashDotDot;
self.chartModel.xAxisCrosshairWidth = @0.5;
self.chartModel.legendEnabled = YES;
// [self.chartView aa_drawChartWithChartModel:self.chartModel];
//[self configureChartOptionsWithAAChartModel:self.chartModel names:@[]]配置双y轴Options
[self.chartView aa_drawChartWithOptions:[self configureChartOptionsWithAAChartModel:self.chartModel names:@[]]];
}
- (AAOptions *)configureChartOptionsWithAAChartModel:(AAChartModel *)aaChartModel names:(NSArray*)names{
AAChart *aaChart = AAChart.new
.typeSet(aaChartModel.chartType)//绘图类型
.invertedSet(aaChartModel.inverted)//设置是否反转坐标轴,使X轴垂直,Y轴水平。 如果值为 true,则 x 轴默认是 倒置 的。 如果图表中出现条形图系列,则会自动反转
.backgroundColorSet(aaChartModel.backgroundColor)//设置图表的背景色(包含透明度的设置)
.pinchTypeSet(aaChartModel.zoomType)//设置手势缩放方向
.panningSet(true)//设置手势缩放后是否可平移
.polarSet(aaChartModel.polar)
.scrollablePlotAreaSet(aaChartModel.scrollablePlotArea);
AATitle *aaTitle = AATitle.new
.textSet(aaChartModel.title)//标题文本内容
.styleSet(AAStyle.new
.colorSet(aaChartModel.titleFontColor)//Title font color
.fontSizeSet(AAFontSizeFormat(aaChartModel.titleFontSize))//Title font size
.fontWeightSet(aaChartModel.titleFontWeight)//Title font weight
);
if (![aaChartModel.title isEqualToString:@""]) {
aaTitle.styleSet(AAStyle.new
.colorSet(aaChartModel.titleFontColor)//Title font color
.fontSizeSet(AAFontSizeFormat(aaChartModel.titleFontSize))//Title font size
.fontWeightSet(aaChartModel.titleFontWeight)//Title font weight
);
}
AASubtitle *aaSubtitle;
if (![aaChartModel.subtitle isEqualToString:@""]) {
aaSubtitle = AASubtitle.new
.textSet(aaChartModel.subtitle)//副标题内容
.alignSet(aaChartModel.subtitleAlign)//图表副标题文本水平对齐方式。可选的值有 “left”,”center“和“right”。 默认是:center.
.styleSet(AAStyle.new
.colorSet(aaChartModel.subtitleFontColor)//Subtitle font color
.fontSizeSet(AAFontSizeFormat(aaChartModel.subtitleFontSize))//Subtitle font size
.fontWeightSet(aaChartModel.subtitleFontWeight)//Subtitle font weight
);
}
AATooltip *aaTooltip = AATooltip.new
.enabledSet(aaChartModel.tooltipEnabled)//启用浮动提示框
.sharedSet(aaChartModel.tooltipShared)//多组数据共享一个浮动提示框
.crosshairsSet(true)//启用准星线
.valueSuffixSet(aaChartModel.tooltipValueSuffix);//浮动提示框的单位名称后缀
AAPlotOptions *aaPlotOptions = AAPlotOptions.new
.seriesSet(AASeries.new
.stackingSet(aaChartModel.stacking)
);//设置是否百分比堆叠显示图形
if (aaChartModel.animationType != 0) {
aaPlotOptions.series.animation = (AAAnimation.new
.easingSet(aaChartModel.animationType)
.durationSet(aaChartModel.animationDuration)
);
}
[self configureTheStyleOfConnectNodeWithChartModel:aaChartModel plotOptions:aaPlotOptions];
[self configureTheAAPlotOptionsWithPlotOptions:aaPlotOptions chartModel:aaChartModel];
AALegend *aaLegend = AALegend.new
.enabledSet(aaChartModel.legendEnabled);//是否显示 legend
AAOptions *aaOptions = AAOptions.new
.chartSet(aaChart)
.titleSet(aaTitle)
.subtitleSet(aaSubtitle)
.tooltipSet(aaTooltip)
.plotOptionsSet(aaPlotOptions)
.legendSet(aaLegend)
.seriesSet(aaChartModel.series)
.colorsSet(aaChartModel.colorsTheme);//设置颜色主题
[self configureAxisContentAndStyleWithAAOptions:aaOptions AAChartModel:aaChartModel names:names];
return aaOptions;
}
-(void)configureTheStyleOfConnectNodeWithChartModel:(AAChartModel *)aaChartModel
plotOptions:(AAPlotOptions *)aaPlotOptions {
AAChartType aaChartType = aaChartModel.chartType;
//数据点标记相关配置,只有折线图、曲线图、折线区域填充图、曲线区域填充图、散点图才有数据点标记
if ( aaChartType == AAChartTypeArea
|| aaChartType == AAChartTypeAreaspline
|| aaChartType == AAChartTypeLine
|| aaChartType == AAChartTypeSpline
|| aaChartType == AAChartTypeScatter
|| aaChartType == AAChartTypeArearange
|| aaChartType == AAChartTypeAreasplinerange
|| aaChartType == AAChartTypePolygon
) {
AAMarker *aaMarker = AAMarker.new
.radiusSet(aaChartModel.markerRadius)//曲线连接点半径,默认是4
.symbolSet(aaChartModel.markerSymbol);//曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
if (aaChartModel.markerSymbolStyle == AAChartSymbolStyleTypeInnerBlank) {
aaMarker.fillColorSet(@"#ffffff")//点的填充色(用来设置折线连接点的填充色)
.lineWidthSet(@(0.4 * aaChartModel.markerRadius.floatValue))//外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
.lineColorSet(@"");//外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
} else if (aaChartModel.markerSymbolStyle == AAChartSymbolStyleTypeBorderBlank) {
aaMarker.lineWidthSet(@2)
.lineColorSet(aaChartModel.backgroundColor);
}
AASeries *aaSeries = aaPlotOptions.series;
aaSeries.connectNulls = aaChartModel.connectNulls;
aaSeries.marker = aaMarker;
}
}
-(void)configureTheAAPlotOptionsWithPlotOptions:(AAPlotOptions *)aaPlotOptions
chartModel:(AAChartModel *)aaChartModel {
AAChartType chartType = aaChartModel.chartType;
AADataLabels *aaDataLabels = AADataLabels.new
.enabledSet(aaChartModel.dataLabelsEnabled);
if (aaChartModel.dataLabelsEnabled == true) {
aaDataLabels
.styleSet(AAStyle.new
.colorSet(aaChartModel.dataLabelsFontColor)
.fontSizeSet(AAFontSizeFormat(aaChartModel.dataLabelsFontSize))
.fontWeightSet(aaChartModel.dataLabelsFontWeight)
);
}
if (chartType == AAChartTypeColumn) {
AAColumn *aaColumn = (AAColumn.new
.borderWidthSet(@0)
.borderRadiusSet(aaChartModel.borderRadius)
);
if (aaChartModel.polar == true) {
aaColumn.pointPaddingSet(@0)
.groupPaddingSet(@0.005);
}
aaPlotOptions.columnSet(aaColumn);
} else if (chartType == AAChartTypeBar) {
AABar *aaBar = (AABar.new
.borderWidthSet(@0)
.borderRadiusSet(aaChartModel.borderRadius)
);
if (aaChartModel.polar == true) {
aaBar.pointPaddingSet(@0)
.groupPaddingSet(@0.005);
}
aaPlotOptions.barSet(aaBar);
} else if (chartType == AAChartTypePie) {
AAPie *aaPie = AAPie.new
.allowPointSelectSet(true)
.cursorSet(@"pointer")
.showInLegendSet(true);
if (aaChartModel.dataLabelsEnabled == true) {
aaDataLabels.formatSet(@"<b>{point.name}</b>: {point.percentage:.1f} %");
}
aaPlotOptions.pieSet(aaPie);
} else if (chartType == AAChartTypeColumnrange) {
NSMutableDictionary *columnRangeDic = [[NSMutableDictionary alloc]init];
[columnRangeDic setValue:aaChartModel.borderRadius forKey:@"borderRadius"];//The color of the border surrounding each column or bar
[columnRangeDic setValue:@0 forKey:@"borderWidth"];//The corner radius of the border surrounding each column or bar. default:0.
aaPlotOptions.columnrangeSet(columnRangeDic);
}
aaPlotOptions.series.dataLabelsSet(aaDataLabels);
}
-(void)configureAxisContentAndStyleWithAAOptions:(AAOptions *)aaOptions
AAChartModel:(AAChartModel *)aaChartModel names:(NSArray*)names{
AAChartType aaChartType = aaChartModel.chartType;
if ( aaChartType == AAChartTypeColumn
|| aaChartType == AAChartTypeBar
|| aaChartType == AAChartTypeArea
|| aaChartType == AAChartTypeAreaspline
|| aaChartType == AAChartTypeLine
|| aaChartType == AAChartTypeSpline
|| aaChartType == AAChartTypeScatter
|| aaChartType == AAChartTypeBubble
|| aaChartType == AAChartTypeColumnrange
|| aaChartType == AAChartTypeArearange
|| aaChartType == AAChartTypeAreasplinerange
|| aaChartType == AAChartTypeBoxplot
|| aaChartType == AAChartTypeWaterfall
|| aaChartType == AAChartTypePolygon) {
AAXAxis *aaXAxis = AAXAxis.new
.labelsSet(AALabels.new
.enabledSet(aaChartModel.xAxisLabelsEnabled)//设置 x 轴是否显示文字
.styleSet(AAStyle.new
.colorSet(aaChartModel.xAxisLabelsFontColor)//xAxis Label font color
.fontSizeSet(AAFontSizeFormat(aaChartModel.xAxisLabelsFontSize))//xAxis Label font size
.fontWeightSet(aaChartModel.xAxisLabelsFontWeight)//xAxis Label font weight
)
)
.reversedSet(aaChartModel.xAxisReversed)
.gridLineWidthSet(aaChartModel.xAxisGridLineWidth)//x轴网格线宽度
.categoriesSet(aaChartModel.categories)
.visibleSet(aaChartModel.xAxisVisible)//x轴是否可见
.tickIntervalSet(aaChartModel.xAxisTickInterval);//x轴坐标点间隔数
if ([aaChartModel.xAxisCrosshairWidth doubleValue] > 0) {
aaXAxis.crosshairSet(AACrosshair.new
.widthSet(aaChartModel.xAxisCrosshairWidth)
.colorSet(aaChartModel.xAxisCrosshairColor)
.dashStyleSet(aaChartModel.xAxisCrosshairDashStyleType)
);
}
AAYAxis *aaYAxis = AAYAxis.new
.labelsSet(AALabels.new
.enabledSet(aaChartModel.yAxisLabelsEnabled)//设置 y 轴是否显示数字
.styleSet(AAStyle.new
.colorSet(aaChartModel.yAxisLabelsFontColor)//yAxis Label font color
.fontSizeSet(AAFontSizeFormat(aaChartModel.yAxisLabelsFontSize))//yAxis Label font size
.fontWeightSet(aaChartModel.yAxisLabelsFontWeight)//yAxis Label font weight
)
.formatSet(@"{value:.,0f}")//让y轴的值完整显示 而不是100000显示为100k
)
.minSet(aaChartModel.yAxisMin)//设置 y 轴最小值,最小值等于零就不能显示负值了
.maxSet(aaChartModel.yAxisMax)//y轴最大值
.tickPositionsSet(aaChartModel.yAxisTickPositions)//自定义Y轴坐标
.allowDecimalsSet(aaChartModel.yAxisAllowDecimals)//是否允许显示小数
.plotLinesSet(aaChartModel.yAxisPlotLines) //标示线设置
.reversedSet(aaChartModel.yAxisReversed)
.gridLineWidthSet(aaChartModel.yAxisGridLineWidth)//y轴网格线宽度
.titleSet(AAAxisTitle.new
.textSet(aaChartModel.yAxisTitle))//y 轴标题
.lineWidthSet(aaChartModel.yAxisLineWidth)//设置 y轴轴线的宽度,为0即是隐藏 y轴轴线
.visibleSet(aaChartModel.yAxisVisible)
.tickIntervalSet(aaChartModel.yAxisTickInterval)
.oppositeSet(false);
AAYAxis *aaYAxisTwo = AAYAxis.new
.oppositeSet(true)
.labelsSet(AALabels.new
.enabledSet(aaChartModel.yAxisLabelsEnabled)//设置 y 轴是否显示数字
.styleSet(AAStyle.new
.colorSet(aaChartModel.yAxisLabelsFontColor)//yAxis Label font color
.fontSizeSet(AAFontSizeFormat(aaChartModel.yAxisLabelsFontSize))//yAxis Label font size
.fontWeightSet(aaChartModel.yAxisLabelsFontWeight)//yAxis Label font weight
)
.formatSet(@"{value:.,0f}")//让y轴的值完整显示 而不是100000显示为100k
)
.minSet(aaChartModel.yAxisMin)//设置 y 轴最小值,最小值等于零就不能显示负值了
.maxSet(aaChartModel.yAxisMax)//y轴最大值
// .tickPositionsSet(aaChartModel.yAxisTickPositions)//自定义Y轴坐标
// .tickPositionsSet(@[@(100), @(200)])//自定义Y轴坐标
.allowDecimalsSet(aaChartModel.yAxisAllowDecimals)//是否允许显示小数
.plotLinesSet(aaChartModel.yAxisPlotLines) //标示线设置
.reversedSet(aaChartModel.yAxisReversed)
.gridLineWidthSet(aaChartModel.yAxisGridLineWidth)//y轴网格线宽度
// .titleSet(AAAxisTitle.new.textSet(aaChartModel.yAxisTitle))//y 轴标题
.lineWidthSet(aaChartModel.yAxisLineWidth)//设置 y轴轴线的宽度,为0即是隐藏 y轴轴线
.visibleSet(aaChartModel.yAxisVisible)
.tickIntervalSet(aaChartModel.yAxisTickInterval);
if ([names containsObject:@"合相功率因数"]) {
aaYAxisTwo.titleSet(AAAxisTitle.new.textSet(@"合相功率因数")
.styleSet(AAStyle.new
.colorSet(@"#ffffff")));//y 轴标题
}else{
aaYAxisTwo.titleSet(AAAxisTitle.new.textSet(aaChartModel.yAxisTitle));//y 轴标题
}
if (aaChartModel.yAxisCrosshairWidth > 0) {
aaYAxis.crosshairSet(AACrosshair.new
.widthSet(aaChartModel.yAxisCrosshairWidth)
.colorSet(aaChartModel.yAxisCrosshairColor)
.dashStyleSet(aaChartModel.yAxisCrosshairDashStyleType)
);
}
aaOptions.xAxis = aaXAxis;
aaOptions.yAxisSet((id)@[aaYAxis,aaYAxisTwo]);
}
}
你可以先把你的代码复制粘贴到 AAChartKit 的 demo 中测试一下看看,能不能得到你配置的图表
2020-09-21 17:28:38.160160+0800 Witelec[66253:10502917] ----------- console log AAOptions JSON information of AAChartView -----------:
{
"credits" : {
"enabled" : false
},
"touchEventEnabled" : false,
"chart" : {
"polar" : false,
"backgroundColor" : "rgba(0,0,0,0)",
"type" : "spline",
"inverted" : false,
"pinchType" : "x",
"panning" : true
},
"tooltip" : {
"useHTML" : false,
"followTouchMove" : true,
"shadow" : true,
"crosshairs" : true,
"shared" : true,
"enabled" : true,
"animation" : true
},
"xAxis" : {
"labels" : {
"style" : {
"fontSize" : "(null)px",
"color" : "#ffffff"
},
"useHTML" : false,
"enabled" : true
},
"reversed" : false,
"startOnTick" : false,
"opposite" : false,
"crosshair" : {
"width" : 0.5
},
"endOnTick" : false,
"gridLineWidth" : 0,
"tickmarkPlacement" : "on",
"tickInterval" : 81,
"visible" : true,
"categories" : [
"2020-09-21 00:04:38",
"2020-09-21 00:11:03",
"2020-09-21 00:16:28",
"2020-09-21 00:22:23",
"2020-09-21 00:28:37",
"2020-09-21 00:34:32",
"2020-09-21 00:40:30",
"2020-09-21 00:46:26",
"2020-09-21 00:52:39",
"2020-09-21 00:58:35",
"2020-09-21 01:10:11",
"2020-09-21 01:16:26",
"2020-09-21 01:22:21",
"2020-09-21 01:28:16",
"2020-09-21 01:34:11",
"2020-09-21 01:46:23",
"2020-09-21 01:52:18",
"2020-09-21 01:58:14",
"2020-09-21 02:04:27",
"2020-09-21 02:10:22",
"2020-09-21 02:16:17",
"2020-09-21 02:22:12",
"2020-09-21 02:28:27",
"2020-09-21 02:34:23",
"2020-09-21 02:40:22",
"2020-09-21 02:46:17",
"2020-09-21 02:52:32",
"2020-09-21 03:04:21",
"2020-09-21 03:16:30",
"2020-09-21 03:22:25",
"2020-09-21 03:28:20",
"2020-09-21 03:34:15",
"2020-09-21 03:40:12",
"2020-09-21 03:46:27",
"2020-09-21 03:52:22",
"2020-09-21 03:58:18",
"2020-09-21 04:04:33",
"2020-09-21 04:10:28",
"2020-09-21 04:16:24",
"2020-09-21 04:22:49",
"2020-09-21 04:28:33",
"2020-09-21 04:34:28",
"2020-09-21 04:40:26",
"2020-09-21 04:46:21",
"2020-09-21 04:52:15",
"2020-09-21 04:58:30",
"2020-09-21 05:04:24",
"2020-09-21 05:10:20",
"2020-09-21 05:16:34",
"2020-09-21 05:22:29",
"2020-09-21 05:28:25",
"2020-09-21 05:34:51",
"2020-09-21 05:40:20",
"2020-09-21 05:46:34",
"2020-09-21 05:52:30",
"2020-09-21 05:58:24",
"2020-09-21 06:04:19",
"2020-09-21 06:10:33",
"2020-09-21 06:16:28",
"2020-09-21 06:22:23",
"2020-09-21 06:28:37",
"2020-09-21 06:34:32",
"2020-09-21 06:40:30",
"2020-09-21 06:46:25",
"2020-09-21 06:58:35",
"2020-09-21 07:04:32",
"2020-09-21 07:10:27",
"2020-09-21 07:16:22",
"2020-09-21 07:22:37",
"2020-09-21 07:28:32",
"2020-09-21 07:34:27",
"2020-09-21 07:40:25",
"2020-09-21 07:46:38",
"2020-09-21 07:52:33",
"2020-09-21 07:58:29",
"2020-09-21 08:04:23",
"2020-09-21 08:10:38",
"2020-09-21 08:16:33",
"2020-09-21 08:22:27",
"2020-09-21 08:28:23",
"2020-09-21 08:34:38",
"2020-09-21 08:46:32",
"2020-09-21 08:58:41",
"2020-09-21 09:04:37",
"2020-09-21 09:10:32",
"2020-09-21 09:22:41",
"2020-09-21 09:28:36",
"2020-09-21 09:34:31",
"2020-09-21 09:46:44",
"2020-09-21 09:52:38",
"2020-09-21 09:58:33",
"2020-09-21 10:04:30",
"2020-09-21 10:10:45",
"2020-09-21 10:16:40",
"2020-09-21 10:22:35",
"2020-09-21 10:28:30",
"2020-09-21 10:34:44",
"2020-09-21 10:40:43",
"2020-09-21 10:46:37",
"2020-09-21 10:52:32",
"2020-09-21 10:58:46",
"2020-09-21 11:10:36",
"2020-09-21 11:16:32",
"2020-09-21 11:22:45",
"2020-09-21 11:28:40",
"2020-09-21 11:34:37",
"2020-09-21 11:40:36",
"2020-09-21 11:46:31",
"2020-09-21 11:52:46",
"2020-09-21 11:58:40",
"2020-09-21 12:04:36",
"2020-09-21 12:10:50",
"2020-09-21 12:16:45",
"2020-09-21 12:22:40",
"2020-09-21 12:28:35",
"2020-09-21 12:34:49",
"2020-09-21 12:40:47",
"2020-09-21 12:46:42",
"2020-09-21 12:52:36",
"2020-09-21 12:58:32",
"2020-09-21 13:04:47",
"2020-09-21 13:10:43",
"2020-09-21 13:16:38",
"2020-09-21 13:28:47",
"2020-09-21 13:34:42",
"2020-09-21 13:40:41",
"2020-09-21 13:46:35",
"2020-09-21 13:52:49",
"2020-09-21 13:58:45",
"2020-09-21 14:04:39",
"2020-09-21 14:10:34",
"2020-09-21 14:16:49",
"2020-09-21 14:22:44",
"2020-09-21 14:28:39",
"2020-09-21 14:34:55",
"2020-09-21 14:40:53",
"2020-09-21 14:46:49",
"2020-09-21 14:52:45",
"2020-09-21 14:58:39",
"2020-09-21 15:04:53",
"2020-09-21 15:10:48",
"2020-09-21 15:16:43",
"2020-09-21 15:22:38",
"2020-09-21 15:28:52",
"2020-09-21 15:34:47",
"2020-09-21 15:40:45",
"2020-09-21 15:46:40",
"2020-09-21 15:52:54",
"2020-09-21 15:58:49",
"2020-09-21 16:04:46",
"2020-09-21 16:10:41",
"2020-09-21 16:16:56",
"2020-09-21 16:22:52",
"2020-09-21 16:28:46",
"2020-09-21 16:34:42",
"2020-09-21 16:40:59",
"2020-09-21 16:46:53",
"2020-09-21 16:52:48",
"2020-09-21 16:58:44",
"2020-09-21 17:04:57",
"2020-09-21 17:10:53",
"2020-09-21 17:16:48",
"2020-09-21 17:22:42"
]
},
"plotOptions" : {
"series" : {
"connectNulls" : false,
"stacking" : "",
"marker" : {
"radius" : 0,
"symbol" : "circle",
"enabled" : true,
"lineColor" : "",
"fillColor" : "#ffffff",
"lineWidth" : 0
},
"dataLabels" : {
"softConnector" : true,
"useHTML" : false,
"allowOverlap" : false,
"crop" : false,
"enabled" : false,
"inside" : false
}
}
},
"series" : [
{
"lineWidth" : 0.5,
"tooltip" : {
"useHTML" : false,
"followTouchMove" : true,
"shadow" : true,
"crosshairs" : true,
"shared" : true,
"enabled" : true,
"valueSuffix" : "A",
"animation" : true
},
"name" : "A相电流",
"data" : [
4.1200000000000001,
0.54000000000000004,
0.54000000000000004,
3.96,
0.53000000000000003,
0.53000000000000003,
0.54000000000000004,
3.9100000000000001,
0.53000000000000003,
0.53000000000000003,
4.1100000000000003,
0.54000000000000004,
0.54000000000000004,
4.0099999999999998,
0.54000000000000004,
0.54000000000000004,
3.9399999999999999,
0.54000000000000004,
0.53000000000000003,
0.54000000000000004,
0.53000000000000003,
4.0599999999999996,
0.54000000000000004,
0.53000000000000003,
0.53000000000000003,
4.0499999999999998,
0.54000000000000004,
0.54000000000000004,
4.0599999999999996,
0.54000000000000004,
0.54000000000000004,
0.53000000000000003,
0.54000000000000004,
0.54000000000000004,
3.8300000000000001,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
4.0300000000000002,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.52000000000000002,
3.9500000000000002,
0.62,
0.60999999999999999,
0.60999999999999999,
0.62,
0.76000000000000001,
4.1299999999999999,
6.8600000000000003,
3.5800000000000001,
3.5800000000000001,
3.71,
0.92000000000000004,
0.93000000000000005,
0.93000000000000005,
4.5199999999999996,
0.82999999999999996,
4.4299999999999997,
0.82999999999999996,
4.2999999999999998,
0.82999999999999996,
4.3499999999999996,
0.82999999999999996,
4.4500000000000002,
0.82999999999999996,
0.81000000000000005,
0.75,
0.75,
0.73999999999999999,
0.73999999999999999,
0.73999999999999999,
0.73999999999999999,
0.73999999999999999,
3.6899999999999999,
3.6499999999999999,
3.6499999999999999,
3.6499999999999999,
11.67,
11.65,
11.59,
11.640000000000001,
11.66,
11.630000000000001,
0.81000000000000005,
0.78000000000000003,
0.77000000000000002,
8.8200000000000003,
8.8000000000000007,
0.75,
0.75,
0.75,
0.73999999999999999,
0.71999999999999997,
0.56000000000000005,
0.56000000000000005,
0.68000000000000005,
3.7000000000000002,
4.5599999999999996,
4.6399999999999997,
0.67000000000000004,
0.67000000000000004,
0.68000000000000005,
0.67000000000000004,
0.68000000000000005,
3.6600000000000001,
4.0999999999999996,
3.8300000000000001,
3.6699999999999999,
3.4700000000000002,
3.4399999999999999,
0.56000000000000005,
0.54000000000000004,
0.55000000000000004,
0.56000000000000005,
0.55000000000000004,
4.1100000000000003,
0.55000000000000004,
0.55000000000000004,
0.55000000000000004,
4.25,
0.53000000000000003,
4.0800000000000001,
4.1100000000000003,
0.54000000000000004,
0.53000000000000003,
0.55000000000000004,
0.56000000000000005,
0.55000000000000004,
0.55000000000000004,
0.54000000000000004,
0.54000000000000004,
0.54000000000000004,
0.54000000000000004,
7.6200000000000001,
0.54000000000000004,
0.54000000000000004,
0.53000000000000003,
0.52000000000000002,
0.53000000000000003,
0.51000000000000001,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.52000000000000002,
0.53000000000000003,
4.1200000000000001,
0.53000000000000003,
0.52000000000000002,
4.1500000000000004,
4.1900000000000004,
4.21,
0.53000000000000003,
0.57999999999999996,
4.1600000000000001
],
"showInLegend" : true,
"allowPointSelect" : false,
"visible" : true,
"yAxis" : 0
},
{
"lineWidth" : 0.5,
"tooltip" : {
"useHTML" : false,
"followTouchMove" : true,
"shadow" : true,
"crosshairs" : true,
"shared" : true,
"enabled" : true,
"valueSuffix" : "A",
"animation" : true
},
"name" : "B相电流",
"data" : [
0.76000000000000001,
0.75,
0.76000000000000001,
0.75,
0.75,
0.75,
0.75,
0.77000000000000002,
0.75,
0.75,
0.68999999999999995,
0.68999999999999995,
0.68000000000000005,
0.68999999999999995,
0.68000000000000005,
0.79000000000000004,
0.79000000000000004,
0.78000000000000003,
0.77000000000000002,
0.77000000000000002,
0.77000000000000002,
0.77000000000000002,
0.77000000000000002,
0.77000000000000002,
0.76000000000000001,
0.76000000000000001,
0.76000000000000001,
0.76000000000000001,
0.76000000000000001,
0.78000000000000003,
0.75,
0.75,
0.76000000000000001,
0.76000000000000001,
0.76000000000000001,
0.75,
0.75,
0.75,
0.75,
0.75,
0.75,
0.75,
0.73999999999999999,
0.75,
0.75,
0.85999999999999999,
1.0900000000000001,
8.0099999999999998,
12.279999999999999,
12.23,
14.43,
22.600000000000001,
22.579999999999998,
12.130000000000001,
6.0800000000000001,
13.94,
11.66,
11.470000000000001,
5.7599999999999998,
5.6500000000000004,
5.5,
5.4699999999999998,
5.4199999999999999,
5.4100000000000001,
8.2400000000000002,
1,
1.01,
1.02,
1.03,
1.03,
0.90000000000000002,
4.8399999999999999,
0.79000000000000004,
5.8099999999999996,
0.75,
0.71999999999999997,
0.72999999999999998,
0.72999999999999998,
0.70999999999999996,
0.71999999999999997,
0.72999999999999998,
0.72999999999999998,
0.71999999999999997,
0.71999999999999997,
0.71999999999999997,
0.65000000000000002,
0.65000000000000002,
0.63,
0.64000000000000001,
0.76000000000000001,
3.0099999999999998,
2.9500000000000002,
2.96,
2.98,
2.96,
0.91000000000000003,
9.0700000000000003,
19.41,
19.280000000000001,
2.9900000000000002,
9.3599999999999994,
1.0700000000000001,
3.3900000000000001,
1.21,
1.21,
1.03,
1.02,
1,
1.01,
1.01,
1.01,
1.01,
4.2300000000000004,
4.7300000000000004,
4.4100000000000001,
4.25,
3.9100000000000001,
3.9199999999999999,
0.71999999999999997,
0.71999999999999997,
0.66000000000000003,
0.65000000000000002,
0.64000000000000001,
4.3799999999999999,
0.64000000000000001,
0.64000000000000001,
0.64000000000000001,
4.5899999999999999,
0.55000000000000004,
3.8599999999999999,
3.8599999999999999,
0.54000000000000004,
0.68999999999999995,
0.53000000000000003,
0.53000000000000003,
0.68000000000000005,
0.67000000000000004,
0.66000000000000003,
0.65000000000000002,
0.62,
0.62,
8.0800000000000001,
0.63,
0.60999999999999999,
6.8099999999999996,
0.60999999999999999,
0.59999999999999998,
0.60999999999999999,
0.59999999999999998,
0.58999999999999997,
0.58999999999999997,
0.58999999999999997,
0.59999999999999998,
0.59999999999999998,
4.4100000000000001,
0.59999999999999998,
0.60999999999999999,
4.4000000000000004,
4.4299999999999997,
4.4299999999999997,
6.1900000000000004,
15.6,
17.510000000000002
],
"showInLegend" : true,
"allowPointSelect" : false,
"visible" : true,
"yAxis" : 0
},
{
"lineWidth" : 0.5,
"tooltip" : {
"useHTML" : false,
"followTouchMove" : true,
"shadow" : true,
"crosshairs" : true,
"shared" : true,
"enabled" : true,
"valueSuffix" : "A",
"animation" : true
},
"name" : "C相电流",
"data" : [
5.9299999999999997,
5.4699999999999998,
5.9100000000000001,
5.9299999999999997,
5.9100000000000001,
5.9199999999999999,
5.4699999999999998,
5.9299999999999997,
5.9199999999999999,
5.9199999999999999,
5.4900000000000002,
5.9199999999999999,
5.9199999999999999,
5.9299999999999997,
5.9100000000000001,
5.9199999999999999,
5.9400000000000004,
5.4900000000000002,
5.9299999999999997,
5.4699999999999998,
5.9400000000000004,
5.9500000000000002,
5.5,
5.9500000000000002,
5.9400000000000004,
5.96,
5.9500000000000002,
5.9500000000000002,
5.9699999999999998,
5.96,
5.46,
5.9500000000000002,
5.96,
5.5199999999999996,
5.9699999999999998,
5.96,
5.96,
5.96,
5.4900000000000002,
5.9500000000000002,
5.9500000000000002,
5.5199999999999996,
5.9500000000000002,
5.9699999999999998,
5.5199999999999996,
5.9500000000000002,
5.9500000000000002,
5.9900000000000002,
6,
5.5499999999999998,
2.8100000000000001,
6.0599999999999996,
5.6100000000000003,
5.9100000000000001,
1.3799999999999999,
0.90000000000000002,
6,
5.5300000000000002,
5.9500000000000002,
5.9500000000000002,
5.9199999999999999,
5.9299999999999997,
5.46,
5.9199999999999999,
5.4699999999999998,
5.8899999999999997,
4.2599999999999998,
5.8799999999999999,
5.8700000000000001,
5.4199999999999999,
5.8499999999999996,
5.8700000000000001,
5.3799999999999999,
5.8300000000000001,
5.8099999999999996,
5.79,
2.3700000000000001,
2.5299999999999998,
5.7599999999999998,
5.7400000000000002,
2,
2.29,
5.8399999999999999,
5.8399999999999999,
5.8399999999999999,
0.89000000000000001,
1.28,
5.8300000000000001,
5.7000000000000002,
5.71,
5.2800000000000002,
5.7000000000000002,
1.97,
8.1999999999999993,
1.3300000000000001,
2.9900000000000002,
5.5899999999999999,
3.5099999999999998,
3.0600000000000001,
2.3300000000000001,
2.29,
8.0999999999999996,
7.9199999999999999,
7.9299999999999997,
7.9299999999999997,
6.6699999999999999,
5.7999999999999998,
5.3700000000000001,
4.9100000000000001,
5.3799999999999999,
5.3300000000000001,
5.3499999999999996,
4.1900000000000004,
10.880000000000001,
3.7400000000000002,
14.1,
4.5999999999999996,
3.96,
2.8199999999999998,
8.8300000000000001,
8.5800000000000001,
5.2000000000000002,
5.2000000000000002,
4.6200000000000001,
3,
2.96,
2.8300000000000001,
3.7599999999999998,
8.6400000000000006,
4.6399999999999997,
4.5899999999999999,
1.3200000000000001,
8.6699999999999999,
5.1500000000000004,
4.6500000000000004,
5.1600000000000001,
5.1500000000000004,
4.6699999999999999,
5.1500000000000004,
5.1500000000000004,
5.5300000000000002,
5.6699999999999999,
6.5700000000000003,
5.5300000000000002,
5.5199999999999996,
2.7599999999999998,
5.3799999999999999,
8.5600000000000005,
4.9199999999999999,
5.4100000000000001,
5.4299999999999997,
5.4199999999999999,
3.3500000000000001,
4.8899999999999997,
4.6200000000000001,
2.8599999999999999,
8.8200000000000003,
4.6299999999999999,
4.6600000000000001,
4.6699999999999999,
5.5099999999999998,
2.4399999999999999,
10.109999999999999
],
"showInLegend" : true,
"allowPointSelect" : false,
"visible" : true,
"yAxis" : 0
}
],
"title" : {
"style" : {
"fontSize" : "(null)px",
"color" : "#ffffff"
},
"useHTML" : false,
"text" : ""
},
"colors" : [
"#FFCC00",
"#7DD875",
"#FF3B30"
],
"yAxis" : [
{
"labels" : {
"style" : {
"fontSize" : "(null)px",
"color" : "#ffffff"
},
"useHTML" : false,
"enabled" : true,
"format" : "{value:.,0f}"
},
"reversed" : false,
"title" : {
"text" : ""
},
"startOnTick" : false,
"max" : 45.200000762939453,
"allowDecimals" : true,
"opposite" : false,
"endOnTick" : false,
"gridLineWidth" : 0.29999999999999999,
"visible" : true,
"lineWidth" : 0
},
{
"labels" : {
"style" : {
"fontSize" : "(null)px",
"color" : "#ffffff"
},
"useHTML" : false,
"enabled" : true,
"format" : "{value:.,0f}"
},
"reversed" : false,
"title" : {
"text" : ""
},
"startOnTick" : false,
"max" : 45.200000762939453,
"allowDecimals" : true,
"opposite" : true,
"endOnTick" : false,
"gridLineWidth" : 0.29999999999999999,
"visible" : true,
"lineWidth" : 0
}
],
"legend" : {
"enabled" : true,
"floating" : false
}
}
另外贴一下你的控制台的关于 AAOptions 的 JSON 格式的打印信息
贴一下你的 console 控制台的JSON 打印信息吧, 我大概已经猜到你的代码问题出在哪里了
是因为
12.130000000000001,
6.0800000000000001,
13.94,
11.66,
这种数据的问题吗
上面的那个 json 信息是你调用 aa_drawChartWithOptions
打印出来的信息吧? 你调用 aa_drawChartWithChartModel
然后能够正常绘制的打印信息呢?
是因为 12.130000000000001, 6.0800000000000001, 13.94, 11.66, 这种数据的问题吗
不是,不是这个问题,问题出在了你 AAChartModel 转 AAOptions 的那部分代码. 说实话,你的这部分转换代码直接复制粘贴自 AAChartKit 中的 AAOptionsConstructor
实在是不太可取
2020-09-21 17:37:58.608983+0800 Witelec[67691:10529499] ----------- console log AAOptions JSON information of AAChartView -----------:
{
"credits" : {
"enabled" : false
},
"touchEventEnabled" : false,
"chart" : {
"polar" : false,
"backgroundColor" : "rgba(0,0,0,0)",
"type" : "spline",
"inverted" : false,
"pinchType" : "x",
"panning" : true
},
"tooltip" : {
"useHTML" : false,
"followTouchMove" : true,
"shadow" : true,
"crosshairs" : true,
"shared" : true,
"enabled" : true,
"animation" : true
},
"xAxis" : {
"labels" : {
"style" : {
"color" : "#ffffff"
},
"useHTML" : false,
"enabled" : true
},
"reversed" : false,
"startOnTick" : false,
"opposite" : false,
"crosshair" : {
"width" : 0.5
},
"endOnTick" : false,
"gridLineWidth" : 0,
"tickmarkPlacement" : "on",
"tickInterval" : 82,
"visible" : true,
"categories" : [
"2020-09-21 00:04:38",
"2020-09-21 00:11:03",
"2020-09-21 00:16:28",
"2020-09-21 00:22:23",
"2020-09-21 00:28:37",
"2020-09-21 00:34:32",
"2020-09-21 00:40:30",
"2020-09-21 00:46:26",
"2020-09-21 00:52:39",
"2020-09-21 00:58:35",
"2020-09-21 01:10:11",
"2020-09-21 01:16:26",
"2020-09-21 01:22:21",
"2020-09-21 01:28:16",
"2020-09-21 01:34:11",
"2020-09-21 01:46:23",
"2020-09-21 01:52:18",
"2020-09-21 01:58:14",
"2020-09-21 02:04:27",
"2020-09-21 02:10:22",
"2020-09-21 02:16:17",
"2020-09-21 02:22:12",
"2020-09-21 02:28:27",
"2020-09-21 02:34:23",
"2020-09-21 02:40:22",
"2020-09-21 02:46:17",
"2020-09-21 02:52:32",
"2020-09-21 03:04:21",
"2020-09-21 03:16:30",
"2020-09-21 03:22:25",
"2020-09-21 03:28:20",
"2020-09-21 03:34:15",
"2020-09-21 03:40:12",
"2020-09-21 03:46:27",
"2020-09-21 03:52:22",
"2020-09-21 03:58:18",
"2020-09-21 04:04:33",
"2020-09-21 04:10:28",
"2020-09-21 04:16:24",
"2020-09-21 04:22:49",
"2020-09-21 04:28:33",
"2020-09-21 04:34:28",
"2020-09-21 04:40:26",
"2020-09-21 04:46:21",
"2020-09-21 04:52:15",
"2020-09-21 04:58:30",
"2020-09-21 05:04:24",
"2020-09-21 05:10:20",
"2020-09-21 05:16:34",
"2020-09-21 05:22:29",
"2020-09-21 05:28:25",
"2020-09-21 05:34:51",
"2020-09-21 05:40:20",
"2020-09-21 05:46:34",
"2020-09-21 05:52:30",
"2020-09-21 05:58:24",
"2020-09-21 06:04:19",
"2020-09-21 06:10:33",
"2020-09-21 06:16:28",
"2020-09-21 06:22:23",
"2020-09-21 06:28:37",
"2020-09-21 06:34:32",
"2020-09-21 06:40:30",
"2020-09-21 06:46:25",
"2020-09-21 06:58:35",
"2020-09-21 07:04:32",
"2020-09-21 07:10:27",
"2020-09-21 07:16:22",
"2020-09-21 07:22:37",
"2020-09-21 07:28:32",
"2020-09-21 07:34:27",
"2020-09-21 07:40:25",
"2020-09-21 07:46:38",
"2020-09-21 07:52:33",
"2020-09-21 07:58:29",
"2020-09-21 08:04:23",
"2020-09-21 08:10:38",
"2020-09-21 08:16:33",
"2020-09-21 08:22:27",
"2020-09-21 08:28:23",
"2020-09-21 08:34:38",
"2020-09-21 08:46:32",
"2020-09-21 08:58:41",
"2020-09-21 09:04:37",
"2020-09-21 09:10:32",
"2020-09-21 09:22:41",
"2020-09-21 09:28:36",
"2020-09-21 09:34:31",
"2020-09-21 09:46:44",
"2020-09-21 09:52:38",
"2020-09-21 09:58:33",
"2020-09-21 10:04:30",
"2020-09-21 10:10:45",
"2020-09-21 10:16:40",
"2020-09-21 10:22:35",
"2020-09-21 10:28:30",
"2020-09-21 10:34:44",
"2020-09-21 10:40:43",
"2020-09-21 10:46:37",
"2020-09-21 10:52:32",
"2020-09-21 10:58:46",
"2020-09-21 11:10:36",
"2020-09-21 11:16:32",
"2020-09-21 11:22:45",
"2020-09-21 11:28:40",
"2020-09-21 11:34:37",
"2020-09-21 11:40:36",
"2020-09-21 11:46:31",
"2020-09-21 11:52:46",
"2020-09-21 11:58:40",
"2020-09-21 12:04:36",
"2020-09-21 12:10:50",
"2020-09-21 12:16:45",
"2020-09-21 12:22:40",
"2020-09-21 12:28:35",
"2020-09-21 12:34:49",
"2020-09-21 12:40:47",
"2020-09-21 12:46:42",
"2020-09-21 12:52:36",
"2020-09-21 12:58:32",
"2020-09-21 13:04:47",
"2020-09-21 13:10:43",
"2020-09-21 13:16:38",
"2020-09-21 13:28:47",
"2020-09-21 13:34:42",
"2020-09-21 13:40:41",
"2020-09-21 13:46:35",
"2020-09-21 13:52:49",
"2020-09-21 13:58:45",
"2020-09-21 14:04:39",
"2020-09-21 14:10:34",
"2020-09-21 14:16:49",
"2020-09-21 14:22:44",
"2020-09-21 14:28:39",
"2020-09-21 14:34:55",
"2020-09-21 14:40:53",
"2020-09-21 14:46:49",
"2020-09-21 14:52:45",
"2020-09-21 14:58:39",
"2020-09-21 15:04:53",
"2020-09-21 15:10:48",
"2020-09-21 15:16:43",
"2020-09-21 15:22:38",
"2020-09-21 15:28:52",
"2020-09-21 15:34:47",
"2020-09-21 15:40:45",
"2020-09-21 15:46:40",
"2020-09-21 15:52:54",
"2020-09-21 15:58:49",
"2020-09-21 16:04:46",
"2020-09-21 16:10:41",
"2020-09-21 16:16:56",
"2020-09-21 16:22:52",
"2020-09-21 16:28:46",
"2020-09-21 16:34:42",
"2020-09-21 16:40:59",
"2020-09-21 16:46:53",
"2020-09-21 16:52:48",
"2020-09-21 16:58:44",
"2020-09-21 17:04:57",
"2020-09-21 17:10:53",
"2020-09-21 17:16:48",
"2020-09-21 17:22:42",
"2020-09-21 17:28:56",
"2020-09-21 17:34:53"
]
},
"plotOptions" : {
"series" : {
"connectNulls" : false,
"stacking" : "",
"marker" : {
"radius" : 0,
"symbol" : "circle",
"enabled" : true,
"lineColor" : "",
"fillColor" : "#ffffff",
"lineWidth" : 0
},
"dataLabels" : {
"softConnector" : true,
"useHTML" : false,
"allowOverlap" : false,
"crop" : false,
"enabled" : false,
"inside" : false
}
}
},
"series" : [
{
"lineWidth" : 0.5,
"tooltip" : {
"useHTML" : false,
"followTouchMove" : true,
"shadow" : true,
"crosshairs" : true,
"shared" : true,
"enabled" : true,
"valueSuffix" : "A",
"animation" : true
},
"name" : "A相电流",
"data" : [
4.1200000000000001,
0.54000000000000004,
0.54000000000000004,
3.96,
0.53000000000000003,
0.53000000000000003,
0.54000000000000004,
3.9100000000000001,
0.53000000000000003,
0.53000000000000003,
4.1100000000000003,
0.54000000000000004,
0.54000000000000004,
4.0099999999999998,
0.54000000000000004,
0.54000000000000004,
3.9399999999999999,
0.54000000000000004,
0.53000000000000003,
0.54000000000000004,
0.53000000000000003,
4.0599999999999996,
0.54000000000000004,
0.53000000000000003,
0.53000000000000003,
4.0499999999999998,
0.54000000000000004,
0.54000000000000004,
4.0599999999999996,
0.54000000000000004,
0.54000000000000004,
0.53000000000000003,
0.54000000000000004,
0.54000000000000004,
3.8300000000000001,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
4.0300000000000002,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.52000000000000002,
3.9500000000000002,
0.62,
0.60999999999999999,
0.60999999999999999,
0.62,
0.76000000000000001,
4.1299999999999999,
6.8600000000000003,
3.5800000000000001,
3.5800000000000001,
3.71,
0.92000000000000004,
0.93000000000000005,
0.93000000000000005,
4.5199999999999996,
0.82999999999999996,
4.4299999999999997,
0.82999999999999996,
4.2999999999999998,
0.82999999999999996,
4.3499999999999996,
0.82999999999999996,
4.4500000000000002,
0.82999999999999996,
0.81000000000000005,
0.75,
0.75,
0.73999999999999999,
0.73999999999999999,
0.73999999999999999,
0.73999999999999999,
0.73999999999999999,
3.6899999999999999,
3.6499999999999999,
3.6499999999999999,
3.6499999999999999,
11.67,
11.65,
11.59,
11.640000000000001,
11.66,
11.630000000000001,
0.81000000000000005,
0.78000000000000003,
0.77000000000000002,
8.8200000000000003,
8.8000000000000007,
0.75,
0.75,
0.75,
0.73999999999999999,
0.71999999999999997,
0.56000000000000005,
0.56000000000000005,
0.68000000000000005,
3.7000000000000002,
4.5599999999999996,
4.6399999999999997,
0.67000000000000004,
0.67000000000000004,
0.68000000000000005,
0.67000000000000004,
0.68000000000000005,
3.6600000000000001,
4.0999999999999996,
3.8300000000000001,
3.6699999999999999,
3.4700000000000002,
3.4399999999999999,
0.56000000000000005,
0.54000000000000004,
0.55000000000000004,
0.56000000000000005,
0.55000000000000004,
4.1100000000000003,
0.55000000000000004,
0.55000000000000004,
0.55000000000000004,
4.25,
0.53000000000000003,
4.0800000000000001,
4.1100000000000003,
0.54000000000000004,
0.53000000000000003,
0.55000000000000004,
0.56000000000000005,
0.55000000000000004,
0.55000000000000004,
0.54000000000000004,
0.54000000000000004,
0.54000000000000004,
0.54000000000000004,
7.6200000000000001,
0.54000000000000004,
0.54000000000000004,
0.53000000000000003,
0.52000000000000002,
0.53000000000000003,
0.51000000000000001,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.53000000000000003,
0.52000000000000002,
0.53000000000000003,
4.1200000000000001,
0.53000000000000003,
0.52000000000000002,
4.1500000000000004,
4.1900000000000004,
4.21,
0.53000000000000003,
0.57999999999999996,
4.1600000000000001,
0.56000000000000005,
6.9100000000000001
],
"showInLegend" : true,
"allowPointSelect" : false,
"visible" : true,
"yAxis" : 0
},
{
"lineWidth" : 0.5,
"tooltip" : {
"useHTML" : false,
"followTouchMove" : true,
"shadow" : true,
"crosshairs" : true,
"shared" : true,
"enabled" : true,
"valueSuffix" : "A",
"animation" : true
},
"name" : "B相电流",
"data" : [
0.76000000000000001,
0.75,
0.76000000000000001,
0.75,
0.75,
0.75,
0.75,
0.77000000000000002,
0.75,
0.75,
0.68999999999999995,
0.68999999999999995,
0.68000000000000005,
0.68999999999999995,
0.68000000000000005,
0.79000000000000004,
0.79000000000000004,
0.78000000000000003,
0.77000000000000002,
0.77000000000000002,
0.77000000000000002,
0.77000000000000002,
0.77000000000000002,
0.77000000000000002,
0.76000000000000001,
0.76000000000000001,
0.76000000000000001,
0.76000000000000001,
0.76000000000000001,
0.78000000000000003,
0.75,
0.75,
0.76000000000000001,
0.76000000000000001,
0.76000000000000001,
0.75,
0.75,
0.75,
0.75,
0.75,
0.75,
0.75,
0.73999999999999999,
0.75,
0.75,
0.85999999999999999,
1.0900000000000001,
8.0099999999999998,
12.279999999999999,
12.23,
14.43,
22.600000000000001,
22.579999999999998,
12.130000000000001,
6.0800000000000001,
13.94,
11.66,
11.470000000000001,
5.7599999999999998,
5.6500000000000004,
5.5,
5.4699999999999998,
5.4199999999999999,
5.4100000000000001,
8.2400000000000002,
1,
1.01,
1.02,
1.03,
1.03,
0.90000000000000002,
4.8399999999999999,
0.79000000000000004,
5.8099999999999996,
0.75,
0.71999999999999997,
0.72999999999999998,
0.72999999999999998,
0.70999999999999996,
0.71999999999999997,
0.72999999999999998,
0.72999999999999998,
0.71999999999999997,
0.71999999999999997,
0.71999999999999997,
0.65000000000000002,
0.65000000000000002,
0.63,
0.64000000000000001,
0.76000000000000001,
3.0099999999999998,
2.9500000000000002,
2.96,
2.98,
2.96,
0.91000000000000003,
9.0700000000000003,
19.41,
19.280000000000001,
2.9900000000000002,
9.3599999999999994,
1.0700000000000001,
3.3900000000000001,
1.21,
1.21,
1.03,
1.02,
1,
1.01,
1.01,
1.01,
1.01,
4.2300000000000004,
4.7300000000000004,
4.4100000000000001,
4.25,
3.9100000000000001,
3.9199999999999999,
0.71999999999999997,
0.71999999999999997,
0.66000000000000003,
0.65000000000000002,
0.64000000000000001,
4.3799999999999999,
0.64000000000000001,
0.64000000000000001,
0.64000000000000001,
4.5899999999999999,
0.55000000000000004,
3.8599999999999999,
3.8599999999999999,
0.54000000000000004,
0.68999999999999995,
0.53000000000000003,
0.53000000000000003,
0.68000000000000005,
0.67000000000000004,
0.66000000000000003,
0.65000000000000002,
0.62,
0.62,
8.0800000000000001,
0.63,
0.60999999999999999,
6.8099999999999996,
0.60999999999999999,
0.59999999999999998,
0.60999999999999999,
0.59999999999999998,
0.58999999999999997,
0.58999999999999997,
0.58999999999999997,
0.59999999999999998,
0.59999999999999998,
4.4100000000000001,
0.59999999999999998,
0.60999999999999999,
4.4000000000000004,
4.4299999999999997,
4.4299999999999997,
6.1900000000000004,
15.6,
17.510000000000002,
17.07,
14.51
],
"showInLegend" : true,
"allowPointSelect" : false,
"visible" : true,
"yAxis" : 0
},
{
"lineWidth" : 0.5,
"tooltip" : {
"useHTML" : false,
"followTouchMove" : true,
"shadow" : true,
"crosshairs" : true,
"shared" : true,
"enabled" : true,
"valueSuffix" : "A",
"animation" : true
},
"name" : "C相电流",
"data" : [
5.9299999999999997,
5.4699999999999998,
5.9100000000000001,
5.9299999999999997,
5.9100000000000001,
5.9199999999999999,
5.4699999999999998,
5.9299999999999997,
5.9199999999999999,
5.9199999999999999,
5.4900000000000002,
5.9199999999999999,
5.9199999999999999,
5.9299999999999997,
5.9100000000000001,
5.9199999999999999,
5.9400000000000004,
5.4900000000000002,
5.9299999999999997,
5.4699999999999998,
5.9400000000000004,
5.9500000000000002,
5.5,
5.9500000000000002,
5.9400000000000004,
5.96,
5.9500000000000002,
5.9500000000000002,
5.9699999999999998,
5.96,
5.46,
5.9500000000000002,
5.96,
5.5199999999999996,
5.9699999999999998,
5.96,
5.96,
5.96,
5.4900000000000002,
5.9500000000000002,
5.9500000000000002,
5.5199999999999996,
5.9500000000000002,
5.9699999999999998,
5.5199999999999996,
5.9500000000000002,
5.9500000000000002,
5.9900000000000002,
6,
5.5499999999999998,
2.8100000000000001,
6.0599999999999996,
5.6100000000000003,
5.9100000000000001,
1.3799999999999999,
0.90000000000000002,
6,
5.5300000000000002,
5.9500000000000002,
5.9500000000000002,
5.9199999999999999,
5.9299999999999997,
5.46,
5.9199999999999999,
5.4699999999999998,
5.8899999999999997,
4.2599999999999998,
5.8799999999999999,
5.8700000000000001,
5.4199999999999999,
5.8499999999999996,
5.8700000000000001,
5.3799999999999999,
5.8300000000000001,
5.8099999999999996,
5.79,
2.3700000000000001,
2.5299999999999998,
5.7599999999999998,
5.7400000000000002,
2,
2.29,
5.8399999999999999,
5.8399999999999999,
5.8399999999999999,
0.89000000000000001,
1.28,
5.8300000000000001,
5.7000000000000002,
5.71,
5.2800000000000002,
5.7000000000000002,
1.97,
8.1999999999999993,
1.3300000000000001,
2.9900000000000002,
5.5899999999999999,
3.5099999999999998,
3.0600000000000001,
2.3300000000000001,
2.29,
8.0999999999999996,
7.9199999999999999,
7.9299999999999997,
7.9299999999999997,
6.6699999999999999,
5.7999999999999998,
5.3700000000000001,
4.9100000000000001,
5.3799999999999999,
5.3300000000000001,
5.3499999999999996,
4.1900000000000004,
10.880000000000001,
3.7400000000000002,
14.1,
4.5999999999999996,
3.96,
2.8199999999999998,
8.8300000000000001,
8.5800000000000001,
5.2000000000000002,
5.2000000000000002,
4.6200000000000001,
3,
2.96,
2.8300000000000001,
3.7599999999999998,
8.6400000000000006,
4.6399999999999997,
4.5899999999999999,
1.3200000000000001,
8.6699999999999999,
5.1500000000000004,
4.6500000000000004,
5.1600000000000001,
5.1500000000000004,
4.6699999999999999,
5.1500000000000004,
5.1500000000000004,
5.5300000000000002,
5.6699999999999999,
6.5700000000000003,
5.5300000000000002,
5.5199999999999996,
2.7599999999999998,
5.3799999999999999,
8.5600000000000005,
4.9199999999999999,
5.4100000000000001,
5.4299999999999997,
5.4199999999999999,
3.3500000000000001,
4.8899999999999997,
4.6200000000000001,
2.8599999999999999,
8.8200000000000003,
4.6299999999999999,
4.6600000000000001,
4.6699999999999999,
5.5099999999999998,
2.4399999999999999,
10.109999999999999,
8.6899999999999995,
8.8599999999999994
],
"showInLegend" : true,
"allowPointSelect" : false,
"visible" : true,
"yAxis" : 0
}
],
"title" : {
"useHTML" : false,
"text" : ""
},
"colors" : [
"#FFCC00",
"#7DD875",
"#FF3B30"
],
"yAxis" : {
"labels" : {
"style" : {
"color" : "#ffffff"
},
"useHTML" : false,
"enabled" : true,
"format" : "{value:.,0f}"
},
"reversed" : false,
"title" : {
"text" : ""
},
"startOnTick" : false,
"max" : 45.200000762939453,
"allowDecimals" : true,
"opposite" : false,
"endOnTick" : false,
"gridLineWidth" : 0.29999999999999999,
"visible" : true,
"lineWidth" : 0
},
"legend" : {
"enabled" : true,
"floating" : false
}
}
这个是aa_refreshChartWithChartModel方法返回的json
这里肯定是有问题的, 你把这里改掉看看
你的好几处 "fontSize" : "(null)px",
都需要改掉
是这个问题,都改了"fontSize" : "(null)px"以后就正常绘制了,不能偷懒粘贴代码了得不偿失,非常感谢解答!!!
可以试试这个在线代码比对工具 https://www.jq22.com/wbdb/
对比正常代码和异常代码,能够比较快速的定位出问题的代码在哪里
已收藏😝
因为用户再用手指滑动查看悬浮窗的数据时由于悬浮窗距离准星线太近了手指挡住了数据不变观察