Chart for WPF and Silverlight / Chart Features / Axis / Axis Origin
In This Topic
Axis Origin
In This Topic

You can specify the axis origin using the Origin property, like the following:

C#
Copy Code
{
          c1Chart1.Reset(true);
          c1Chart1.Data.Children.Add(new XYDataSeries()
                    {
                      ValuesSource = new double[] { -1, 2, 0, 2, -2 },
                      XValuesSource = new double[] { -2, -1, 0, 1, 2 }
                    };
          c1Chart1.View.AxisX.Origin = 0;
          c1Chart1.View.AxisY.Origin = 0;
          c1Chart1.ChartType = ChartType.LineSymbols;
        }));

 

 

See Also