dashed line in Jfreechart
Asked Answered
B

1

9

Does anybody knows how to draw a vertical dashed line in Jfreechart at some given coordinates ?

Thanks

Bukhara answered 10/5, 2009 at 9:13 Comment(0)
T
23

Example 5 shows a series of dashed lines for a chart. Set your stroke thus:

plot.getRenderer().setSeriesStroke(
    0, 
    new BasicStroke(
        2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
        1.0f, new float[] {6.0f, 6.0f}, 0.0f
    )

and you'll need to set your dataset to simply reference the coordinates of your vertical line.

Thermel answered 10/5, 2009 at 11:10 Comment(1)
you could add );Fading

© 2022 - 2024 — McMap. All rights reserved.