Imposing continuous and dashed series line

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
frdbacke
Posts: 2
Joined: Mon Jun 22, 2015 10:25 am
antibot: No, of course not.

Imposing continuous and dashed series line

Post by frdbacke » Mon Jun 22, 2015 11:04 am

Hello,

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:
Image

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):
Image

How can I do this with jfreechart.

Thanks for the assistance,

Frederik.

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

Re: Imposing continuous and dashed series line

Post by paradoxoff » Mon Jun 22, 2015 8:55 pm

Apparently you have configured the renderer to draw the first series (which is renderer first) as a dashed line and the second (which is drawn on top of the first) as a continuous line. The simplest solution would be to swap the line style in the renderer, so that the first is drawn as a continuous line and the second as a dashed line.

frdbacke
Posts: 2
Joined: Mon Jun 22, 2015 10:25 am
antibot: No, of course not.

Re: Imposing continuous and dashed series line

Post by frdbacke » Tue Jun 23, 2015 7:22 am

Thanks for the tip, I'll give that a try.

Locked