Trouble with retrieving candleWidth

Discussion about JFreeChart related to stockmarket charts.
Locked
Ryan Kitlitz
Posts: 2
Joined: Fri Jul 12, 2013 4:03 pm
antibot: No, of course not.

Trouble with retrieving candleWidth

Post by Ryan Kitlitz » Fri Jul 12, 2013 4:12 pm

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

Locked