I created a vertical-aligned barchart. Using org.jfree.chart.axis.CategoryAxis.setMaxCategoryLabelWidthRatio(0.5f) I made sure that the border between the category labels on the left side and the bars on the right side of the graph is exactly in the middle of the graph.
Somehow, some of the labels still get cut off (ending with ...), while there's a lot of space available. How do I make sure that my entire label is visible?
(Barchart) labels get cut off even if there's enough space
(Barchart) labels get cut off even if there's enough space
I wish to express my gratitude to the people of Italy. Thank you for inventing pizza.
I had similar problems with a bar chart, plot orientation vertical (that is, the bars extending from the bottom to the top).
I also played around with setMaxCategoryLabelWidthRatio(float). But what I found in the documentation didn't really help me (maybe I just didn't understand or didn't look at the right place).
If it defines the border between space available for the labels and space available for the plot, then you're right and it doesn't work as expected. And only values between 0.0f and 1.0f would make sense.
I had success with increasing that value to, say 5.0f or 10.0f. It seems to define some kind of ratio between label space and plot space ... but I am not sure. That was more of a guess than anything else.
Maybe somebody involved in the code could help out ?
I also played around with setMaxCategoryLabelWidthRatio(float). But what I found in the documentation didn't really help me (maybe I just didn't understand or didn't look at the right place).
If it defines the border between space available for the labels and space available for the plot, then you're right and it doesn't work as expected. And only values between 0.0f and 1.0f would make sense.
I had success with increasing that value to, say 5.0f or 10.0f. It seems to define some kind of ratio between label space and plot space ... but I am not sure. That was more of a guess than anything else.
Maybe somebody involved in the code could help out ?