Page 1 of 1

Trouble with retrieving candleWidth

Posted: Fri Jul 12, 2013 4:12 pm
by Ryan Kitlitz
I'm fairly new to JFreeChart, and am having trouble finding the calculated candlewidth on my chart. I've searched the web, forums, javadocs, and sourcecode, but still cannot find my answer.

I'm trying to highlight a specified date on my chart with a ValueMarker, but I do not know how wide to make the marker (how big the Stroke is), because the candlewidth is dynamically generated based on the size of the chart. When I retrieve candlestickrenderer.getCandleWidth(), it returns -1 which means the width is dynamically calculated.

How do I retrieve the calculated width of my candlesticks, or how can I add a domainMarker to highlight a specified date or range of dates?

Here is a image of what I'm trying to accomplish:
http://www.wetpaintboulder.com/images/candlestick.jpg