奔放的小二
2024-7-26 10:57:29
发布在问答
【常用脚本】
Echarts中的树状图BI中如何实现
本帖最后由 奔放的小二 于 2024-7-26 10:58 编辑
如上效果,代码在BI中效果是这样的
- import * as echarts from 'echarts';
- var option;
- option = {
- tooltip: {
- trigger: 'item',
- triggerOn: 'mousemove'
- },
- series: [
- {
- type: 'tree',
- data: [options.data],
- top: '1%',
- left: '7%',
- bottom: '1%',
- right: '20%',
- symbolSize: 7,
- label: {
- position: 'left',
- verticalAlign: 'middle',
- align: 'right',
- fontSize: 9
- },
- leaves: {
- label: {
- position: 'right',
- verticalAlign: 'middle',
- align: 'left'
- }
- },
- emphasis: {
- focus: 'descendant'
- },
- expandAndCollapse: true,
- animationDuration: 550,
- animationDurationUpdate: 750
- }
- ]
- }
- option && myChart.setOption(option);
复制代码
|
最佳答案
参考看看可以吗https://club.yonghongtech.com/thread-54635-1-1.html
查看完整内容
免责声明:本文不代表本站立场,且不构成任何建议,请谨慎对待。
版权声明:作者保留权利,不代表本站立场。