I have a fancy looking long-term trend with a TScrollpagerTool. On slower machines, scrolling around is not quite smooth. Because of that, I'd like to block auto-repainting the main chart until the mousebutton is released.
Is that possible?
TScrollpagerTool - Can I delay repainting of the main chart?
-
- Newbie
- Posts: 60
- Joined: Fri Nov 22, 2013 12:00 am
Re: TScrollpagerTool - Can I delay repainting of the main chart?
Hi Jens,
The problem is you can't repaint the chart below, the subchart, without repainting the main chart.
So you can do this, but this way you don't see where are you dragging the ColorBand below until you release the mouse:
The problem is you can't repaint the chart below, the subchart, without repainting the main chart.
So you can do this, but this way you don't see where are you dragging the ColorBand below until you release the mouse:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
ChartTool1.SubChartTChart.OnMouseDown:=ScrollChartMouseDown;
ChartTool1.SubChartTChart.OnMouseUp:=ScrollChartMouseUp;
end;
procedure TForm1.ScrollChartMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer);
begin
Chart1.AutoRepaint:=false;
end;
procedure TForm1.ScrollChartMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer);
begin
Chart1.AutoRepaint:=false;
Chart1.Draw;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 60
- Joined: Fri Nov 22, 2013 12:00 am
Re: TScrollpagerTool - Can I delay repainting of the main chart?
Understood, thanks.
Re: TScrollpagerTool - Can I delay repainting of the main chart?
Hi Jens,
Another alternative would be using two independent TChart, place one above the other, add a series on one of them, clone it on the other, add a colorband tool at the chart on the bottom and use the events to synchronize both charts as you wish.
Another alternative would be using two independent TChart, place one above the other, add a series on one of them, clone it on the other, add a colorband tool at the chart on the bottom and use the events to synchronize both charts as you wish.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 60
- Joined: Fri Nov 22, 2013 12:00 am
Re: TScrollpagerTool - Can I delay repainting of the main chart?
Yes, I also thought of that. But I'm lazy. Why would I do that if I can also lean back, just use a TScrollpagerTool and let TeeChart do the work?
I probably should rather investigate the performance issue for this chart than trying to make it less obvious. Thanks for your help, as always.
I probably should rather investigate the performance issue for this chart than trying to make it less obvious. Thanks for your help, as always.