Special typ of line diagramm

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
DerPe
Posts: 12
Joined: Mon Aug 14, 2017 10:00 am
antibot: No, of course not.

Special typ of line diagramm

H guys,

I would like to have a XY diagramm where the Y values are connected like the following sketch (sorry, i could not manage to upload a image here since I do not know how to do that).

*---------------------------
,,,,,,,,,,,,,,,,,,,,,,,,, -
,,,,,,,,,,,,,,,,,,,,,,,,, -
,,,,,,,,,,,,,,,,,,,,,,,,, -
,,,,,,,,,,,,,,,,,,,,,,,,, *-----------
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*-----------------------------------------------------

So the * are the data points and there should be a horizontal line until the x value of the next data point. And from that point there should be a vertical line to the next *.
What type of diagramm do I have to choose for that? Thanks in advance.

EDIT: Sorry somehow the empty gaps are eliminated automatically by this forum this is why the sketch does not look as it should look. So I had to insert , (just see the , as empty space). Really sorry for this poor looking diagramm. I hope you get what I am talking about

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

Re: Special typ of line diagramm

Is it something like this, which uses the XYStepRenderer class?

https://github.com/jfree/jfreechart/blo ... Sample.png
David Gilbert

Check out other products sold by my company Object Refinery Limited

DerPe
Posts: 12
Joined: Mon Aug 14, 2017 10:00 am
antibot: No, of course not.

Re: Special typ of line diagramm

Yes I was searching exactly for a XYStepRenderer. Now a follow up question: How can I display a barchart with 3 axis: X,Y,Z. This means I want to have a conventionale XY chart for every Z, making the chart 3 dimensional. How can this be done?

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

Re: Special typ of line diagramm

For 3D bar charts, I use Orson Charts:

https://github.com/jfree/orson-charts
David Gilbert

Check out other products sold by my company Object Refinery Limited

DerPe
Posts: 12
Joined: Mon Aug 14, 2017 10:00 am
antibot: No, of course not.

Re: Special typ of line diagramm

Can I just use Orson charts just like the JFreeChart classes and just adjust the type of diagramm in the code or do I have to set up completely new classes for my applications. If this is the case is there any example code for Orson Charts?

And another question: I noticed that somehowe the files "orsoncharts-1.4-eval-nofx.jar" and "orsonpdf-1.6-eval.jar" are in my java build path (I do not know how they got there; maybe trough JFreeCharts?). Now I downloaded the zip file from http://www.object-refinery.com/orsoncharts/index.html and here in the folder lib you find the files "orsoncharts-1.6.jar" and "orsonpdf-1.7.jar" among others. My question now is, whether I should just insert the jar-files from the dowloaded zip into the Java Build Path without deleting the already existing jar-files?

DerPe
Posts: 12
Joined: Mon Aug 14, 2017 10:00 am
antibot: No, of course not.

Re: Special typ of line diagramm

Hi,

now I inserted the jars into my build path and I have it worked.

I have a question about how to use orsonchart: I have 2000 of the below mentioned diagramms, stored as (X,Y) datapoints for a XYStepRenderer chart (in jFreeChart). Now I would like to have a such a diagramm for every z point in Orson. Do I need a XYZSeriesCollection and a SurfaceRenderer Chart? In the Chart3DFactory class there is the method: createSurfaceChart which needs a Function3D as a parameter. But in my chase I don't have a real function. How can I deal with that?