ComponentOne Chart for WPF and Silverlight
Chart for WPF and Silverlight / Chart Features / Data Binding / Data Series Binding / X-Value Binding
In This Topic
    X-Value Binding
    In This Topic

    The X-Value binding specifies the x-value binding for the chart data series when the XBinding property is used.

    The following example uses the XBinding property to set the x-value binding for the data series:

    C#
    Copy Code
    ChartBindings bindings = new ChartBindings();
    bindings.XBinding = new Binding("X");
    bindings.SeriesBindings.Add(new Binding("Y")); 
    chart.Bindings = bindings;
    chart.DataContext = new Point[] { new Point(1, 0),
    new Point(2, 2), new Point(3, 1), new Point(5, 3) };
    

     

    See Also