Tchartでグラフを作成していて、seriesの色を変える処理があるのですが、
色を変える旅に再描画が実行されて処理が遅いので
Tchartのautorepaintプロパティをfalseにして、必要な時のみにrepaintメソッドを呼び出しているのですが、repaintメソッドが実行されてないみたいです。
autorepaintをfalseにしているのが原因なのでしょうか?
> autorepaintをfalseにしているのが原因なのでしょうか?
マニュアルを見ると、
Setting AutoRepaint to False will not refresh the Chart display until we manually call the Chart1.Repaint method.
だそうです。
なお、マニュアルには、
Example:
Chart1.AutoRepaint := False;
try
Chart1.Gradient.Color:=clBlue;
...
Series1.Add( 123, 'Hello world', clRed );
...
finally
Chart1.AutoRepaint := True;
end;
とありますので、このような使い方をしてみるのは、いかがですか?
なるほどマニュアルを見直して試してみます!
ツイート | ![]() |