how to use interactivitystyle in winchart?


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
In order to enable tooltips you have to add an NTooltipTool instance to the chart controller:

nChartControl1.Controller.Tools.Add(New NTooltipTool())

In order to enable cursor changes you have to add an NCursorTool:

nChartControl1.Controller.Tools.Add(New NCursorTool())

If you want the tooltips to show just the data point index it is not necessary to add an individual interactivity style for each data point. You can use the following code:

point.InteractivityStyle = New NInteractivityStyle("", CursorType.Hand)

and remove

point.InteractivityStyles.Add(I, New NInteractivityStyle(CStr(I), CursorType.Hand))

from the For loop.

Best Regards,
Nevron Support Team


g wu
g wu
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)
Group: Forum Members
Posts: 1, Visits: 1

Hi,

I am creating a xy point plot in winchart and need to add interactivity style so it will display the point values when mouse is over the point, below is my vb code, somehow it doesn't work-----no value displayed when mouse is over the point, can somebody give me advice? thanks.

Dim point As NPointSeries = chart.Series.Add(SeriesType.Point)

point.Name = "Point1"

point.InflateMargins = True

point.DataLabelStyle.Visible = False

point.FillStyle = New NColorFillStyle(Color.Red)

point.BorderStyle.Width = New NLength(1)

point.Size = New NLength(5, NRelativeUnit.ParentPercentage)

point.PointShape = PointShape.Bar

' point.InteractivityStyles(0) = interactivityStyle

point.UseXValues = True

For I = 0 To 10

point.XValues.Add(0.01 + I)

point.Values.Add(0.01 + I)

point.InteractivityStyles.Add(I, New NInteractivityStyle(CStr(I), CursorType.Hand))

Next

chart1.Refresh()

  


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search