MESCIUS SPREAD for ASP.NET 10.0J
AddRange メソッド (BoxWhiskerSeriesCollection)

追加する系列の配列。
系列の配列をコレクションに追加します。
構文
'Declaration
 
Public Sub AddRange( _
   ByVal items() As BoxWhiskerSeries _
) 
public void AddRange( 
   BoxWhiskerSeries[] items
)

パラメータ

items
追加する系列の配列。
例外
例外説明
System.ArgumentNullExceptionitemsがNull参照(VBではNothing)であるか、一部のitems[i]がNull参照(VBではNothing)です。
次のサンプルコードは、箱ひげ図を作成します。
FarPoint.Web.Chart.BoxWhiskerSeries series1 = new FarPoint.Web.Chart.BoxWhiskerSeries();
series1.SeriesName = "Store1";
series1.CategoryNames.AddRange(new string[] { "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss" });
series1.Values.Add(20);
series1.Values.Add(25);
series1.Values.Add(21);
series1.Values.Add(30);
series1.Values.Add(10);
series1.Values.Add(26);
series1.Values.Add(18);
series1.Values.Add(28);
series1.Values.Add(12);
series1.Values.Add(20);
series1.Values.Add(17);
series1.Values.Add(35);
series1.Border = new FarPoint.Web.Chart.SolidLine(Color.Black);
series1.Fill = new FarPoint.Web.Chart.GradientFill(Color.Brown, Color.Orange);
FarPoint.Web.Chart.BoxWhiskerSeries series2 = new FarPoint.Web.Chart.BoxWhiskerSeries();
series2.SeriesName = "Store2";
series2.CategoryNames.AddRange(new string[] { "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss" });
series2.Values.Add(15);
series2.Values.Add(18);
series2.Values.Add(19);
series2.Values.Add(22);
series2.Values.Add(10);
series2.Values.Add(19);
series2.Values.Add(15);
series2.Values.Add(25);
series2.Values.Add(14);
series2.Values.Add(19);
series2.Values.Add(16);
series2.Values.Add(24);
series2.Border = new FarPoint.Web.Chart.SolidLine(Color.Black);
series2.Fill = new FarPoint.Web.Chart.GradientFill(Color.Lavender, Color.DeepSkyBlue);
FarPoint.Web.Chart.BoxWhiskerSeries series3 = new FarPoint.Web.Chart.BoxWhiskerSeries();
series3.SeriesName = "Store3";
series3.CategoryNames.AddRange(new string[] { "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss" });
series3.Values.Add(5);
series3.Values.Add(12);
series3.Values.Add(20);
series3.Values.Add(25);
series3.Values.Add(8);
series3.Values.Add(10);
series3.Values.Add(11);
series3.Values.Add(22);
series3.Values.Add(13);
series3.Values.Add(12);
series3.Values.Add(15);
series3.Values.Add(21);
FarPoint.Web.Chart.ClusteredBoxWhiskerSeries cseries = new FarPoint.Web.Chart.ClusteredBoxWhiskerSeries();
cseries.Series.Add(series1);
cseries.Series.Add(series2);
cseries.Series.Add(series3);
FarPoint.Web.Chart.YPlotArea plotArea = new FarPoint.Web.Chart.YPlotArea();
plotArea.Series.Add(cseries);
FarPoint.Web.Chart.LegendArea legend = new FarPoint.Web.Chart.LegendArea();
legend.Location = new PointF(0.80F, 0.5F);
FarPoint.Web.Chart.ChartModel model = new FarPoint.Web.Chart.ChartModel();
model.PlotAreas.Add(plotArea);
model.LegendAreas.Add(legend);
FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart();
chart.Height = 400;
chart.Width = 400;
chart.Model = model;
FpSpread1.Sheets[0].Charts.Add(chart);
Dim series1 As New FarPoint.Web.Chart.BoxWhiskerSeries()
series1.SeriesName = "Store1"
series1.CategoryNames.AddRange(New String() {"Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss"})
series1.Values.Add(20)
series1.Values.Add(25)
series1.Values.Add(21)
series1.Values.Add(30)
series1.Values.Add(10)
series1.Values.Add(26)
series1.Values.Add(18)
series1.Values.Add(28)
series1.Values.Add(12)
series1.Values.Add(20)
series1.Values.Add(17)
series1.Values.Add(35)
series1.Border = New FarPoint.Web.Chart.SolidLine(System.Drawing.Color.Black)
series1.Fill = New FarPoint.Web.Chart.GradientFill(System.Drawing.Color.Brown, System.Drawing.Color.Orange)
Dim series2 As New FarPoint.Web.Chart.BoxWhiskerSeries()
series2.SeriesName = "Store2"
series2.CategoryNames.AddRange(New String() {"Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss"})
series2.Values.Add(15)
series2.Values.Add(18)
series2.Values.Add(19)
series2.Values.Add(22)
series2.Values.Add(10)
series2.Values.Add(19)
series2.Values.Add(15)
series2.Values.Add(25)
series2.Values.Add(14)
series2.Values.Add(19)
series2.Values.Add(16)
series2.Values.Add(24)
series2.Border = New FarPoint.Web.Chart.SolidLine(System.Drawing.Color.Black)
series2.Fill = New FarPoint.Web.Chart.GradientFill(System.Drawing.Color.Lavender, System.Drawing.Color.DeepSkyBlue)
Dim series3 As New FarPoint.Web.Chart.BoxWhiskerSeries()
series3.SeriesName = "Store3"
series3.CategoryNames.AddRange(New String() {"Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss", "Asiago", "Gouda", "Havarti", "Swiss"})
series3.Values.Add(5)
series3.Values.Add(12)
series3.Values.Add(20)
series3.Values.Add(25)
series3.Values.Add(8)
series3.Values.Add(10)
series3.Values.Add(11)
series3.Values.Add(22)
series3.Values.Add(13)
series3.Values.Add(12)
series3.Values.Add(15)
series3.Values.Add(21)
Dim cseries As New FarPoint.Web.Chart.ClusteredBoxWhiskerSeries()
cseries.Series.Add(series1)
cseries.Series.Add(series2)
cseries.Series.Add(series3)
Dim plotArea As New FarPoint.Web.Chart.YPlotArea()
plotArea.Series.Add(cseries)
Dim legend As New FarPoint.Web.Chart.LegendArea()
legend.Location = New Drawing.PointF(0.8F, 0.5F)
Dim model As New FarPoint.Web.Chart.ChartModel()
model.PlotAreas.Add(plotArea)
model.LegendAreas.Add(legend)
Dim chart As New FarPoint.Web.Spread.Chart.SpreadChart()
chart.Height = 400
chart.Width = 400
chart.Model = model
FpSpread1.Sheets(0).Charts.Add(chart)
参照

BoxWhiskerSeriesCollection クラス
BoxWhiskerSeriesCollection メンバ

 

 


© MESCIUS inc. All rights reserved.