Code: Select all
FormatFloat('# ###,##0',(Round(aChart.CustomAxes.Items[i].CalcPosPoint(Y)))
tahnks in advance for any help
Code: Select all
FormatFloat('# ###,##0',(Round(aChart.CustomAxes.Items[i].CalcPosPoint(Y)))
Code: Select all
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var YVal: Double;
Index: Integer;
begin
YVal := Chart1.Axes.Left.CalcPosPoint(Y);
Index := Series1.YValues.Locate(YVal);
if Index <>-1 then
Chart1.Title.Text[0]:=Series1.Labels[Index];
end;
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Code: Select all
Axis.Items.Add(0, 'AAA');
Axis.Items.Add(1, 'BBB');
Code: Select all
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var YVal: Double;
i: Integer;
begin
YVal := Chart1.Axes.Left.CalcPosPoint(Y);
for i:=0 to Chart1.Axes.Left.Items.Count - 1 do
begin
if Chart1.Axes.Left.Items[i].Value = YVal then
Chart1.Title.Text[0]:=Chart1.Axes.Left.Items[i].Text;
end;
end;
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Code: Select all
uses Math, Types;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.Axes.Left.Items.Clear;
for i:=-5 to 5 do
begin
Series1.Add(i);
Chart1.Axes.Left.Items.Add(i, 'Point ' + IntToStr(i));
end;
end;
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var YVal: Double;
i: Integer;
begin
YVal := Chart1.Axes.Left.CalcPosPoint(Y);
for i:=0 to Chart1.Axes.Left.Items.Count - 1 do
begin
if CompareValue(Chart1.Axes.Left.Items[i].Value,YVal,0.1)=EqualsValue then
Chart1.Title.Text[0]:=Chart1.Axes.Left.Items[i].Text;
end;
end;
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |