PowerTools SPREAD for Windows Forms 8.0J
LegendPos 列挙体


凡例の位置。
構文
'Declaration
 
Public Enum LegendPos 
   Inherits System.Enum
'使用法
 
Dim instance As LegendPos
public enum LegendPos : System.Enum 
メンバ
メンバ説明
Bottom下の位置。
Left左の位置。
Right右の位置。
Top上の位置。
TopRight右上の位置。
次のサンプルコードは、LegendPosプロパティを設定します。
FarPoint.Win.Chart.AreaSeries aseries = new FarPoint.Win.Chart.AreaSeries();
aseries.SeriesName = "Series1";
aseries.Values.Add(2);
aseries.Values.Add(4);
aseries.Values.Add(3);
aseries.Values.Add(5);
aseries.AreaFill = new FarPoint.Win.Chart.GradientFill(Color.Azure, Color.Bisque);
FarPoint.Win.Chart.AreaSeries aseries1 = new FarPoint.Win.Chart.AreaSeries();
aseries1.SeriesName = "Series2";
aseries1.Values.Add(1);
aseries1.Values.Add(2);
aseries1.Values.Add(4);
aseries1.Values.Add(8);
aseries1.AreaFill = new FarPoint.Win.Chart.GradientFill(Color.Azure, Color.Bisque);
aseries.AreaBorder = new FarPoint.Win.Chart.SolidLine(Color.Blue);
FarPoint.Win.Chart.YPlotArea plotArea = new FarPoint.Win.Chart.YPlotArea();
plotArea.Location = new PointF(0.2F, 0.2F);
plotArea.Size = new SizeF(0.6F, 0.6F);
plotArea.Series.Add(aseries);
plotArea.Series.Add(aseries1);
FarPoint.Win.Chart.LabelArea Label = new FarPoint.Win.Chart.LabelArea();
Label.Text = "Area Chart";
Label.Border = new FarPoint.Win.Chart.SolidLine(System.Drawing.Color.Blue);
Label.Fill = new FarPoint.Win.Chart.SolidFill(System.Drawing.Color.Yellow);
Label.Location = new PointF(0.5F, 0.02F);
Label.TextFont = new System.Drawing.Font("Comic Sans MS", 10);
Label.TextFill = new FarPoint.Win.Chart.SolidFill(System.Drawing.Color.Black);
FarPoint.Win.Chart.LegendArea legend = new FarPoint.Win.Chart.LegendArea();
legend.LegendPos = FarPoint.Win.Chart.LegendPos.Left;
legend.Border = new FarPoint.Win.Chart.SolidLine(System.Drawing.Color.Blue);
legend.Fill = new FarPoint.Win.Chart.SolidFill(System.Drawing.Color.Yellow);
legend.TextFont = new System.Drawing.Font("Comic Sans MS", 10);
legend.TextFill = new FarPoint.Win.Chart.SolidFill(System.Drawing.Color.Black);
FarPoint.Win.Chart.ChartModel model = new FarPoint.Win.Chart.ChartModel();
model.LabelAreas.Add(Label);
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, 300);
chart.Location = new Point(10, 10);
chart.Model = model;
fpSpread1.Sheets[0].Charts.Add(chart);
Dim aseries As New FarPoint.Win.Chart.AreaSeries
aseries.SeriesName = "Series1"
aseries.Values.Add(2.0)
aseries.Values.Add(4.0)
aseries.Values.Add(3.0)
aseries.Values.Add(5.0)
aseries.AreaFill = New FarPoint.Win.Chart.GradientFill(Color.Azure, Color.Bisque)
Dim aseries1 As New FarPoint.Win.Chart.AreaSeries
aseries1.SeriesName = "Series2"
aseries1.Values.Add(1.0)
aseries1.Values.Add(2.0)
aseries1.Values.Add(4.0)
aseries1.Values.Add(8.0)
aseries1.AreaFill = New FarPoint.Win.Chart.GradientFill(Color.Azure, Color.Bisque)
aseries.AreaBorder = New FarPoint.Win.Chart.SolidLine(Color.Blue)
Dim plotArea As New FarPoint.Win.Chart.YPlotArea()
plotArea.Location = New PointF(0.2F, 0.2F)
plotArea.Size = New SizeF(0.6F, 0.6F)
plotArea.Series.Add(aseries)
plotArea.Series.Add(aseries1)

Dim Label As New FarPoint.Win.Chart.LabelArea()
Label.Text = "Area Chart"
Label.Border = New FarPoint.Win.Chart.SolidLine(System.Drawing.Color.Blue)
Label.Fill = New FarPoint.Win.Chart.SolidFill(System.Drawing.Color.Yellow)
Label.Location = New PointF(0.5F, 0.02F)
Label.TextFont = New System.Drawing.Font("Comic Sans MS", 10)
Label.TextFill = New FarPoint.Win.Chart.SolidFill(System.Drawing.Color.Black)
Dim legend As New FarPoint.Win.Chart.LegendArea()
legend.LegendPos = FarPoint.Win.Chart.LegendPos.Left
legend.Border = New FarPoint.Win.Chart.SolidLine(System.Drawing.Color.Blue)
legend.Fill = New FarPoint.Win.Chart.SolidFill(System.Drawing.Color.Yellow)
legend.TextFont = New System.Drawing.Font("Comic Sans MS", 10)
legend.TextFill = New FarPoint.Win.Chart.SolidFill(System.Drawing.Color.Black)
Dim model As New FarPoint.Win.Chart.ChartModel()
model.LabelAreas.Add(Label)
model.LegendAreas.Add(legend)
model.PlotAreas.Add(plotArea)
Dim chart As New FarPoint.Win.Spread.Chart.SpreadChart()
chart.Size = New Size(400, 300)
chart.Location = New Point(10, 10)
chart.Model = model
FpSpread1.Sheets(0).Charts.Add(chart)
継承階層

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Chart.LegendPos

参照

FarPoint.Win.Chart 名前空間

 

 


© 2004-2015, GrapeCity inc. All rights reserved.