Solution |
Following are a few tips on how to optimize the drawing speed of RChart
- use speed-optimized graphics drivers of the
manufacturer of your graphics card
- Do not mix colors: draw all items of one color, then
the next color, and so on. Changing the colors requires RChart to re-assign
various properties which slows it down considerably.
- Use DrawTo (instead of Line) for multi-segment lines. RChart
internally handles subsequent DrawTo segments as polylines which are faster to
draw.
- Set the property AutoRedraw to
FALSE. Many actions cause an automatic redraw which is redundant in many
situations. Setting AutoRedraw to
FALSE avoids these multiple redraws but prevents RChart from being updated.
Thus you have to call ShowGraf at your own after the chart has
been completed.
- Use ShowGrafNewOnly. This will update only those chart elements which have been entered to the
chart since the last call to ShowGraf.
- Reduce the number of displayed grid lines. Grid lines are rather costly as far as processing time is concerned.
- Avoid switching between active layers, since any switch of the active layer will result in an automatic redraw. If you cannot avoid repeated switching between layers, use the property SuppressPaint to suppress automatic repainting.
|