Hi,
is it possible to realize something like an "open curtain" with the cursortool (or anything else).
With two cursortools I select the area of interest the remaining areas of the chart are grayed (but transparent).
Please, see the picture to get my intention.
Moreover, it would be great to be able to move the area of interest with one mousemove.
Regards,
Josef
CursorTool
CursorTool
- Attachments
-
- Teechart.jpg (22.64 KiB) Viewed 5557 times
Re: CursorTool
Hi Josef,
You could use a TColorBandTool and change its StartValue and EndValue at OnMouseMove event.
Here it is a simple example:
You could use a TColorBandTool and change its StartValue and EndValue at OnMouseMove event.
Here it is a simple example:
Code: Select all
uses Series, TeeTools;
var ColorBand1: TColorBandTool;
rectWidth: Integer; //pixels
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
with ColorBand1 do
begin
StartValue:=Chart1.Axes.Bottom.CalcPosPoint(Round(X-rectWidth/2));
EndValue:=Chart1.Axes.Bottom.CalcPosPoint(Round(X+rectWidth/2));
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
rectWidth:=50;
with Chart1.AddSeries(TLineSeries) do FillSampleValues();
ColorBand1:=Chart1.Tools.Add(TColorBandTool) as TColorBandTool;
with ColorBand1 do
begin
Axis:=Chart1.Axes.Bottom;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |