I've set the following values in my bar chart so the y axis label values will have two lines
categoryAxis.setMaximumCategoryLabelWidthRatio(25.0f);
categoryAxis.setMaximumCategoryLabelLines(2);
Now the problem I have is the default behavior when you do this is for the two values to be centered. I would like the two values to be left justified.
How would I go about doing this? I tried creating a CategoryLabelPosition object and setting setCategoryLabelPositions but I could not get it to work. I expect I’m not setting the correct values for my CategoryLabelPosition object but I cannot figure out what I should be setting it too.
I tried this for example
CategoryLabelPosition leftPositionSpec = new CategoryLabelPosition(
RectangleAnchor.LEFT,
TextBlockAnchor.CENTER_LEFT,
TextAnchor.CENTER_LEFT,
90.0,
CategoryLabelWidthType.RANGE,
0.2f);
categoryAxis.setCategoryLabelPositions(new CategoryLabelPositions(
new CategoryLabelPosition(), new CategoryLabelPosition(),
leftPositionSpec, new CategoryLabelPosition()))