domain axis label and the chart labels please take a look

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
user1
Posts: 7
Joined: Thu Oct 12, 2006 8:33 am

domain axis label and the chart labels please take a look

Post by user1 » Mon Oct 16, 2006 12:18 pm

hi all.

Image

as you can see my problem is that the whole labels are not displayed

when i drop the domain axis label it is displayed well but i can't to do.

i tried the setDomainAxisLocation but it doesn't help ( it is in the correct place i want) i tried also

plot.setAxisOffset(RectangleInsets.ZERO_INSETS);

but the domain axis label is next to the labels. is there a method that control the distance between them or set the DomainAxis alignment to the left in order to display the labels correct.

another thing i dont need the blank in the left of the chart can i drop it and display the chart bigger.

note: i am using BarChart with PlotOrientation.HORIZONTAL

user1
Posts: 7
Joined: Thu Oct 12, 2006 8:33 am

i am stuck with this - labels are not displayed (ex. ca...)

Post by user1 » Sat Oct 21, 2006 1:21 pm

i am using CategoryAxis in BarChart with PlotOrientation.HORIZONTAL
you can take a look in the image none of the categories is displayed!
also in the other bar charts if the categories is more than 5 characters its displayed the first 5 character then ... is there a solution for this?
and how i can control or remove the white space (from the left) before the chart begin, i need to display the chart bigger as i could.

any suggestion will be appreciated.

paquitomate
Posts: 1
Joined: Tue Oct 24, 2006 8:59 am

Post by paquitomate » Tue Oct 24, 2006 9:09 am

hi,
i'd the some problem, and i solved it doing the next:
- i've putted de orientation vertical (i think this isn't necessary).
- i've rotated the axis label:
CategoryPlot myplot = mychart.getCategoryPlot(); CategoryAxis mydomainAxis = myplot.getDomainAxis();
// axis label position
mydomainAxis.setCategoryLabelPositions(
CategoryLabelPositions.DOWN_45);
- at least, i've asigned a maximun category label to the domain axis:
mydomainAxis.setMaximumCategoryLabelWidthRatio(1.5f);
then.... the categories're displayed!.

user1
Posts: 7
Joined: Thu Oct 12, 2006 8:33 am

Post by user1 » Tue Oct 24, 2006 6:19 pm

hi paquitomate.

thank you for the help i will check it ....
i used the HORIZONTAL Orientation in order to solve the problem but it didn't help so i will try to rotate the axis label as you suggest.

thanks again.

Locked