echarts怎么改变树形图线条的颜色呢? 如图,设置成第二种格式的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 series 里面设置 。属性名 lineStylehttp://echarts.baidu.com/option.html#series-sankey.lineStyle 你没仔细看这个lineStyle 是一组数据可以设置一次的。也就是series 里面的多个data对应的lineStyle是可以设置多个的 series: [ { type: 'sankey', layout: 'none', data: data.nodes, links: data.links, itemStyle: { normal: { borderWidth: 1, borderColor: '#aaa' } }, lineStyle: { normal: { color: 'source', curveness: 0.5 } } }, { type: 'sankey', layout: 'none', data: data.nodes, links: data.links, itemStyle: { normal: { borderWidth: 1, borderColor: '#aaa' } }, lineStyle: { normal: { color: 'source', curveness: 0.5 } } } ] https://blog.csdn.net/wusefengye/article/details/79110195 https://blog.csdn.net/wusefengye/article/details/79110195 myChart.showLoading();$.get('data/asset/data/flare.json', function (data) { myChart.hideLoading(); echarts.util.each(data.children, function (datum, index) { index % 2 === 0 && (datum.collapsed = true); }); data.children[0].itemStyle = { color : '#0000ff', borderColor:'#0000ff' }; data.children[0].lineStyle = { color : '#0000ff', borderColor:'#0000ff' } let data2 = data.children[1]; myChart.setOption(option = { tooltip: { trigger: 'item', triggerOn: 'mousemove' }, series: [ { type: 'tree', data: [data], top: '1%', left: '7%', bottom: '1%', right: '20%', symbolSize: 7, label: { normal: { position: 'left', verticalAlign: 'middle', align: 'right', fontSize: 9 } }, leaves: { label: { normal: { position: 'right', verticalAlign: 'middle', align: 'left' } } }, expandAndCollapse: true, animationDuration: 550, animationDurationUpdate: 750 }, { type: 'tree', data: [data2], top: '1%', left: '7%', bottom: '1%', right: '20%', symbolSize: 7, label: { normal: { position: 'left', verticalAlign: 'middle', align: 'right', fontSize: 9 } }, lineStyle:{ color:'#ff0000' }, leaves: { label: { normal: { position: 'right', verticalAlign: 'middle', align: 'left' } } }, expandAndCollapse: true, animationDuration: 550, animationDurationUpdate: 750 } ] });});在data中设置lineStyle是边的样式,itemStyle是节点样式 Ext两个Combobox值如何保持一致? js 弹出窗口 多个input表单 如何动态让多个表单值 全部显示在一个表单里面 关于代码转换,急急急! 帧结构里页面相互操作的问题... 急!急!急! js中的replace函数的使用 请教,关于javascript实现网页菜单,代码中的中文为什么不能正常显示??? 想找一点比较全面的文档,最好能在线更新的 fusioncharts 图表边框问题 jsTree 监听open_node.jstree事件时,怎样获取展开的结点的ID 一个JS中怎么调用另一个JS中的函数 微信浏览器如何禁止页面下拉查看网址?
http://echarts.baidu.com/option.html#series-sankey.lineStyle
{
type: 'sankey',
layout: 'none',
data: data.nodes,
links: data.links,
itemStyle: {
normal: {
borderWidth: 1,
borderColor: '#aaa'
}
},
lineStyle: {
normal: {
color: 'source',
curveness: 0.5
}
}
},
{
type: 'sankey',
layout: 'none',
data: data.nodes,
links: data.links,
itemStyle: {
normal: {
borderWidth: 1,
borderColor: '#aaa'
}
},
lineStyle: {
normal: {
color: 'source',
curveness: 0.5
}
}
}
]
myChart.showLoading();
$.get('data/asset/data/flare.json', function (data) {
myChart.hideLoading(); echarts.util.each(data.children, function (datum, index) {
index % 2 === 0 && (datum.collapsed = true);
}); data.children[0].itemStyle = {
color : '#0000ff',
borderColor:'#0000ff'
};
data.children[0].lineStyle = {
color : '#0000ff',
borderColor:'#0000ff'
}
let data2 = data.children[1]; myChart.setOption(option = {
tooltip: {
trigger: 'item',
triggerOn: 'mousemove'
},
series: [
{
type: 'tree', data: [data], top: '1%',
left: '7%',
bottom: '1%',
right: '20%', symbolSize: 7, label: {
normal: {
position: 'left',
verticalAlign: 'middle',
align: 'right',
fontSize: 9
}
}, leaves: {
label: {
normal: {
position: 'right',
verticalAlign: 'middle',
align: 'left'
}
}
}, expandAndCollapse: true,
animationDuration: 550,
animationDurationUpdate: 750
},
{
type: 'tree', data: [data2], top: '1%',
left: '7%',
bottom: '1%',
right: '20%', symbolSize: 7, label: {
normal: {
position: 'left',
verticalAlign: 'middle',
align: 'right',
fontSize: 9
}
},
lineStyle:{
color:'#ff0000'
}, leaves: {
label: {
normal: {
position: 'right',
verticalAlign: 'middle',
align: 'left'
}
}
}, expandAndCollapse: true,
animationDuration: 550,
animationDurationUpdate: 750
}
]
});
});
在data中设置lineStyle是边的样式,itemStyle是节点样式