<template>
<div :class="className" :: 16540}
]
}
]
};
echarts.util.each(data.children, function (datum, index) {
index % 2 === 0 && (datum.collapsed = true);
});
this.chart.setOption({
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
}
]

});
if (option && typeof option === "object") {
this.chart.setOption(option, true);
}
}
}
}
</script>

相关文章: