[Lazarus] TAChart CandleStick Chart

Werner Pamler werner.pamler at freenet.de
Tue Sep 16 21:09:11 CEST 2014

In r46244 the TOpenHighLowCloseSeries has a new property "Mode": 
selection "mOHLC" does the standard painting as before while 
"mChandleStick" paints the candlesticks that you requested. Since your 
code was mostly a copy of existing code I decided to stick to the old 
series type, but just add the painting modes. There are also properties 
"CandleStickUpBrush", "CandleStickDownBrush" and "CandleStickLinePen" to 
control painting of the up and down bars and the border and shadow line. 
I also added a little demo "financial" to the "demo" folder of the 
TAChart installation which demonstrates both modes. It would be nice if 
you could have a look if everything is fine - I'm not an expert in 
financial charts.

I also fixed the bug which ignored the true minimum of the data - 
therefore, it is no longer necessary to calculate the minimum by 
yourself, just have a look at the code in the demo project. And, 
finally, I modified the AddXOHLC method such that it automatically 
initializes the size of the YCount of the chart source if the current 
size would not be enough.

More information about the Lazarus mailing list