Page 1 of 1

Using ReferenceCanvas

Posted: Sat Apr 30, 2011 9:41 am
by 9336423
Hi,

I have been using TChart for years and have develloped a full GIS program that uses TChart as the basic drawing environment but the actual GIS data is contained in a huge database which uses the Axis and Canvas of a TChart to determine the drawing limits.

The entire mechanism is encapsulated in a TDrawingSeries which is descended from TSeries. Effectively, it is a GIS CAD program contained in a TSeries but still alows me to use other Tchart series on the same Chart.

Everything works fine but as the database increases in size, the drawing time increases proportionately and to make it worse, I have now have introduced dynamic objects which are tracked in real time. It is getting to be quite slow (although I can still drag a vector shoreline of the world containing millions of polylines around the screen in real time).

What I am experimenting with is using a background thread for my part of the drawing process which is interuptable, drawn in stages and rendered on demand or completion (if that makes any sense)

Essentially, What I want to do is

Grab The TChart Reference canvas (includes the axes et al)
Overlay my transparent bitmap containg the GIS CAD data (Exactly the same dimensions as the TChart)
Put it back on the Chart ... Without generating any redraw, i.e. Just Get, Ammend and Put.

I use Delphi2007, TChart7.12

not interested in .Net .... at All

Thanks

Re: Using ReferenceCanvas

Posted: Mon May 02, 2011 7:50 am
by narcis
Hi Phil,

You could try using asynchronous rendering as explained in the Real-time Charting article at http://www.teechart.net/reference/articles/index.php. It basically consists on setting AutoRepaint property to false and enable it when you want the chart to be refreshed.