Special typ of line diagramm

A discussion forum for JFreeChart (a 2D chart library for the Java platform).

Special typ of line diagramm

Postby DerPe » Fri Nov 17, 2017 11:36 am

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
DerPe
 
Posts: 12
Joined: Mon Aug 14, 2017 10:00 am

Re: Special typ of line diagramm

Postby david.gilbert » Sat Nov 18, 2017 6:54 am

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

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

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited
david.gilbert
JFreeChart Project Leader
 
Posts: 11653
Joined: Fri Mar 14, 2003 10:29 am

Re: Special typ of line diagramm

Postby DerPe » Sun Nov 19, 2017 4:29 pm

Thanks david.gilbert for your answer,

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?
DerPe
 
Posts: 12
Joined: Mon Aug 14, 2017 10:00 am

Re: Special typ of line diagramm

Postby david.gilbert » Sun Nov 19, 2017 11:34 pm

For 3D bar charts, I use Orson Charts:

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

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited
david.gilbert
JFreeChart Project Leader
 
Posts: 11653
Joined: Fri Mar 14, 2003 10:29 am

Re: Special typ of line diagramm

Postby DerPe » Wed Nov 22, 2017 5:47 pm

Thanks david.gilbert for your answer,

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

Re: Special typ of line diagramm

Postby DerPe » Fri Nov 24, 2017 4:15 pm

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?
DerPe
 
Posts: 12
Joined: Mon Aug 14, 2017 10:00 am


Return to JFreeChart

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 11 guests