What are the first problems and solutions for Baidu eCharts?
Preface
When I got bored with Highchart last week, I tried Baidu's eCharts and supported IE6, 7, and 8 +. I also encountered several minor problems in online data editing and toolbar support, in the last two days, I tried to find a solution.
Problem in Tooltip Unit
You can use formatter in Tooltip to solve this problem. The setting function is more complex, because you need to set it according to your Series value, just like a multi-dimensional array. Supports up or down 10 <sup> 4 </sup> t while supporting Chinese characters.
Tooltip: {trigger: 'axis ', axisPointer: {// coordinate axis indicator, which triggers a valid type: 'shadow' // The default is a straight line. Optional values: 'line' | 'shadow'}, formatter: function (param) {return param [0] [1] + '<br/>' + param [0] [0] + ': '+ (param [0] [2] + '10 tons') + '<br/>' + param [1] [0] + ': '+ (param [1] [2] + '000000') +' <br/> '+ param [2] [0] + ': '+ (param [2] [2] + '000000') +' <br/> ';}}
Column chart rounded corner
Of course, most of the examples in the official Demo are rounded. When I checked the materials, I recommended the chart. setTheme method to use the official theme. I didn't get it through. I set the itemStyle attribute of series, which contains the attribute barBorderRadious.
Series: [{name: 'prediction', type: 'bar', itemStyle: {normal: {color: '# fff', barBorderColor: 'tomato', barBorderWidth: 6, barBorderRadius: 5, }}, data: arr2}]