Hi
i want to display y-axis ranges as 0,10,20,30.....
now its displaying 0,1,2,3,4....
Code :-
final CategoryDataset dataset1 = createDataset1();
final NumberAxis rangeAxis1 = new NumberAxis("Questions");
rangeAxis1.setAutoRangeIncludesZero(false);
final LineAndShapeRenderer renderer1 = new LineAndShapeRenderer();
renderer1.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
final CategoryAxis domainAxis = new CategoryAxis("Student Test - 1");
final CategoryPlot subplot1 = new CategoryPlot(dataset1, domainAxis, rangeAxis1, renderer1);
subplot1.setDomainGridlinesVisible(true);
Please help
Thanks
y-axis ranges problem
If you do a
then you can set the Tick in increment of 10.
Beaware: there is a down side of this, if your value in Range Axix is < 10 then you will not get any tick at all.
Code: Select all
rangeAxis.setTickUnit(new NumberTickUnit(10.0));
Beaware: there is a down side of this, if your value in Range Axix is < 10 then you will not get any tick at all.
--
RCDran
RCDran