-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi! I have a bar chart and when the number of series is greater than (say) 20, the labels in the y series shows intercalated (one yes and one no). How can I set the font size of the y labels? How to avoid this problem?
PD: I have the commercial version
I solved this by truncating long labels. I also have another problem regarding with this. When the height of the chart is of certain value, the labels in the axis are showed interloped. So I see one and one not. I decreased the size of the font, but still happends. I don't know how to handle this. Any ideas?
(the forum don't let me to upload files)
Thank's
Hi,
could you post a picture that shows the long label issue? I see that when zkcharts will enlarge label area width of vertical axis:
By the way, because bar chart renders its YAxis horizontally, when you describe your issue, you had better use the terms "horizontal" and "vertical" instead of "x axis" and "y axis" to avoid ambiguity.
there is a xAxis.getLabels().setFormat("formatString"), but it seems highcharts format string only has options for date and number, not for string. http://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting
Currently you have to pre-process a axis label before you insert into model, e.g. truncate long label to 10 characters.
Hi.
I solve part of the problem changing the style of the axis labels.
xAxis.getLabels().setStyle()
But that's not solve the issue when the labels are too long. I would like to use the formatter option of highcharts that allows to set a function to cut the labels for the axis but not for the tooltip. See: (api.highcharts.com/highcharts#plotOptions.bar.dataLabels.formatter)
Is there another option?
Asked: 2014-09-19 00:46:45 +0800
Seen: 37 times
Last updated: Oct 07 '14