遍历指定节点下的所有后代节点
方案一 递归遍历用法先定义函数,遍历直接子节点对每个字元素,调用和父元素完全相同的方法示例 function getchildern(parent){ console.log(parent.nodeName); var children = parent.children; var childrenlen = parent.children.len…
伸缩条限制
dataZoom: [   {       show: true,       start: 25,       end: 70,       zoomLock:true,//伸缩条是否拖动范围   }],
图例过多
legend: {        type: 'scroll', //分页类型        bottom: 10,        data: (function (){         &…
字数超出换行显示
formatter:(text)=>{    text = text.replace(/\S{7}/g,function(match){        console.log(match);        return match + "\n"…
echarts添加点击事件
为图表添加点击事件 myChart.on('click',(param)=>{}) 为lenged 添加点击事件 let myCharts = Echarts.init(document.getElementById('bar'))myCharts.off('legendselectchanged') //解决重复触发......myChar…