c# - Highlight DataPoint in mschart on click -


when user clicks particular datapoint in chart, datapoint highlighted different color until user clicks datapoint. possible in mschart?

you have subscribe mousedown event , call hittest method. can change color of datapoint.

private void chart1_mousedown(object sender, system.windows.forms.mouseeventargs e) {     // call hit test method     hittestresult result = chart1.hittest( e.x, e.y );         if( result.chartelementtype == chartelementtype.datapoint )     {           chart1.series[0].points[result.pointindex].color = color.green;          // reset previous point selected here          } } 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -