Codemonkey
Codemonkey

Reputation: 4807

Highcharts datalabels outside of plot area?

On highcharts 3.0.0 (and all prior versions that I used), I was able to position datalabels outside of the plot area.

Specifically I display a label whenever the y-axis value is 0. And I display it under the chart line, so they end up under the x-axis.

To do this, I specified a "y" of 18 in plotOptions > series > dataLabels > y. This did the job of positioning it where I wanted.

Since upgrading to 3.0.6, this no longer happens. Instead the "y" value gets "bounced" off of the x-axis. So a y of 0 sits the label just above the axis. A y of -18 raises it 18 pixels up, but so does a y of 18.

Is this a bug, or intentional behaviour? Is there anything I can do to fix this problem, other than going back to 3.0.0?

Thanks

Upvotes: 3

Views: 3221

Answers (1)

Codemonkey
Codemonkey

Reputation: 4807

As per my comment on the question, the solution is to add

crop: false,
overflow: 'none'

I'll leave this question up in case it helps someone else though.

Upvotes: 3

Related Questions