Coloring strokes in OHLCSeries

129 Views Asked by At

In candlestick charts is common to draw candles' stroke color (green or red) according to if the stock is rising or falling. Example of standard candlestick chart:

enter image description here

But in JFreeChart OHLCSeries there is only one option to set the stroke...

XYItemRenderer renderer = chart.getXYPlot().getRenderer();
renderer.setSeriesPaint(0, Color.white);

...which is not enough for defining color of rising/falling candle separately.

Example of JFreeChart OHLCSeries:

enter image description here

Do you know a way to set a color for rising and falling candles separately?

0

There are 0 best solutions below