-
-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x轴的y值指示线(动态高度)效果实现 #1383
Labels
Comments
这个就只是网格线而已, 实现起来比较简单, 但是你的这个网格线高度不是规则的, 实现起来就比较复杂了. |
有没有示例可供参考呢 |
配置示例: - (AAOptions *)dynamicHeightGridLineAreaChart {
return AAOptions.new
.titleSet(AATitle.new
.textSet(@"dynamicHeightGridLineAreaChart"))
.chartSet(AAChart.new
.typeSet(AAChartTypeScatter)
.eventsSet(AAChartEvents.new
.loadSet(@AAJSFunc(function () {
const chart = this;
const mainSeries = chart.series[0];
mainSeries.data.forEach((point, i) => {
chart.addSeries({
data: [
[i, 0],
[i, point.y]
]
})
})
}))))
.plotOptionsSet(AAPlotOptions.new
.scatterSet(AAScatter.new
.lineWidthSet(@2)
.lineColorSet(@"#dbe751")
.dashStyleSet(AAChartLineDashStyleTypeLongDash)
.enableMouseTrackingSet(@false)
.linkedToSet(@"main")
.statesSet(AAStates.new
.inactiveSet(AAInactive.new
.enabledSet(false)))
.markerSet(AAMarker.new
.enabledSet(false))))
.yAxisSet(AAYAxis.new
.gridLineWidthSet(@0))
.seriesSet(@[
AASeriesElement.new
.typeSet(AAChartTypeAreaspline)
.idSet(@"main")
.dataSet(@[@7.0, @6.9, @2.5, @14.5, @18.2, @21.5, @5.2, @26.5, @23.3, @45.3, @13.9, @9.6])
.lineWidthSet(@6)
.colorSet(@"#dbe751")
.fillOpacitySet(@0.4)
.markerSet(AAMarker.new
.enabledSet(false))
]);
} 新增了部分属性及文件, 更新 AAChartKit 至最新内容即可使用. |
应该就是头文件导入的问题, 你改成导入 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问这个指示线的效果能实现吗
The text was updated successfully, but these errors were encountered: