JFreechart: Imposing continuous and dashed series line

180 Views Asked by At

I am using an XYStepRenderer to draw a graph with two series. One series is represented with a continuous line and the other is represented via a dashed line. The result is like this: enter image description here

Problem here is that at the right side of the graph, the continuous line completely hides the dashed line.

I would rather like the result to be like this (the dashed line is 'in front' and the gaps between the dashes are transparant): enter image description here

How can I do this with jfreechart.

Thanks for the assistance,

Frederik.

1

There are 1 best solutions below

0
On BEST ANSWER

It looks like you can do either of these:

  • Change the order of adding each XYSeries to the XYSeriesCollection, like they show here.

  • Change the order of calling setSeriesStroke(), like they show here and suggest here.