Page 1 of 1

OnClickSeries triggers on start zooming

Posted: Tue Jul 21, 2009 1:26 pm
by 9347441
Hi,
we're using TeeChart 7.08 on BDS2006 (Delphi). We got a Chart with a OnClickSeries event. The user also can use zoom using the Shift key (Chart.Zoom.KeyShift = [ssShift]). But when the user starts zooming on a series the OnClickSeries event is triggered. I think TeeChart should zoom whereever the cursor is when you using the KeyShift property. Is this a bug? Is there a way to fix that?

Re: OnClickSeries triggers on start zooming

Posted: Tue Jul 21, 2009 2:40 pm
by yeray
Hi CTgmbh,

I'm not able to reproduce the problem if I understood it well. I've added a line series to a chart and the following code:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.Zoom.KeyShift := [ssShift];
end;

procedure TForm1.Series1Click(Sender: TChartSeries; ValueIndex: Integer;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  Chart1.Title.Text.Text := 'series clicked!';
end;

procedure TForm1.Chart1Zoom(Sender: TObject);
begin
  Chart1.Title.Text.Text := 'Chart zoomed!';
end;

procedure TForm1.Chart1UndoZoom(Sender: TObject);
begin
  Chart1.Title.Text.Text := '';
end;

procedure TForm1.Chart1Click(Sender: TObject);
begin
  Chart1.Title.Text.Text := '';
end;
And I can zoom using shift key wherever I start to draw the Zoom rectangle.