I have a chart whith 4 line series
How can i open a popup when the user Right click or Shift-Right click and find the series and the point which is closer to it?????
And something else...
I read measurements from a database and draw them in a chart series I draw x,y values . Is it possible to have and an id stored in the chart so when the user selects a point in the chart to be able to find thiw measyrement by its id???? i dont want thiw id to be viewd by the user in thw chart...
Thanks in advanced....
Alex
Question about Right click on chart
Hi Alex,
1) How about using the OnClickPointer event of the Series ?
2) Well you could ideintify it by its index in the Series, as in the previous question, once the user clicks over any point, a valueindex is returned allowing you to search for the information about this point.
1) How about using the OnClickPointer event of the Series ?
Code: Select all
procedure TForm1.Series1ClickPointer(Sender: TCustomSeries; ValueIndex, X,
Y: Integer);
begin
showmessage(floattostr(sender.YValues.Value[Valueindex]));
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
1)The chart is created dynamicly by code
on every new lineseries i create how can i assign the onclickpointer event????
2) For the second question
I have the data id,x,y for every series in chart i give the values x,y to the chart and i want to be able or to store in the chart and the id of the points ( database table id and not chart series id) so i cant call a query to find the record for the point from the database
on every new lineseries i create how can i assign the onclickpointer event????
2) For the second question
I have the data id,x,y for every series in chart i give the values x,y to the chart and i want to be able or to store in the chart and the id of the points ( database table id and not chart series id) so i cant call a query to find the record for the point from the database
Hi.
Re #1: Yes, sure, you can assign the OnClick event to dynamically created series. Something like this should work fine:
Re #2: You could use series XLabels string array for storing the id's, or alternatively, derive new custom series from point series and add another TChartValueList (idlist) to it. I'd go with the first solution as it's far simpler and requires no extra coding.
Re #1: Yes, sure, you can assign the OnClick event to dynamically created series. Something like this should work fine:
Code: Select all
procedure TForm1.Series1ClickPointer(Sender: TCustomSeries; ValueIndex, X,
Y: Integer);
begin
ShowMessage(floattostr(Sender.YValues.Value[Valueindex]));
end;
procedure TForm1.AddSeries;
var i:Integer;
begin
Chart1.FreeAllSeries;
for i:=0 to 3 do
begin
Chart1.AddSeries(TPointSeries);
(Chart1[i] as TPointSeries).OnClickPointer := Series1ClickPointer;
end;
end;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Clicked Point Mark
Hi,
I use D7 and TeeChart707.
I have a line Series Graph, and I show the points in the series.
How can I show only the clicked point mark?
With ShowMessage the OnclickSeries works, but when I try to show only the clicked point mark, it doesn't work.
And ideas?!
Thanks,
Livia
I use D7 and TeeChart707.
I have a line Series Graph, and I show the points in the series.
How can I show only the clicked point mark?
With ShowMessage the OnclickSeries works, but when I try to show only the clicked point mark, it doesn't work.
And ideas?!
Thanks,
Livia
Hi Livia,
The easiest way to achieve this is using the "Mark Tips Tool" and probably you would like to set it as follows:
The easiest way to achieve this is using the "Mark Tips Tool" and probably you would like to set it as follows:
Code: Select all
ChartTool1.MouseAction := mtmClick;
ChartTool1.MouseDelay := 0;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |