Continuous line throughout the whole domain axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Stacey
Posts: 15
Joined: Tue Jan 27, 2004 5:09 pm

Continuous line throughout the whole domain axis

Post by Stacey » Fri Jun 03, 2005 7:06 pm

I am using a StandardXYItemRenderer with TimeSeries data. I would like to be able to show, for example a domain date range of one day. If there is only one or two values that happen to be in that date range then I would like the line to be drawn continuously from the begining of the date (the left axis) all the way to the end of the date (the right axis). Is there anyway to do this?

It would be similar to the ValueMarker on a plot, only there could be more than one value.

Thanks,
Stacey

Stacey
Posts: 15
Joined: Tue Jan 27, 2004 5:09 pm

Post by Stacey » Mon Jun 06, 2005 8:55 pm

Has anybody ever attempted this sort of 'marker' on a chart? Is it possible? Any comments, thoughts are greatly appreciated!

thanks again,
Stacey

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 » Mon Jun 06, 2005 9:35 pm

I'm not 100% sure what you mean, but it sounds like two options would be:

(1) Add extra data items at the start and end of the day's data to make the renderer draw the line for the whole day;

(2) Customise the renderer to extend the line from the known data points to the start and end of the day.
David Gilbert
JFreeChart Project Leader

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

Belmonte

drawing a LineRenderer from the axis origin?

Post by Belmonte » Thu Jan 12, 2006 10:01 pm

Hello:
At this momment Im using a CategoryPlot with 2 different datasets and 2 different renderers, first one a BarRenderer and second one a LineRenderer. Both datasets have the same item numbers with the same category (in this case dates, more particular, months).

I'm trying to draw the line from the origin of the chart. I mean, I want the plot to draw the line segment from the left margin of the chart, for instance at value 0 of the axis, to the first data value. Could it be possible?

My english it's basic and maybe this schema could be help to understand what I want to do. I have the data series marked with the 'x' and the related bar value on the other dataset. I want to plot the first segment from the origin to the first line value without adding a previous invented element with a 0 value. I tried this way but I need the same item number on both datasets to overlap perfectly. With differents elements number I was unable to map the second renderer (LineRenderer) into the unique DomainAxis of the chart (mapDatasetToDomainAxis(index dataset, index domain axis)), causing the line to plot centered on the chart without any link with the domain axis labels or categories.

| x_
| / \_ x
| / ___ __
|/__|__|_|__|___
|

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 » Fri Jan 13, 2006 12:43 pm

David Gilbert
JFreeChart Project Leader

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

Locked