I have a vertical cursor MyCursor (type TCursorTool) and have set the following statements in my program:-
MyCursor:=TCursorTool.Create(Self);
MyCursor.ParentChart:=Chart1;
MyCursor.Series:=Series1;
MyCursor.FollowMouse:=true;
MyCursor.Style:=cssVertical;
MyCursor.Visible:=true;
MyCursor.UseChartRect:=true;
MyCursor.snap:=true;
The manual cursor movement is fine. How does one force the cursor under program control to the last point in Series1. I need to do this so that the cursor highlights the most current data of stock prices.
Will appreciate ideas/suggestions.
Satish
Moving Cursor under Program Control
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Satish,
You should use:
However it doesn't work properly. I've done some testing and the why to get it work is:
It's weird but this is the combination that works by now. I've already introduced this to our deffect list to be fixed for our next releases.
You should use:
Code: Select all
MyCursor.XValue:=Series1.XValue[Series1.Count-1];
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues();
ChartTool1.XValue:=Series1.XValue[Series1.Count-1];
end;
procedure TForm1.Chart1BeforeDrawSeries(Sender: TObject);
begin
ChartTool1.XValue:=Series1.XValue[Series1.Count-1];
end;
Best Regards,
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Satish,
Are you positioning the cursor to the last value after populating the chart and at OnBeforeDrawSeries event for the other charts?
If you are doing this and still doesn't work please send un an application we can run "as-is" to reproduce the problem here. Please send your examples at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Are you positioning the cursor to the last value after populating the chart and at OnBeforeDrawSeries event for the other charts?
If you are doing this and still doesn't work please send un an application we can run "as-is" to reproduce the problem here. Please send your examples at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Best Regards,
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 |