public void draw(IChartMetrics<Date, Double> metrics, GC gc) {
if (timeSeries != null && !timeSeries.isEmpty() && pointRenderer != null) {
IAxis<Date> xAxis = metrics.xAxis();
for (ISeriesPoint<Date, Double> point : timeSeries) {
if (point instanceof IOHLC) {
IOHLC ohlc = (IOHLC) point;
if (xAxis.isValid(point.getIndex())) {
pointRenderer.setPointValues(point.getIndex(), ohlc.getOpen(), ohlc.getHigh(), ohlc.getLow(), ohlc.getClose());
pointRenderer.draw(metrics, gc);
lastPointRendered = ohlc;
}
} else {
throw new IllegalArgumentException("Only series of " + IOHLC.class.getName() + " points accepted");