I am developing a winform application to display a line chart with the use of LiveCharts. How can I draw a vertical line at a certain x coordinate? Thanks in advance.
CodePudding user response:
I found:
cartesianChart.AxisX.Add(new Axis
{
//IsMerged = true,
Sections = new SectionsCollection
{
new AxisSection
{
Value = x_best,
Stroke = System.Windows.Media.Brushes.Red,
StrokeThickness = 3,
StrokeDashArray = new System.Windows.Media.DoubleCollection(new [] {10d})
}
}
});