Hi,
Can we have tooltips for any annotations that we add to the chart.
If not, can we ge the rendered annoation HTML element when the chart is renedered to the client - so that I can add tooltip using Javascript?
Thanks a lot.
Hello sandy_joggy,
I am looking into this matter to see if it is possible to have tooltips for annotations on the chart.
I will give you a progress update concerning this matter by the end of the day Wednesday.
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com
I am still researching this matter. From what I can tell you are unable to directly set tooltips for the annotations. I am currently looking into how you can get the rendered html for the annotation or an alternate method to get tooltips for annotations. I will give you a progress update by the end of the day Tuesday.
Thanks Mike. Looking forward to hear from you.
There is also another related thing - can we add tooltips to Text objects that we add to scenegraph object. So if I have the following code:
Text label = new Text();label.SetTextString("Some label");e.SceneGraph.Add(label);
Can I add tooltip for the label object above?
Thanks a lot in advance.
It's possible to show custom tooltip for any annotation you add in chart. In order to do so, you have to modify the properties of the annotation primitive in a FillSceneGraph event handler. Refer to the forum thread below that will give more details on this:
<http://forums.infragistics.com/forums/p/16982/62792.aspx#62792>
The code in above forum post can be used to enable chart tooltips over any primitive.
I hope this helps.
I am just following up to see if you were able to set tooltips based on the details I have provided above.
In order to implement the functionality you described, I would suggest you to loop through all the Primitives in the SceneGraph until you find a Box. Once you find the box you can use the code that you have provided to the "Some label" text.
I would suggest you add text and box in FillSceneGraph event as shown below to implement the functionality you described:
Box b = new Box(new Point(10, 10), 20, 20);Text label = new Text();label.Value = "tooltip";b.Layer = e.ChartCore.GetChartLayer();b.Value = b.Row = label.Column = b.Column = 0;b.Caps = PCaps.HitTest | PCaps.Tooltip;b.Chart = this.UltraChart1.ChartType;e.SceneGraph.Add(b);e.SceneGraph.Add(label);
Thanks Bhadresh for the reply.
I tried with the following code but still no tooltips were shown.
Text label = new Text();label.SetTextString("Some label");
label.Layer = e.ChartCore.GetChartLayer();label.Row = label.Column = 0;label.Caps = PCaps.HitTest | PCaps.Tooltip;label.Chart = this.InfraChart1.ChartType;
e.SceneGraph.Add(label);