We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ECharts 是支持在图表中添加事件的,用户的操作将会触发相应的事件。开发者可以监听这些事件,然后通过回调函数做相应的处理,比如跳转到一个地址,或者弹出对话框,或者做数据下钻等等。
https://echarts.baidu.com/tutorial.html#ECharts%20%E4%B8%AD%E7%9A%84%E4%BA%8B%E4%BB%B6%E5%92%8C%E8%A1%8C%E4%B8%BA
在go-echarts中怎么操作呢?望指教。
The text was updated successfully, but these errors were encountered:
https://github.com/chenjiandongx/go-echarts/blob/ab065a874236250a9e588a9f5fd4e51c47a094e6/example/gauge.go 这里有例子
Sorry, something went wrong.
给大家做参考:
bar := charts.NewBar() bar.SetGlobalOptions(charts.TitleOpts{Title: "Bar-示例图"}, charts.ToolboxOpts{Show: true}, charts.InitOpts{AssetsHost: "http://127.0.0.1:8081/assets/"}) bar.AddXAxis(nameItems). AddYAxis("商家A", randInt()). AddYAxis("商家B", randInt()) fn := fmt.Sprintf( myChart_%s.on('click', function (params) { alert('You clicked on a ' + params.name + ' element.'); console.log(params.name); });, bar.ChartID) bar.AddJSFuncs(fn)
myChart_%s.on('click', function (params) { alert('You clicked on a ' + params.name + ' element.'); console.log(params.name); });
No branches or pull requests
ECharts 是支持在图表中添加事件的,用户的操作将会触发相应的事件。开发者可以监听这些事件,然后通过回调函数做相应的处理,比如跳转到一个地址,或者弹出对话框,或者做数据下钻等等。
https://echarts.baidu.com/tutorial.html#ECharts%20%E4%B8%AD%E7%9A%84%E4%BA%8B%E4%BB%B6%E5%92%8C%E8%A1%8C%E4%B8%BA
在go-echarts中怎么操作呢?望指教。
The text was updated successfully, but these errors were encountered: