dnavre
Posts: 2
Joined: Mon Jan 25, 2010 11:58 pm

labels are being cut off

Hi,
I'm trying to use a bar chart but my labels are being cut of because of being too long ( screen shot here: http://img30.imageshack.us/img30/4052/n ... tfitin.jpg ) how can i solve this?

also is there a way to make the chart engine understand that i have discrete (1,2,3,4, . . .) values and can't have (0.2, 0.5, 1.7) values in my chart?

Thank you in advance
torstein.honsi
Site Admin
Posts: 9215
Joined: Thu Nov 09, 2006 11:22 am
Location: Vik i Sogn, Norway

Re: labels are being cut off

Hi,

1) To prevent the labels from being cut off, you need to set a higher left margin. See http://www.highcharts.com/ref/#chart => margin. In a future version a feature will be added to automatically adjust the margin for the size of the labels.

2) What you should have is a minimal tick interval set to 1. Currently Highcharts doesn't support that, but you can set the tickInterval manually to 1. The downside is that it doesn't scale upwards, so if you have values up to 1000 there will be a thousand tick labels. See http://www.highcharts.com/ref/#yAxis => tickInterval.
Torstein Hønsi
CTO, Founder
Highsoft
dnavre
Posts: 2
Joined: Mon Jan 25, 2010 11:58 pm

Re: labels are being cut off

thank you for the help :) actually i have already figured out that i should have changed the margin on the chart property but thanks anyway.

also i'll be waiting for a new release providing an auto-scaling tick interval with the minimal tick value :)

Thank you once more,
Yervand

Return to “Highcharts Usage”