Hello !
I want some "animation/highlighting" in the chart.
For example click on axis -> axis gets red.
This in easy to program. The problem is, that any propery changing forces a complete redraw. This is for large data charts to slow.
So my next idear was to make the animation not in the chart but
with a control (TShape) over the chart.
But moving a control over the chart forces a redraw of the chart, too.
Why uses the InvalidateRect function.
not the yet draw bitmap but redraws the full vector graphic?
Next idear was to copy the chart after every redraw
with TeeCreateBitmap in an image and "animate" this image.
But this is slow, too. TeeCreateBitmap redraws the chart, too.
So my question is how can force that the chart image is fixed
when I mover some controls over it (InvalidateRect per stored bitmap)
or
How can I copy the current show chart in an bitmap very fast.
Thanks
Andreas
Redraw slow on complex charts
Hi Andreas,
If your chart is being repainted more times than you wish, try setting AutoRepaint to false and, when you need to repaint it, set it to true and call Chart1.Refresh.
If your chart is being repainted more times than you wish, try setting AutoRepaint to false and, when you need to repaint it, set it to true and call Chart1.Refresh.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Redraw slow on complex charts
Hello Yeray !
Yes, I know the AutoRepaint property.
If it is off it avoids a redrawing if any property of the chart has changed.
But it does not avoid the repainting if I move a window or a control over it!
I made an experiment:
I have a TPanel which can I resize over the chart with the mouse
(like the zoomrect)
If the Panel gets larger there is no repaint need and the resizing is fast,
but if it gets smaller the new shown chart area must refreshed and resizing is slow.
So I want a quick InvalidateRect function which does not redraws chart
areas with the slow vector drawing but with simple bitmap copy.
I hope you understand what I mean.
A solution would be if I can get the current bitmap of the chart,
hide the chart and show instead of it its bitmap.
But I find no fast procedure the get the current charts bitmap.
TeeCreateBitmap is slow because it makes afull redraw of the whole
chart in a bitmap.
Chart->Canvas is a 3DCanvas so that I cannot use the common
canvas copy function, etc.
Has anybody an idear, how to do this task?
Bye
Andreas Weichert
Yes, I know the AutoRepaint property.
If it is off it avoids a redrawing if any property of the chart has changed.
But it does not avoid the repainting if I move a window or a control over it!
I made an experiment:
I have a TPanel which can I resize over the chart with the mouse
(like the zoomrect)
If the Panel gets larger there is no repaint need and the resizing is fast,
but if it gets smaller the new shown chart area must refreshed and resizing is slow.
So I want a quick InvalidateRect function which does not redraws chart
areas with the slow vector drawing but with simple bitmap copy.
I hope you understand what I mean.
A solution would be if I can get the current bitmap of the chart,
hide the chart and show instead of it its bitmap.
But I find no fast procedure the get the current charts bitmap.
TeeCreateBitmap is slow because it makes afull redraw of the whole
chart in a bitmap.
Chart->Canvas is a 3DCanvas so that I cannot use the common
canvas copy function, etc.
Has anybody an idear, how to do this task?
Bye
Andreas Weichert
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Andreas,
Could you please send us a prototipe we can run "as-is" so that we can investigate the issue here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a prototipe we can run "as-is" so that we can investigate the issue here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Redraw slow on complex charts
Hello Narcís!
I found the reason.
If a cursor tool is active, moving shapes over the chart
forces a full redraw.
I have downloaded the file chartspeedtest.zip to you upload server.
It is a c++ - MDIForm.
I have made my own cursortool with 2 line shapes and all is fast, now
Bye
Andreas
I found the reason.
If a cursor tool is active, moving shapes over the chart
forces a full redraw.
I have downloaded the file chartspeedtest.zip to you upload server.
It is a c++ - MDIForm.
I have made my own cursortool with 2 line shapes and all is fast, now
Bye
Andreas
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Andreas,
Thanks for the information.
In that case TeeChart Pro VCL would probably need FastCursor property for TCursorTool as TeeChart for .NET has. I'll add this to the wish-list to be included in future releases.
Thanks for the information.
In that case TeeChart Pro VCL would probably need FastCursor property for TCursorTool as TeeChart for .NET has. I'll add this to the wish-list to be included in future releases.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |