Hello
I 'm Making the software for thread-fed multi-channel data chart
I want to add the line when mouse clicked
Is it possible ?
If the task is possible , How can I add the line in source code
Please Help me
and Have a nice day!
thank you !
How can i add the line ?
Moderator: Queue Moderators
How can i add the line ?
- Attachments
-
- image 4.jpg (220.54 KiB) Viewed 10070 times
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: How can i add the line ?
Hi Copilot,
You can add it like this:
You can add it like this:
Code: Select all
m_chart.MouseDoubleClick += m_chart_MouseDoubleClick;
void m_chart_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
LineSeriesCursor cursorLine = new LineSeriesCursor(m_chart.ViewXY, m_chart.ViewXY.XAxes[0]);
cursorLine.LineStyle.Color = System.Windows.Media.Colors.Gray;
double x;
m_chart.ViewXY.XAxes[0].CoordToValue((int) e.GetPosition(m_chart).X, out x,false);
cursorLine.ValueAtXAxis = x;
m_chart.ViewXY.LineSeriesCursors.Add(cursorLine);
}
LightningChart Support Team, PT