Hi
Just a simple question - is it possible to drag a TColorBand?
I realize if the color band has been attached to a horizontal axis then either end of the color band be expanded/contracted. What I would like to do is drag the area horizontally across the chart without changing the extent of the band.
Bruce.
Dragging TColorBand
Re: Dragging TColorBand
Hi Bruce,
You can drag the start and end lines as below:
If you want to move both lines at the same time when clicking Down between the two lines and dragging, you could use the OnMouseDown, OnMouseUp and OnMouseMove event to do it manually.
You can drag the start and end lines as below:
Code: Select all
uses Series, TeeTools;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.AddSeries(TFastLineSeries).FillSampleValues();
with Chart1.Tools.Add(TColorBandTool) as TColorBandTool do
begin
Axis:=Chart1.Axes.Bottom;
StartValue:=5;
EndValue:=15;
ResizeStart:=true;
ResizeEnd:=true;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Dragging TColorBand
Hi Yeray
Thanks for the tip - I did what you suggested and I can now control the bands with the mouse.
Bruce.
Thanks for the tip - I did what you suggested and I can now control the bands with the mouse.
Bruce.
Re: Dragging TColorBand
Hi Bruce,
Great! I'm glad to hear it works as you want now.
Great! I'm glad to hear it works as you want now.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |