draw series on the edge of chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
fitrianadz
Posts: 4
Joined: Mon Jun 19, 2017 10:13 am
antibot: No, of course not.

draw series on the edge of chart

Post by fitrianadz » Mon Jun 19, 2017 10:19 am

I have problem when draw only one series. in my case, I have one series with data item such are [[0. 1], [0. 2], [0. 3], [0. 4], [0. 5], [0. 6], [0. 7], [0. 8]]. when I run the program, why is that series is on center of chart? Can I make that series is on the edge of chart? Please help me. Thank you :)

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: draw series on the edge of chart

Post by paradoxoff » Tue Jun 20, 2017 6:02 pm

JfreeChart does its best to determine suitable ranges for the ValueAxes of an XYPlot. If the value range from the dataset is from 0 to 0 (as in your case), JFreeChart expands that range to the minimum (10e-8), and places the value range symmetrically in the minimum range.
What kind of behaviour do you need? What is the upper value for the x axis that you want?

fitrianadz
Posts: 4
Joined: Mon Jun 19, 2017 10:13 am
antibot: No, of course not.

Re: draw series on the edge of chart

Post by fitrianadz » Tue Jul 04, 2017 3:05 am

I want to show you a chart as I want by image. but sorry, I can't insert an image to this message. When I click "Img" button, only this message shown "[img][\img]". And I have no Idea what should I do next :(

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

Re: draw series on the edge of chart

Post by david.gilbert » Tue Jul 04, 2017 5:58 am

Inside the image tag you need to put a URL for your image. It is necessary for you to upload the image to some external hosting site, since we don't host the images on our server.

One way to get your data values to show more to the left of the chart would be to set the x-axis range manually. Another would be to specify the upper margin on the axis to be some value much larger than the lower margin (both default to 0.05 or 5 percent).
David Gilbert
JFreeChart Project Leader

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

fitrianadz
Posts: 4
Joined: Mon Jun 19, 2017 10:13 am
antibot: No, of course not.

Re: draw series on the edge of chart

Post by fitrianadz » Tue Jul 04, 2017 7:14 am

thank you so much mr. david. I've tried that way and it worked

Locked