candlestick volume not plotted with correct value

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Karthicks
Posts: 20
Joined: Wed Mar 26, 2003 1:29 pm
Location: Chennai , India

candlestick volume not plotted with correct value

Post by Karthicks » Wed Sep 27, 2006 10:00 am

Hi ,

In CandleStickChart volume is not rendered properly. If i provide a vlaue 0f 100 it plots a bar up to 60 only. I found that in candlestick renderer you compute volume bar height to different value based on maximm and minimum value in the given volume data.
Why this computaion and plotting. Do I wrong about candle stock renderer? Is it the corect way to plot candle stick chart?

Please do clarify me , this point blocks me from using volume in my candle stick chart.

Version I use is of JFreeChart1.0.2 ,

Thanks & regards ,
S.Karthick

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu Sep 28, 2006 11:21 am

I think the renderer has a facility for drawing the volume in the background - I don't think it uses the axis scale, though.

A better approach would be to put the volume data in a separate dataset, and plot it against a second axis using an XYBarRenderer - see the PriceVolumeDemo in the JFreeChart Developer Guide for an example (you could replace the line renderer with a candlestick renderer).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked