So I just started using LiveCharts and I looked through the docs and tried building my first project. I created a control and bound the Series property to a value but it's not showing anything on the actual control, why is that? What did I miss and how do I resolve this issue? Whats the logic behind that fact that nothing is showing up?
XAML
<Grid>
<wpf:CartesianChart Series="{Binding observableValues}" />
</Grid>
CS
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DataContext = this;
var doubleValues = new ChartValues<double> { 1, 2, 3 };
var intValues = new ChartValues<int> { 1, 2, 3 };
//the observable value class is really helpful, it notifies the chart to update
//every time the ObservableValue.Value property changes
var observableValues = new ChartValues<LiveCharts.Defaults.ObservableValue>
{
new LiveCharts.Defaults.ObservableValue(1), //initializes Value property as 1
new LiveCharts.Defaults.ObservableValue(2),
new LiveCharts.Defaults.ObservableValue(3)
};
}
}