Adding a Bar Series and a Line Series at the Same Time

To add a Bar series and a Line series programmatically, use the following code:

 

chart.Data.Children.Add(new XYDataSeries() {

       ChartType=ChartType.Column,

       XValuesSource = new double[] {1,2,3 },

       ValuesSource = new double[] {1,2,3 } });

 

     chart.Data.Children.Add(new XYDataSeries() {

       ChartType = ChartType.Line,

       XValuesSource = new double[] { 1, 2, 3 },

       ValuesSource = new double[] { 3, 2, 1 } });


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.