Hello!
I'm presenting data in a 3-D view. I add "Items" with DataSeries.AddXYZ(...) and this works fine.
Now I want to add an "Information text" for each "Item", and when you hover over the point with the mouse I want to present the "Information text" in a TEditBox...
Can this be done? I cant find any AddXYZ(X, Y, Z, 'Text') function!? And I can't find how to set an OnEnter event on the Items.
Best regards, Mikael
Click on TPoint3DSeries item
Re: Click on TPoint3DSeries item
Hello Mikael,
There's an AddXYZ(X, Y, Z, 'Text', Color) function:Lenfors wrote:I cant find any AddXYZ(X, Y, Z, 'Text') function!?
Code: Select all
Function TCustom3DSeries.AddXYZ(Const AX,AY,AZ:TChartValue;
Const AXLabel:String; AColor:TColor):Integer;
This works fine for me here:Lenfors wrote:And I can't find how to set an OnEnter event on the Items.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.OnMouseEnter:=Series1MouseEnter;
Series1.OnMouseLeave:=Series1MouseLeave;
end;
procedure TForm1.Series1MouseEnter(Sender: TObject);
var ValueIndex: Integer;
ZVal: Double;
begin
ValueIndex:=Series1.Clicked(Chart1.GetCursorPos);
if ValueIndex>-1 then
Edit1.Text:='ValueIndex: ' + IntToStr(ValueIndex) + ', XValue: ' + FormatFloat('', Series1.XValue[ValueIndex]) +
', YValue: ' + FormatFloat('', Series1.YValue[ValueIndex]) + ', ZValue: ' + FormatFloat('', Series1.ZValue[ValueIndex]) +
', Label: ' + Series1.Labels[ValueIndex];
end;
procedure TForm1.Series1MouseLeave(Sender: TObject);
begin
Edit1.Text:='';
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |