Hi,
i found in this forum a solution for make a new line in a winchart, now i want add a tooltip when the mouse is over this line, need help, tjhis is the code for create a line:
Private Sub UltraChart1_FillSceneGraph(sender As Object, e As Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs) Handles UltraChart1.FillSceneGraph Dim media As Double = 0 Dim linea As Infragistics.UltraChart.Core.Primitives.Line Try Dim x As Infragistics.UltraChart.Core.IAdvanceAxis = e.Grid("X") Dim y As Infragistics.UltraChart.Core.IAdvanceAxis = e.Grid("Y") media = UltraGrid1.DisplayLayout.Rows.SummaryValues("m" & UltraGrid1.DisplayLayout.Bands(0).Columns(UltraComboTestate.Value).Key).Value linea = New Infragistics.UltraChart.Core.Primitives.Line(New Point(x.Map(0), y.Map(media)), New Point(x.Map(50), y.Map(media))) linea.PE.Stroke = Color.Red e.SceneGraph.Add(linea) Catch ex As Exception End Try End Sub
tks for help
Hello,
Yes, adding tooltips is built-in and exposed from the line primitive you're creating. Try including the Caps property and setting this to Tooltip after setting the Stroke.
//example
linea.PE.Stroke = Color.Redlinea.Caps = PCaps.Tooltip.
This will show a tooltip over the datapoints you have along the line.
Let me know if you have any quesitons regading this matter.
Hi tks, for ans,
i set the caps but i dont have datapoints along the line, because its an average line, i calculate the average of all datas and draw this line.
i want a tooltip that say something like :"The average is:" & average
tks