Hi
I would like to add a tooltip to the bottom axis labels so that if the mouse is above a label I will present some data. The labels are vertical.
I did a test with a graph with 25 labels on the x axis , using the Chart.Axes.Bottom.Labels.Clicked to check which label the mouse is on.
I found several problems
1. it returns a valid index only when the mouse is on part of the label . on other parts of the label it returns -1.
2. it returns wrong indexes. the indexes seem to be from top to bottom ..e the first label on the left returns 21, the second is 20 the third is 19 etc. instead of 0, 1 ,2 . The last 3 return -1. Also sometimes I get a vaild index inbetween labels and -1 on the label itself
In short it doesnt seem that the Clicked is accurate or maybe there is a different way to test the labels.
I also tested it on other graphs with less labels and I see the same inacurracy problem .
Please Help
Thanks
Ryan.[/img]
Chart.Axes.Bottom.Labels.Clicked problem
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ryan,
a) Labels are drawn downwards therefore right-most lables have lower indexes and viceversa. IIRC this is by design.
b) Bug in question 1 makes this worse as only a subset of all points labels are displayed.
This is a bug, it calculates Clicked method as if Labels.Angle was set to zero. I've added this (TF02013505) to the bug list to be fixed.1. it returns a valid index only when the mouse is on part of the label . on other parts of the label it returns -1.
There are two thinks here:2. it returns wrong indexes. the indexes seem to be from top to bottom ..e the first label on the left returns 21, the second is 20 the third is 19 etc. instead of 0, 1 ,2 . The last 3 return -1. Also sometimes I get a vaild index inbetween labels and -1 on the label itself
a) Labels are drawn downwards therefore right-most lables have lower indexes and viceversa. IIRC this is by design.
b) Bug in question 1 makes this worse as only a subset of all points labels are displayed.
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 |