The use of echarts mark line markLine

headwind elegance 2022-08-06 08:27:47 阅读数:637

useechartsmarklinemarkline

Rendering: Add a dividing line at a certain value

markLine is written in serise

 series: [{data: hl_YData,type: 'bar',barWidth: 40,itemStyle: {normal: {// custom display (in order)color: function (params) {var colorList = ['#97D7DB', '#97D7DB', '#EAE88A', '#EAE88A', '#F7782C', '#F7782C',];return colorList[params.dataIndex]},barBorderRadius: [10, 10, 0, 0],},},},{type: 'bar',markLine: {silent: true, // no action when the mouse moves on the marker linesymbol: "none",itemStyle: {normal: {lineStyle: {color: '#ff0000',}}},label: {position: 'end', // the position where the content is displayedformatter: markLineData=='0'?'':'abnormal impedance dividing line', // the content displayed by the marking linecolor: '#8C8C8C' // Display content color},data: [{xAxis: '150-200' // position of dividing line}]//The dividing line can also be set like this//data: [// // [4,18] The first parameter is the index of the x-axis, and the second is the maximum value of the y-axis// [ {// coord: [4, markLineData]// },// ],//// ]}}]

版权声明:本文为[headwind elegance]所创,转载请带上原文链接,感谢。 https://javamana.com/2022/218/202208060818127598.html