Retrieving Values

Hi,

 
i have a simple question I'm having trouble finding the answer to.  I want to click on a data point and get the value.  I tried the MouseDown, and I see there is a "Value" variable returned but it is not the exact value of the data in the series.  It's always slightly higher.  I was assuming the "Value" was the value of the data point but it appears it is not.
 
Thanks,
 
Dexter
Hi, 

You can use  AdvChartView1.XYToSeriePoint() to return the closest value at the mousedown X and Y position.

Regards, 
Scheldeman Pieter

Hi Pieter,

 
Thanks for the reply.
 
What I want to be able to do is click on the bar and be able to get the actual value in the series.  The function below appears to return coorindates but it always returns [-1,-1] for me. 
 
Thanks,
 
Dexter
 
procedure TDashboard.DBAdvGDIPChartView1SerieMouseDown(Sender: TObject;
  Button: TMouseButton; PaneIndex, SerieIndex, Index: Integer;
  value: Double; X, Y: Integer);
var
  ct: TChartSeriePoint;
begin
  CT := DBAdvGDIPChartView1.XYToSeriePoint(X,Y,PaneIndex);
 

Hi,

 
Here is what I was looking for.  Just in case it helps anyone else.
 
I have a multi series bar chart.  The user wants to be able to click on the bar to retrieve the series value at that location so we can pop up some customized messages depending on the value.  What I got to work was:
 
procedure TForm1.DBAdvGDIPChartView1SerieMouseDown(Sender: TObject;
  Button: TMouseButton; PaneIndex, SerieIndex, Index: Integer;
  value: Double; X, Y: Integer);
var
  dPointValue : Double;
begin
  dPointValue := DBAdvGDIPChartView1.Panes[0].Series[SerieIndex].Points[index].SingleValue;
  Showmessage('The value at this location is '+floattostr(dPointValue));
end;
 
You have to click on the Marker but that's ok.
 
Thanks,
 
Dexter