Toggle navigation
ECharts树形图问题
By
扒拉土抛筛药蛋
2018-09-26 08:57:34
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
option = { title : { show:false }, tooltip : { trigger: 'item', formatter: "{b}" //formatter: "{b}: {c}" }, //那个右上角的工具栏 toolbox: { show : false, }, calculable : false, series : [ { name:'树图', type:'tree', //排列方式,横向、纵向 orient: 'vertical', //根节点的位置 rootLocation: {x: 'center',y: '10%'}, //连接线长度 layerPadding: 30, //结点间距 nodePadding: 20, initialTreeDepth:3,//展开的层级 //图形形状 symbol: 'circle', //尺寸大小 symbolSize: 40, //图的一些样式设置 itemStyle: { //正常情况显示 normal: { abel: { show: true, position: 'inside', textStyle: { color: '#cc9999', fontSize: 15, fontWeight: 'bolder' } }, lineStyle: { color: '#000', width: 1, type: 'solid' } }, //鼠标移上去样式 emphasis: { label: { show: false, textStyle:{ align:'center', verticalAlign:'middle' } }, color:'#fff', borderWidth: 1 } }, data: [ { name: '张三', //图片大小 symbolSize: [60, 80], //图片 symbol: 'square', itemStyle: { normal: { label: { show: false } }, }, children: [ { name: '小明', symbol: 'square', symbolSize: [150, 80], //value: 4, itemStyle: { color:'#fff', normal: { lineStyle: { color: '#000', width: 1, type: 'solid' }, label: { show: true, position: 'bottom' }, } }, children:[{ name:'小小明1', symbol: 'square', symbolSize: [150, 80], value: 4, itemStyle: { normal: { label: { show: true, position: 'bottom' } } }, children:[{ name:'小小小明1', symbol: 'square', symbolSize: [150, 80], value: 4, itemStyle: { normal: { label: { show: true, position: 'bottom' } } }, }] },{ name: '+', },{ name:'小小明2', symbol: 'square', symbolSize: [150, 80], value: 4, itemStyle: { normal: { label: { show: true, position: 'bottom' } } }, }] }, { name: '小黄', symbol: 'square', symbolSize: [150, 80], value: 4, itemStyle: { normal: { label: { show: true, position: 'bottom' } } }, children:[{ name:'小小黄1', symbol: 'square', symbolSize: [150, 80], value: 4, itemStyle: { normal: { label: { show: true, position: 'bottom' } } },{ name:'小小黄2', symbol: 'square', symbolSize: [150, 80], value: 4, itemStyle: { normal: { label: { show: true, position: 'bottom' } } }, }] } ] } ] } ] };