I would like to present to the user list of available series to choose from (maybe directly by clicking the legend?) The plot would display only the chosen series
What would be the best way to achieve this ?
I would suggest you to use checkboxes which represent those series. When a user checks a checkbox, you can add a new LineSeries or any other series to the PlotModel/PlotView.
checkbox1 represents series1. checkbox2 represents series2. etc..
ex:
Plotview pv = new PlotView(); // you can also use plotmodel instead of plotview.
pv.Width = 480.0;
pv.Height = 272.0;
pv.Title = graphname;
private void checkbox4_Checked(object sender, RoutedEventArgs e)
{
var LineChart = new LineSeries();
pv.Series.Add(LineChart);
LineChart.DataFieldX = "X";
LineChart.DataFieldY = "Y";
List<Vector> coords = new List<Vector>();
//Add X and Y values to this list. Or you can use any other way you want.
LineChart.ItemsSource = coords; //Feed it to itemsource
LineChart.Title = name;
}