only integers in y-axis?

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

only integers in y-axis?

Post by Wolfgang Pausch » Sat Sep 07, 2002 8:57 am

hi there!

does anyone know, how to tell a timerseries-chart
to use integers on the y-axis only?

I appreciate every help!

wolfgang

Wolfgang Pausch

Re: only integers in y-axis?

Post by Wolfgang Pausch » Sat Sep 07, 2002 9:32 am

hi again,
just found that stuff.
I post it, maybe somebody else has the same problem:

VerticalNumberAxis range = new VerticalNumberAxis() ;
range.setStandardTickUnits(TickUnits.createIntegerTickUnits()) ;
chart.getXYPlot().setRangeAxis(range) ;

wolfgang

josh

Re: only integers in y-axis?

Post by josh » Sat Sep 07, 2002 7:15 pm

NumberAxis tempAxis=(NumberAxis)range;
tempAxis.setStandardTickUnits(TickUnits.createIntegerTickUnits());

try that.

Locked