In dotnet everything is different from the windows versions.
It's so unclear. I work in delphi dotnet.
How can I get the seriesdata if I point at a seriesitem in the ganttchart?
I want the index of the record and the x(datevalue) and the y values.
Hans
Data from the series in ganttchart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hans,
Are you working in a VCL.NET project or a Delphi for .NET Windows Forms project? Anyway, you shouldn't have much problems, the code snippet below is in C# but can be easily ported to VCL.
Are you working in a VCL.NET project or a Delphi for .NET Windows Forms project? Anyway, you shouldn't have much problems, the code snippet below is in C# but can be easily ported to VCL.
Code: Select all
private void gantt1_Click(object sender, System.Windows.Forms.MouseEventArgs e)
{
int index=gantt1.Clicked(e.X,e.Y);
tChart1.Header.Text="Index: " + index.ToString() +
" Value: " + (DateTime.FromOADate(gantt1.XValues[index])).ToString() +
" - " + gantt1.YValues[index].ToString();
}
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 Hans,
It would be quite similar, you should use tChart's MouseMove event and implement something like:
It would be quite similar, you should use tChart's MouseMove event and implement something like:
Code: Select all
private void tChart1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
int index=gantt1.Clicked(e.X,e.Y);
if (index != -1)
tChart1.Header.Text="Index: " + index.ToString() +
" Value: " + (DateTime.FromOADate(gantt1.XValues[index])).ToString() +
" - " + gantt1.YValues[index].ToString();
else tChart1.Header.Text="";
}
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 Hans,
Those events don't have X and Y coordinates parameters to get the index you request with Clicked method.
Those events don't have X and Y coordinates parameters to get the index you request with Clicked method.
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 Hans,
You could manage to read values or so by manually getting mouse coordinates or capturing them from MouseMove event and using Clicked method as I showed you before. However, those events can also be used for other kinds of interaction as, for example, changing one series appearence when mouse being over it.
You could manage to read values or so by manually getting mouse coordinates or capturing them from MouseMove event and using Clicked method as I showed you before. However, those events can also be used for other kinds of interaction as, for example, changing one series appearence when mouse being over it.
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 |