Spread Windows Forms 8.0 Product Documentation
Clear Method (DoubleCollection)
Example 


Removes all double values from the collection.
Syntax
'Declaration
 
Public Sub Clear() 
'Usage
 
Dim instance As DoubleCollection
 
instance.Clear()
public void Clear()
Example
This example uses the Clear method.
        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
Requirements

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

See Also

Reference

DoubleCollection Class
DoubleCollection Members

 

 


Copyright © GrapeCity, inc. All rights reserved.