FarPoint.Win.Chart Assembly > FarPoint.Win.Chart Namespace > Series Class : SeriesNameDataSource Property |
fpSpread1.ActiveSheet.SetArray(0, 0, new Object[,] { { null, "North", "South", "East", "West", "Northeast" } }); fpSpread1.ActiveSheet.SetArray(1, 0, new Object[,] { { "s1", 50, 25, 55, 30, 26 } }); fpSpread1.ActiveSheet.SetArray(2, 0, new Object[,] { { "s2", 92, 14, 15, 24, 65 } }); fpSpread1.ActiveSheet.SetArray(3, 0, new Object[,] { { "s3", 65, 26, 70, 60, 43 } }); fpSpread1.ActiveSheet.SetArray(4, 0, new Object[,] { { "s4", 24, 80, 26, 11, 27 } }); FarPoint.Win.Chart.RadarLineSeries series1 = new FarPoint.Win.Chart.RadarLineSeries(); series1.SeriesName = "s1"; series1.PointMarker = new FarPoint.Win.Chart.NoMarker(); series1.SeriesNameDataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldSeriesName", "Sheet1!$A$2:$A$2", FarPoint.Win.Spread.Chart.SegmentDataType.Text); series1.CategoryNames.DataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldCategoryName", "Sheet1!$B$1:$F$1", FarPoint.Win.Spread.Chart.SegmentDataType.Text); series1.Values.DataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldValue", "Sheet1!$B$2:$F$2"); FarPoint.Win.Chart.RadarLineSeries series2 = new FarPoint.Win.Chart.RadarLineSeries(); series2.SeriesName = "s2"; series2.PointMarker = new FarPoint.Win.Chart.NoMarker(); series2.SeriesNameDataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldSeriesName", "Sheet1!$A$3:$A$3", FarPoint.Win.Spread.Chart.SegmentDataType.Text); series2.CategoryNames.DataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldCategoryName", "Sheet1!$B$1:$F$1", FarPoint.Win.Spread.Chart.SegmentDataType.Text); series2.Values.DataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldValue", "Sheet1!$B$3:$F$3"); FarPoint.Win.Chart.RadarLineSeries series3 = new FarPoint.Win.Chart.RadarLineSeries(); series3.SeriesName = "s3"; series3.PointMarker = new FarPoint.Win.Chart.NoMarker(); series3.SeriesNameDataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldSeriesName", "Sheet1!$A$4:$A$4", FarPoint.Win.Spread.Chart.SegmentDataType.Text); series3.CategoryNames.DataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldCategoryName", "Sheet1!$B$1:$F$1", FarPoint.Win.Spread.Chart.SegmentDataType.Text); series3.Values.DataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldValue", "Sheet1!$B$4:$F$4"); FarPoint.Win.Chart.RadarLineSeries series4 = new FarPoint.Win.Chart.RadarLineSeries(); series4.SeriesName = "s4"; series4.PointMarker = new FarPoint.Win.Chart.NoMarker(); series4.SeriesNameDataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldSeriesName", "Sheet1!$A$5:$A$5", FarPoint.Win.Spread.Chart.SegmentDataType.Text); series4.CategoryNames.DataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldCategoryName", "Sheet1!$B$1:$F$1", FarPoint.Win.Spread.Chart.SegmentDataType.Text); series4.Values.DataSource = new FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldValue", "Sheet1!$B$5:$F$5"); FarPoint.Win.Chart.RadarPlotArea plotArea = new FarPoint.Win.Chart.RadarPlotArea(); plotArea.Location = new System.Drawing.PointF(0.2f, 0.2f); plotArea.Size = new System.Drawing.SizeF(0.6f, 0.6f); plotArea.Series.Add(series1); plotArea.Series.Add(series2); plotArea.Series.Add(series3); plotArea.Series.Add(series4); FarPoint.Win.Chart.LegendArea legend = new FarPoint.Win.Chart.LegendArea(); legend.Location = new PointF(0.9f, 0.5f); legend.AlignmentX = 1f; legend.AlignmentY = 0.5f; FarPoint.Win.Chart.ChartModel model = new FarPoint.Win.Chart.ChartModel(); model.LegendAreas.Add(legend); model.PlotAreas.Add(plotArea); FarPoint.Win.Spread.Chart.SpreadChart chart = new FarPoint.Win.Spread.Chart.SpreadChart(); chart.Size = new Size(400, 240); chart.Location = new Point(0, 120); chart.Model = model; fpSpread1.ActiveSheet.Charts.Add(chart);
fpSpread1.ActiveSheet.SetArray(0, 0, New [Object](,) {{Nothing, "North", "South", "East", "West", "Northeast"}}) fpSpread1.ActiveSheet.SetArray(1, 0, New [Object](,) {{"s1", 50, 25, 55, 30, 26}}) fpSpread1.ActiveSheet.SetArray(2, 0, New [Object](,) {{"s2", 92, 14, 15, 24, 65}}) fpSpread1.ActiveSheet.SetArray(3, 0, New [Object](,) {{"s3", 65, 26, 70, 60, 43}}) fpSpread1.ActiveSheet.SetArray(4, 0, New [Object](,) {{"s4", 24, 80, 26, 11, 27}}) Dim series1 As New FarPoint.Win.Chart.RadarLineSeries() series1.SeriesName = "s1" series1.PointMarker = New FarPoint.Win.Chart.NoMarker() series1.SeriesNameDataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldSeriesName", "Sheet1!$A$2:$A$2", FarPoint.Win.Spread.Chart.SegmentDataType.Text) series1.CategoryNames.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldCategoryName", "Sheet1!$B$1:$F$1", FarPoint.Win.Spread.Chart.SegmentDataType.Text) series1.Values.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldValue", "Sheet1!$B$2:$F$2") Dim series2 As New FarPoint.Win.Chart.RadarLineSeries() series2.SeriesName = "s2" series2.PointMarker = New FarPoint.Win.Chart.NoMarker() series2.SeriesNameDataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldSeriesName", "Sheet1!$A$3:$A$3", FarPoint.Win.Spread.Chart.SegmentDataType.Text) series2.CategoryNames.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldCategoryName", "Sheet1!$B$1:$F$1", FarPoint.Win.Spread.Chart.SegmentDataType.Text) series2.Values.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldValue", "Sheet1!$B$3:$F$3") Dim series3 As New FarPoint.Win.Chart.RadarLineSeries() series3.SeriesName = "s3" series3.PointMarker = New FarPoint.Win.Chart.NoMarker() series3.SeriesNameDataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldSeriesName", "Sheet1!$A$4:$A$4", FarPoint.Win.Spread.Chart.SegmentDataType.Text) series3.CategoryNames.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldCategoryName", "Sheet1!$B$1:$F$1", FarPoint.Win.Spread.Chart.SegmentDataType.Text) series3.Values.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldValue", "Sheet1!$B$4:$F$4") Dim series4 As New FarPoint.Win.Chart.RadarLineSeries() series4.SeriesName = "s4" series4.PointMarker = New FarPoint.Win.Chart.NoMarker() series4.SeriesNameDataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldSeriesName", "Sheet1!$A$5:$A$5", FarPoint.Win.Spread.Chart.SegmentDataType.Text) series4.CategoryNames.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldCategoryName", "Sheet1!$B$1:$F$1", FarPoint.Win.Spread.Chart.SegmentDataType.Text) series4.Values.DataSource = New FarPoint.Win.Spread.Chart.SeriesDataField(fpSpread1, "DataFieldValue", "Sheet1!$B$5:$F$5") Dim plotArea As New FarPoint.Win.Chart.RadarPlotArea() plotArea.Location = New System.Drawing.PointF(0.2F, 0.2F) plotArea.Size = New System.Drawing.SizeF(0.6F, 0.6F) plotArea.Series.Add(series1) plotArea.Series.Add(series2) plotArea.Series.Add(series3) plotArea.Series.Add(series4) Dim legend As New FarPoint.Win.Chart.LegendArea() legend.Location = New PointF(0.9F, 0.5F) legend.AlignmentX = 1F legend.AlignmentY = 0.5F Dim model As New FarPoint.Win.Chart.ChartModel() model.LegendAreas.Add(legend) model.PlotAreas.Add(plotArea) Dim chart As New FarPoint.Win.Spread.Chart.SpreadChart() chart.Size = New Size(400, 240) chart.Location = New Point(0, 120) chart.Model = model fpSpread1.ActiveSheet.Charts.Add(chart)
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