databinding 3 axis chart in c#

时间:2016-03-02 10:59:16

标签: c# wpf data-binding

I want to form 3 axis chart x,y,y1 in c# and i want to know how to bind the 3rd y1 axis in WPF

I add data into collection like this

dbCollectionfuelvsunit.Add(
    new VM.Chart.AxisDatatablekwhvsfuel(
        Convert.ToInt32(DG1),
        Convert.ToInt32(Time),
        Convert.ToInt32(fuel)));

Bind it like this

((ColumnSeries)this.chart.chart.Series[0]).ItemsSource = dbCollectionfuelvsunit;

In my xmal i bind the x and y axis which works like like

<Grid>
        <dvc:Chart Name="chart">
            <dvc:Chart.Series>
                <dvc:ColumnSeries Title="DG 1"
                  IndependentValueBinding="{Binding Path=Time}"
                  DependentValueBinding="{Binding Path=DG1}" />

Jow do I bind the fuel collection in my XML?

0 个答案:

没有答案