-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
如何显示图例,但是图例不支持点击事件 #183
Comments
在 AAChartKit 中 禁用图例点击事件 aaOptions.plotOptions.series.events = @{@"legendItemClick":@"false"}; 在 AAChartKit-Swift 中与之类似 aaOptions.plotOptions.series.events = ["legendItemClick":false] |
let model = dailySpineChartModel()
//dailySpineChart?.aa_drawChartWithChartModel(model)
let option = AAOptionsConstructor.configureChartOptions(model)
option.plotOptions?.series?.events = ["legendItemClick": false]
dailySpineChart?.aa_drawChartWithChartOptions(option)
func dailySpineChartModel() -> AAChartModel {
let model = AAChartModel()
.chartType(.spline)
.backgroundColor(AAColor.white)
.colorsTheme(["#FFAE91"])
.title("日收益金额")
.yAxisVisible(true)
.yAxisTitle("单位(元)")
.yAxisLabelsEnabled(true)
.tooltipValueSuffix("元")
.legendEnabled(true)
.dataLabelsEnabled(true)
.touchEventEnabled(false)
.categories(dailySpineCategories)
.series([
AASeriesElement()
.name("日收益金额")
.allowPointSelect(false)
.data(dailySpineSeries)
])
return model
} 如上,还是支持点击 |
少机率还会触发以下报错: ☠️☠️💀☠️☠️WARNING!!!!!!!!!!!!!!!!!!!! FBI WARNING !!!!!!!!!!!!!!!!!!!! WARNING☠️☠️💀☠️☠️code = 4;
|
Hi let option = AAOptionsConstructor.configureChartOptions(pieChartModel) This is what I am using. |
//禁用图例点击事件
aaOptions.plotOptions?.series?.events = AAEvents()
.legendItemClick(#"""
function() {
return false;
}
"""#)
|
参见 #239 |
作者你好,如题
我是在swift中使用的,设置legendEnabled=true,显示图例;
但是不希望这些图例可以点击,设置touchEventEnabled=false不生效
另外allowPointSelect=false,希望表格中的每一项不可以点击,也不生效
盼回复,谢谢!
The text was updated successfully, but these errors were encountered: