Empty Space in Chart Area between Axis and 1st Data Point

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
annaros
Posts: 1
Joined: Tue Jun 10, 2008 8:56 pm
Location: United Kingdom
Contact:

Empty Space in Chart Area between Axis and 1st Data Point

Post by annaros » Fri Jun 20, 2008 7:36 am

When I try to plot around 1500 data points using default preferred size for the ChartPanel, the chart shrinks to such an extent that it's not easily readable. So I am changing the preferred size for ChartPanel and also the MaximumDrawWidth. Doing this leaves a lot of empty space between the Range Axis and the start of the plot (the first data point).

Is there anything like insets, offset that I should change? or is it something else?

PS: I am using Category chart

Thanks

Randeep

joolz
Posts: 56
Joined: Thu Nov 17, 2005 2:38 am
Location: Australia

Post by joolz » Mon Jun 23, 2008 5:26 am

I think domainAxis.setLowerMargin(0) will do what you want

vaji
Posts: 5
Joined: Wed Jun 04, 2008 8:50 am

Empty space between Range Axis and First Data Point

Post by vaji » Fri Jun 27, 2008 7:58 am

Dear all,

I am also having the same problem.
That is an empty space is there between the Range axis(For example Y axis ) and the first data point
I am using Area chart with Category Data set

Help needed!

Thanks& Regards
Vaji

chartgirl
Posts: 1
Joined: Thu Aug 27, 2009 5:24 pm
antibot: No, of course not.

Re: Empty Space in Chart Area between Axis and 1st Data Point

Post by chartgirl » Thu Aug 27, 2009 5:27 pm

Hi, Did you find a solution to this? I am having the same problem with the area chart. I want the first category to start right next to the y Axis but it is offset. There is also a gap after the last data point.

I've tried setting the margins and the bounds to 0 but it doesn't fix the problem.

Thanks!

amit_tanwani
Posts: 2
Joined: Wed Nov 19, 2014 6:18 am
antibot: No, of course not.

Re: Empty Space in Chart Area between Axis and 1st Data Poin

Post by amit_tanwani » Mon Nov 24, 2014 2:22 pm

plot.setAxisOffset(new RectangleInsets(0,0,0,0));

set rectangleinset according to get spacing thorugh axis .
your solution :) :) 8) :)

Locked