Range and Domain axis handlers

A discussion forum for JFreeChart (a 2D chart library for the Java platform).

Range and Domain axis handlers

Postby mh.mahmood.alam » Tue Apr 18, 2017 9:04 am

I need to handle the range Axis and Domain Axis. So i have two requirements. For range Axis i need to fix the number of divisions that should be there and the overall length of the range axis. So I want the range to be automatically detected but the length in the graph should be say fixed 100 units. Now suppose the range is [0,20) then i should be able to decide how many ticks it should be divided into if i say 2 then range should have 0,10,20 that's it.

The second requirement is fixing the domain categorylabel. My dataset columns have labels that are longer than 10 characters. Hence the graph has clipped category labels . I want to be able to set that i want 30 % graph and 70% label. This should not include the ItemCollection.
I have tried the below code
Code: Select all
chartObject.getCategoryPlot().getRangeAxis().setMinorTickCount(3);
               //chartObject.getCategoryPlot().getRangeAxis().setRange(0, 20);//FixedAutoRange(20);
               //chartObject.getCategoryPlot().getDomainAxis().setCategoryLabelWidthRatio(50);
                chartObject.getCategoryPlot().getDomainAxis().setCategoryLabelPositions(
                                CategoryLabelPositions.UP_90);
mh.mahmood.alam
 
Posts: 1
Joined: Tue Apr 18, 2017 7:39 am

Return to JFreeChart

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

cron