Hi,
I need a series which combines at least three different series types (fast line, high-low and area line). It wouldn't be a problem if only one would be active at once but I need to combine "the best" of all three. So I was thinking about developing my own type of series with some custom drawing to chart. I would use base chart under it because it's nice with all features but I would draw data on it with my own methods and approaches.
My first step would be drawing first to a memory bitmap and later drawing that bitmap to chart canvas (graphics double-buffering). When I should draw on canvas? Should I do that when on After Draw Graph is called? What is the best approach to draw some custom graphics on your chart?
Thanks for your ideas.
Kind regards.
Custom series drawing
Re: Custom series drawing
Hello,
OnBeforeDrawChart event
OnBeforeDrawAxes event
OnBeforeDrawSeries event
OnAfterDraw event
Basically, choosing one or another will make some elements on the chart to be drawn over your image, or none.
Also note that, if you create your series inheriting from TChartSeries, you'll be able to add any instance of this class to your chart as any other series (calling the chart's AddSeries(const ASeries:TChartSeries) function), and then your series' DrawAllValues override will be called (between the chart's OnBeforeDrawSeries and OnAfterDraw events above).
There are some different moments that could be interesting depending on your needs:PoLabs wrote:My first step would be drawing first to a memory bitmap and later drawing that bitmap to chart canvas (graphics double-buffering). When I should draw on canvas? Should I do that when on After Draw Graph is called? What is the best approach to draw some custom graphics on your chart?
OnBeforeDrawChart event
OnBeforeDrawAxes event
OnBeforeDrawSeries event
OnAfterDraw event
Basically, choosing one or another will make some elements on the chart to be drawn over your image, or none.
Also note that, if you create your series inheriting from TChartSeries, you'll be able to add any instance of this class to your chart as any other series (calling the chart's AddSeries(const ASeries:TChartSeries) function), and then your series' DrawAllValues override will be called (between the chart's OnBeforeDrawSeries and OnAfterDraw events above).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Custom series drawing
Thanks for fast reply and the idea. We will probably upgrade our license to Pro with source to see how it's done with existing series.
I am positively impressed with the rapidity and quality of your customer service as well. Keep on doing great work!
I am positively impressed with the rapidity and quality of your customer service as well. Keep on doing great work!
Re: Custom series drawing
Hello,
Don't hesitate to let us know if you find any problem
Thanks for the nice comments!PoLabs wrote:Thanks for fast reply and the idea. We will probably upgrade our license to Pro with source to see how it's done with existing series.
I am positively impressed with the rapidity and quality of your customer service as well. Keep on doing great work!
Don't hesitate to let us know if you find any problem
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |