In my line chart, when the values along the x-axis is very large in number, the first plotting point(1st co-ordinate) is started plotting far away from (0,0) point along x-axis. IF I want start plotting from (0,0) itself, what option I have to set.
Thanks in Advance
Starting co-ordinate(plot) for X-axis
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Starting co-ordinate(plot) for X-axis
I don't entirely understand the question, but perhaps if you call setAutoRangeIncludesZero(false) for the axis then you'll get what you are looking for.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: Starting co-ordinate(plot) for X-axis
H Dave,
Thanks for your reply. Still I am stuck. I wanted some kind of property set like categoryAxis.setLowerMargin(0); so the DomainAxis can be started from co-ordinate(0,0). After setting categoryAxis.setLowerMargin(0), the plot of first co-ordinate is not started from (0,0).
Thanks for your reply. Still I am stuck. I wanted some kind of property set like categoryAxis.setLowerMargin(0); so the DomainAxis can be started from co-ordinate(0,0). After setting categoryAxis.setLowerMargin(0), the plot of first co-ordinate is not started from (0,0).
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Starting co-ordinate(plot) for X-axis
About the only information that you've added to your last post is that you have a category axis. I'm going to guess that you are drawing some kind of line chart - in this case, the data points are plotted in the middle of each category, so you'll never get the first data point hard up against the left of the plot - there will always be a gap of half a category.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: Starting co-ordinate(plot) for X-axis
Thanks Dave. I got your point. With the reference of the topic
http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=28316
I made some simulation, thus, it seems the plotting the first category starts from (0,0) itself.
It works properly for Line Chart, but it is not working for bar chart.
Or, is there some means to plot the points on left align of the category instead of centre of the category
http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=28316
I made some simulation, thus, it seems the plotting the first category starts from (0,0) itself.
It works properly for Line Chart, but it is not working for bar chart.
Or, is there some means to plot the points on left align of the category instead of centre of the category