Spread Windows Forms 10.0 Product Documentation
ChangeSeriesType Method
Example 


Changes the type of the series.
Overload List
OverloadDescription
ChangeSeriesTypeChanges the type of the series.  
Remarks
This method can be used to change the type of the series.
Example
This example changes the series type of the chart.
FarPoint.Win.Spread.Model.CellRange celRange = new FarPoint.Win.Spread.Model.CellRange(0, 0, 2, 2);
FarPoint.Win.Spread.Model.CellRange celRange1 = new FarPoint.Win.Spread.Model.CellRange(0, 0, 4, 4);
fpSpread1.Sheets[0].AddChart(celRange, typeof(FarPoint.Win.Chart.BarSeries), 200, 200, 0, 0);
fpSpread1.Sheets[0].AddChart(celRange1, typeof(FarPoint.Win.Chart.LineSeries), 200, 200, 500, 500);
FarPoint.Win.Spread.Chart.SpreadChart sourceChart = fpSpread1.Sheets[0].Charts[0];
FarPoint.Win.Chart.Series sourceSeries = fpSpread1.Sheets[0].Charts[0].Model.PlotAreas[0].Series[0];
FarPoint.Win.Chart.Series targetSeries = fpSpread1.Sheets[0].Charts[1].Model.PlotAreas[0].Series[0];
sourceChart.ChangeSeriesType(sourceSeries, targetSeries);
Dim celRange As New FarPoint.Win.Spread.Model.CellRange(0, 0, 2, 2)
Dim celRange1 As New FarPoint.Win.Spread.Model.CellRange(0, 0, 4, 4)
FpSpread1.Sheets(0).AddChart(celRange, GetType(FarPoint.Win.Chart.BarSeries), 200, 200, 0, 0)
FpSpread1.Sheets(0).AddChart(celRange1, GetType(FarPoint.Win.Chart.LineSeries), 200, 200, 500, 500)
Dim sourceChart As New FarPoint.Win.Spread.Chart.SpreadChart
sourceChart = FpSpread1.Sheets(0).Charts(0)
Dim sourceSeries As FarPoint.Win.Chart.Series
sourceSeries = FpSpread1.Sheets(0).Charts(0).Model.PlotAreas(0).Series(0)
Dim targetSeries As FarPoint.Win.Chart.Series
targetSeries = FpSpread1.Sheets(0).Charts(1).Model.PlotAreas(0).Series(0)
sourceChart.ChangeSeriesType(sourceSeries, targetSeries)
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SpreadChart Class
SpreadChart Members

 

 


Copyright © GrapeCity, inc. All rights reserved.