Jump to content

 

Photo

Line Chart


  • Please log in to reply
3 replies to this topic

#1 vivekb

vivekb

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male

Posted 28 March 2012 - 05:48 AM

Hello,

Consider we have drawn a line graph with 5 points.

Can we able to drag the datapoint using mouse and change its location in the graph?

Can we make the graph from | to _ by just draging the graph data points by mouse?

#2 sharmila

sharmila

    Advanced Member

  • Administrators
  • PipPipPip
  • 695 posts
  • Gender:Female

Posted 28 March 2012 - 06:27 AM

Hi Vivek,

Yes. You will be able to drag DataPoints using mouse and change its location. Please check out the documentation link below.

http://www.visifire....ouse_events.htm

Regards,
Sharmila

#3 vivekb

vivekb

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male

Posted 28 March 2012 - 06:44 AM

Hi Vivek,

Yes. You will be able to drag DataPoints using mouse and change its location. Please check out the documentation link below.

http://www.visifire....ouse_events.htm

Regards,
Sharmila



Thanks Sharmila for your valuable suggestion

#4 sharmila

sharmila

    Advanced Member

  • Administrators
  • PipPipPip
  • 695 posts
  • Gender:Female

Posted 28 March 2012 - 06:48 AM

Hi,

Note that in the above example you can drag datapoint along y-axis only. If you want to drag the datapoints along both x-axis and y-axis then you can make use of XValue of PlotArea event argument. Please check out the code below.

void PlotArea_MouseMove(object sender, PlotAreaMouseEventArgs e)
{
_yValue = e.YValue;
_xValue = Convert.ToDouble(e.XValue);
}

void PlotArea_MouseLeftButtonUp(object sender, PlotAreaMouseButtonEventArgs e)
{
if (_dataPoint != null)
_dataPoint.YValue = _yValue;
_dataPoint.XValue = _xValue;
} 
Regards,
Sharmila




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users