Is there a way to turn this behavior off?
Attached is an example (I included the source code too below) that shows this behavior in the newer versions of TeeChart. Just click on the button to populate the cart, and then hover over the lines to see the jiggling:
---------------------
Code: Select all
unit TeeTest;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VclTee.TeeGDIPlus, VCLTee.TeEngine,
Vcl.ExtCtrls, VCLTee.TeeProcs, VCLTee.Chart, VCLTee.Series, Vcl.StdCtrls;
type
TForm2 = class(TForm)
Chart1: TChart;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure FillLineChart(ReloadDataOnly : Boolean);
procedure LineSeriesMouseEnter(Sender: TObject);
procedure LineSeriesMouseLeave(Sender: TObject);
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
filllinechart(true);
end;
procedure TForm2.FillLineChart(ReloadDataOnly : Boolean);
var
iRow, iCol : integer;
pSeries :TLineSeries;
begin
Chart1.Axes.Bottom.Title.Caption := ' ';
for iRow := 0 to 6 do begin
pSeries := TLineSeries.Create ( Chart1 );
pSeries.LinePen.Width := 2;
pSeries.ParentChart := Chart1;
pSeries.Title := 'Series' + intToStr(iRow);
pSeries.XValues.DateTime := FALSE;
pSeries.OnMouseEnter := LineSeriesMouseEnter;
pSeries.OnMouseLeave := LineSeriesMouseLeave;
for iCol := 0 to 6 do
pSeries.AddXY(iCol,icol + iRow, 'Point' + intToStr(iCol), clTeeColor);
end;
end;
procedure Tform2.LineSeriesMouseEnter(Sender: TObject);
var
ALineSeries : TLineSeries;
begin
ALineSeries := TLineSeries(Sender);
Chart1.Axes.Bottom.Title.Caption := ALineSeries.Title;
ALineSeries.LinePen.Width := 8;
end;
procedure Tform2.LineSeriesMouseLeave(Sender: TObject);
var
ALineSeries : TLineSeries;
begin
ALineSeries := TLineSeries(Sender);
Chart1.Axes.Bottom.Title.Caption := ' ';
ALineSeries.LinePen.Width := 2;
end;
end.