Highcharts - line chart dataLabels on every other point? -
i have highcharts line graph has datalabels configured in plotoptions. working , have nice label displayed on each point.
plotoptions: { line: { datalabels: { enabled: true, formatter: function() { homecoming '$' + highcharts.numberformat(math.round(this.y),0,0,","); } } } }
however, there way set interval determines how datalabels appear on points? want show every point in graph, due space constraints, show datalabel every 2 or 3 points.
edit:
difficulty level: graph has multiple y-axes, uses datetime x-axis, , has irregular data. http://jsfiddle.net/sqkmw/68/
yes, homecoming blank string if point x mod 2 0, every 2nd show up, illustration (http://jsfiddle.net/hzytv/):
formatter: function() { if(this.point.x % 2 == 0) homecoming ''; homecoming this.y +'mm'; }
for datetime axis have create variable , increment manually http://jsfiddle.net/sqkmw/69/
highcharts
No comments:
Post a Comment