Hide weekend data in a 4 hour ohlc timeseries
Posted: Wed Apr 18, 2012 5:48 pm
I have a ohlc financial chart which updates every 4 hours with a new ohlc bar and removes the oldest bar from the series. My question is this, how do I hide the blank spaces left over the weekend time periods.
OHLCSeries series0 = new OHLCSeries("EURUSD "+legendTitle);
NumberAxis rangeAxis0 = new NumberAxis("EURUSD "+legendTitle);
rangeAxis0.setAutoRangeIncludesZero(false);
XYPlot subplot0 = new XYPlot(this.datasets[0], null, rangeAxis0, new CandlestickRenderer());
CandlestickRenderer r0 = new CandlestickRenderer();
subplot0.setRenderer(0,r0);
XYLineAndShapeRenderer cRender0 = new XYLineAndShapeRenderer(true,true);
subplot0.setRenderer(1, cRender0);
subplot0.setBackgroundPaint(Color.lightGray);
subplot0.setDomainGridlinePaint(Color.white);
subplot0.setRangeGridlinePaint(Color.white);
OHLCSeries series0 = new OHLCSeries("EURUSD "+legendTitle);
NumberAxis rangeAxis0 = new NumberAxis("EURUSD "+legendTitle);
rangeAxis0.setAutoRangeIncludesZero(false);
XYPlot subplot0 = new XYPlot(this.datasets[0], null, rangeAxis0, new CandlestickRenderer());
CandlestickRenderer r0 = new CandlestickRenderer();
subplot0.setRenderer(0,r0);
XYLineAndShapeRenderer cRender0 = new XYLineAndShapeRenderer(true,true);
subplot0.setRenderer(1, cRender0);
subplot0.setBackgroundPaint(Color.lightGray);
subplot0.setDomainGridlinePaint(Color.white);
subplot0.setRangeGridlinePaint(Color.white);