Overlap datalabels line chart highcharts

匆匆过客 提交于 2019-12-08 02:06:17

问题


How i can solve the problem of the values (dataLabels) ​​below?

My JSFiddle: http://jsfiddle.net/3kVJS/3/

 ...
     series: [{
         name: 'zzzzzz',
         data: [17.00, 1.00, 5.00, 0.00, 0.00, 35.00, 6.00, 13.00, 233.00, 2.00, 41.00],
         tooltip: {
             shared: true,
             useHTML: true,
             showInLegend: false,
             pointFormat: '<span style=\"color:{series.color}; text-shadow: 0 1px 1px #ddd;\">{series.name}</span>: <span style=\"font-size:14px!important\"> {point.y}</span><br/>'
         }
     }

Thanks!!!


回答1:


Just add this inside tooltips you will get it what to do.

tooltip: { style: { padding: 20, fontWeight: 'bold', fontSize: '30px', } },




回答2:


Highcharts doesn't prevent from dataLabels overlapping. I have created simple module which prevent's from this, see simple demo: http://jsfiddle.net/menXU/1/

Use module by calling StaggerDataLabels(series);, where series is array of all series in chart object.

In the fact it's duplicate of this question, but I couldn't report this.




回答3:


Hai Just add verticalAlign: 'bottom', instead of using verticalAlign: 'top', at the plotOptions.



来源:https://stackoverflow.com/questions/22671871/overlap-datalabels-line-chart-highcharts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!