Hi, i have problem to correctly bind data to WPF Chart. When i'm setting ItemsSource i get error:
Assigned dependent axis cannot be used. The data may not be able to be rendered on the provided axis or the series may require that they axis has an origin.
oc = new ObservableCollection<Pair>();
heartBeats.ItemsSource = oc;
to Pair i'm saving int and long
XAML:
...
xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" >
<charting:Chart x:Name="ApplicatioChart">
<charting:Chart.Series>
<charting:ColumnSeries x:Name="heartBeats" Title="Working Set"
DependentValueBinding="{Binding First}" IndependentValueBinding="{Binding Second}" >
<charting:ColumnSeries.IndependentAxis>
<charting:CategoryAxis Orientation="X" />
</charting:ColumnSeries.IndependentAxis>
<charting:ColumnSeries.DependentRangeAxis>
<charting:LinearAxis Orientation="Y" />
</charting:ColumnSeries.DependentRangeAxis>
</charting:ColumnSeries>
</charting:Chart.Series>
</charting:Chart>
Please help.. :(