Hi,
I have tried to provide a tool tip in legend area on mouse move event and it was created in the fillscenegraph event.
Also, the selection of the chart type is "Line Chart" and the application platform is .Net Framework 3.5 & Infragistics version is 2009.1
Below code is used to customize the legend area,
private Primitive LastPrimitive { get; set; } void UltraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e) { PrimitiveCollection primitivesToAdd = new PrimitiveCollection(); foreach (Primitive p in e.SceneGraph) { if (p.Path != null && p.Path.Contains("Legend")) { p.Layer = e.ChartCore.GetChartLayer(); if (p is Box) { this.LastPrimitive = p; } else if (p is Text) { Text t = (Text)p; p.Row = 0; p.Column = 0; p.Value = this.LastPrimitive.Value; Box newBox = new Box(t.bounds); newBox.PE.FillOpacity = newBox.PE.StrokeOpacity = 0; newBox.Row = p.Row; newBox.Column = p.Column; newBox.Chart = p.Chart; newBox.Layer = p.Layer; newBox.Value = p.Value; newBox.Caps = PCaps.HitTest | PCaps.Skin | PCaps.Tooltip; primitivesToAdd.Add(newBox); } } } e.SceneGraph.AddRange(primitivesToAdd.ToArray()); }
When the mouse moves on legend area, the tool tip displays without issues and if the scrollbar is disabled.
But, the same is not displaying on while setting the property EnableScrollbar = true.
Please assist us to overcome from this issue.
Thanks in advance and hope will wait for the quick response.
Best regards,
Rithanya
Hello
Thanks for the info. Please use the code below in your FillSceneGraph event:
private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e){ PrimitiveCollection PrimitiveList = new PrimitiveCollection(); foreach (Primitive p in e.SceneGraph) { if (p is Box && p.Path != null && p.Path.ToLower().IndexOf("legend") != -1 && p.Row != -1 && p.Column != -1 ) { Box newBox = new Box(new Rectangle(((Box)p).rect.X, ((Box)p).rect.Y, ((Box)p).rect.Width, ((Box)p).rect.Height)); newBox.PE.FillOpacity = newBox.PE.StrokeOpacity = 0; newBox.Row = p.Row; newBox.Column = p.Column; newBox.Chart = Infragistics.UltraChart.Shared.Styles.ChartType.LineChart; newBox.Caps = PCaps.HitTest | PCaps.Skin | PCaps.Tooltip; PrimitiveList.Add(newBox); } } e.SceneGraph.AddRange(PrimitiveList.ToArray());}
Please note that you should specify newBox.Chart property, depending of your chart type. In your scenario with Line chart you should use:
newBox.Chart = Infragistics.UltraChart.Shared.Styles.ChartType.LineChart;
If you want to specify the data in your tooltip, you should use both properties:
newBox.Row = p.Row;
newBox.Column = p.Column;
to specify which value from your datasource to be shown.
Let me know if you have any questions.
Regards
Hi Georgi,
Sorry, we are using the ultrawebchart control version is "Infragistics35.WebUI.UltraWebChart.v9.1".
Best Regards,
Rithanya.
Thanks for the sample.
I have checked that the sample file is releated to the ultrawinchart control. But, we are facing this issue on ultrawebchart control & the infragistics version is
"Infragistics35.WebUI.UltraWebListbar.v9.1".
So, could you please provide the sample on this and let me know the same concept will works on web chart(on mouse over event)?
OK. Feel free to write me, if you have any questions.
HiGeorgi,
Thanks for the reply.
Let me check and update you.