How to include Zero on Vertical Axis

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

How to include Zero on Vertical Axis

Post by Alex » Mon Feb 17, 2003 5:23 pm

Hi:

I have a dataset which includes several data points. I would like to
always display zero on the vertical axis scale. Currently, I have a dataset and all the data points display correctly, however, I would like to always display the zero on the vertical axis.

Any ideas on how I can do this?

Many Thanks:
Alex

Diego Garber

Re: How to include Zero on Vertical Axis

Post by Diego Garber » Mon Feb 17, 2003 8:52 pm

there is a method in VerticalAxis classes just for your need:

axis.setAutoRangeIncludesZero(true);

Alex

Re: How to include Zero on Vertical Axis

Post by Alex » Tue Feb 18, 2003 10:32 pm

Hi:

The axis.setAutoRangeIncludesZero(true) setting works, but the label for zero does not show up. Does anyone know how to get the zero label
to show up for the vertical axis?

By the way, thanks to Diego Garber for his recommendation.

Alex

Locked