Hi All,
Is there anyway to make the candles in the candlestickchart not to overlap with each other? I have a lot of data within the chart and want them to fit together nicely. And the gaps between the data are really anonying, is there anyway to turn them off?
Thanks and regards,
Wtw
Candles overlap in the candlestickchart
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The javadocs for the setCandleWidth(...) method in the CandlestickRenderer class say:
Give it a try.Javadocs wrote:If you set the width to a negative value, the renderer will calculate the candle width automatically based on the space available on the chart.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 8
- Joined: Tue Aug 30, 2005 10:42 am
The following will make a more suitable default for the auto-width-method:
Code: Select all
candlestickRenderer.setAutoWidthMethod(CandlestickRenderer.WIDTHMETHOD_SMALLEST);
erikvanoosten wrote:The following will make a more suitable default for the auto-width-method:
Code: Select all
candlestickRenderer.setAutoWidthMethod(CandlestickRenderer.WIDTHMETHOD_SMALLEST);
A word of warning: This is horribly horribly inefficient if there is anything above 1000 candles.