How to start the line graph margin value with user value

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
mahesh_burgu
Posts: 25
Joined: Mon Oct 08, 2007 7:16 am

How to start the line graph margin value with user value

Post by mahesh_burgu » Tue Nov 06, 2007 3:55 pm

How to start the line graph margin value with user defined value instead of 0(zero by default)at the intersection of X and Y axis
thanks
mahesh

mahesh_burgu
Posts: 25
Joined: Mon Oct 08, 2007 7:16 am

Post by mahesh_burgu » Tue Nov 06, 2007 5:12 pm

please help me
thanks
mahesh

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Tue Nov 06, 2007 7:04 pm

If you have a specific range you need to display then just call

Code: Select all

axis.setRange(...);
If you want the axis to scale automatically but want to exclude 0 from the auto range calculation then just call

Code: Select all

axis.setAutoRangeIncludesZero(false);

mahesh_burgu
Posts: 25
Joined: Mon Oct 08, 2007 7:16 am

Post by mahesh_burgu » Tue Nov 06, 2007 7:13 pm

Thanx for the reply....

But my X values are Strings not double...What to do know?
thanks
mahesh

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Tue Nov 06, 2007 9:23 pm

Try using an XYPlot instead of a CategoryPlot

mahesh_burgu
Posts: 25
Joined: Mon Oct 08, 2007 7:16 am

Post by mahesh_burgu » Tue Nov 06, 2007 9:39 pm

can u please send me some sample code
thanks
mahesh

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Nov 07, 2007 12:16 pm

I don't really understand the original problem description.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked