Profile Picture

view single data marker based on hittest

Posted By Tim Kamrath 13 Years Ago
Author
Message
Tim Kamrath
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 10, Visits: 1

I want to show a datapoint marker, showing the data point values, when the mouse hovers over the plot in a 2D chart.  I only want to see the marker for the value that the mouse is over and when the mouse moves off the data point the marker goes away.  So as the user moves the mouse over a 2D plot of data a single marker appears at the data point displaying the data values at the current mouse location.  I have seen the code for doing a hit test off the mouse.  But How do I show a single marker for the data point that is hit?

thanks.



Tim Kamrath
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 10, Visits: 1
I think I may have stated something in an unclear manner.  I don't really mean to use a marker.  I need to see the data values for a data point.  So when the mouse is over the plot a data point is shown next to the mouse.

Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hello Tim,

Some questions regarding your requirements:

>>I need to see the data values for a data point.
Does this mean that you want to see the values as texts - like in some sort of a tooltip?

>> So when the mouse is over the plot a data point is shown next to the mouse.
We have trouble understanding this one.




Best Regards,
Nevron Support Team



Tim Kamrath
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 10, Visits: 1
I believe that by default there are data labels displayed on the plot for each data point.  So I turn off DataLabelStyle because I don't want a label for every data point displayed all the time.  But I want a singe data label to appear for a single data point when the mouse is over that data point.  When the mouse is moved off of the datapoint the data label disappears.

Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Tim,

You can display individual data points labels by assigning NDataLabelStyle objects at specific indices in the DataLabelStyles data series. You have to set the common data label style's Visible property to false and this way only the individual data labels will be visible. You can take a look at the following example in our Windows Forms demo application:

All Examples > Panels > Chart > Series Attributes > Data Labels

Alternatively you can use a tooltip - its functionality is similar, but it won't cause the control to redraw.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic