PowerTools SPREAD for Windows Forms 8.0J
AreaFills プロパティ (AreaSeries)


系列の面塗りつぶしのコレクションを取得します。
構文
'Declaration
 
Public ReadOnly Property AreaFills As FillCollection
'使用法
 
Dim instance As AreaSeries
Dim value As FillCollection
 
value = instance.AreaFills
public FillCollection AreaFills {get;}
次のサンプルコードは、面の塗りつぶしを取得します。
        FarPoint.Win.Chart.AreaSeries aseries = new FarPoint.Win.Chart.AreaSeries();
        FarPoint.Win.Chart.AreaSeries aseries1 = new FarPoint.Win.Chart.AreaSeries();

        private void Form1_Load(object sender, EventArgs e)
        {            
            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(System.Drawing.Color.Aquamarine, System.Drawing.Color.DarkBlue);
                        
            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.Coral, Color.Crimson);
            aseries1.AreaBorder = new FarPoint.Win.Chart.SolidLine(Color.DarkSalmon);

            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.ChartModel model = new FarPoint.Win.Chart.ChartModel();
            model.PlotAreas.Add(plotArea);
            fpChart1.Model = model;
           
        }

    private void button1_Click(object sender, EventArgs e)
        {
           aseries.Values.Clear();

            aseries1.Values[3] = 1;

            double v;
            v = aseries1.Values[3];
            textBox1.Text = v.ToString();

aseries1.AreaFills[1] = new FarPoint.Win.Chart.GradientFill(System.Drawing.Color.Aquamarine, System.Drawing.Color.DarkBlue);
            object effect;
            effect = aseries1.AreaFills[1];
            textBox1.Text = effect.ToString();
    }
Dim aseries As New FarPoint.Win.Chart.AreaSeries
Dim aseries1 As New FarPoint.Win.Chart.AreaSeries

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        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.Aquamarine, Color.DarkBlue)

        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.Coral, Color.Crimson)
        aseries1.AreaBorder = New FarPoint.Win.Chart.SolidLine(Color.DarkSalmon)

        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 model As New FarPoint.Win.Chart.ChartModel()
        model.PlotAreas.Add(plotArea)
        fpChart1.Model = model
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        aseries.Values.Clear()
        aseries1.Values(3) = 1

        Dim v As Double
        v = aseries1.Values(3)
        TextBox1.Text = v.ToString()

        aseries1.AreaFills(1) = New FarPoint.Win.Chart.GradientFill(Color.Aquamarine, Color.DarkBlue)
        Dim effect As Object
        effect = aseries1.AreaFills(1)
        TextBox1.Text = effect.ToString()
    End Sub
End Class
参照

AreaSeries クラス
AreaSeries メンバ

 

 


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