I am using Dynamic Data Display and want to display a variable number of line graphs at runtime depending on a user selection. I can bind a single line graph to data in my viewmodel as shown below. (I am trying to strictly follow MVVM).
View
<d3:ChartPlotter>
<d3:LineGraph DataSource="{Binding Data}"></d3:LineGraph>
</d3:ChartPlotter>
ViewModel
`public ObservableDataSource<Point> Data {
get => _data;
set
{
_data = value;
OnPropertyChanged("Data");
}
}`
Should I dynamically add LineGraphs to the ChartPlotter after the user selection? I was hoping that I could bind to a list of ObservableDataSource<Point>
where each element in the list corresponds to a LineGraph series but this does not seem possible.
Any suggestions would be greatly appreciated.