Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 100 - Methods RemoveAt and Remove, don't remove the markers of NumericGauges
Summary: Methods RemoveAt and Remove, don't remove the markers of NumericGauges
Status: RESOLVED NOTABUG
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: TeeChart.NET 2013 4.1.2013.11080
Hardware: PC Windows
: --- major
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-14 04:53 EST by sandra pazos
Modified: 2013-11-14 07:42 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sandra pazos 2013-11-14 04:53:02 EST
When you use the methods RemoveAt or Series.Remove to clear Numeric Gauges, the Gauge is removed but its markers not. The method works in correct way for the other series.  See next code to reproduce the problem: 

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
          Steema.TeeChart.Styles.NumericGauge num = new Steema.TeeChart.Styles.NumericGauge();
          tChart1.Series.Add(num);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            tChart1.Series.RemoveAt(0); //tChart.Series.Remove(); 
            tChart1.Refresh();

        }
Comment 1 christopher ireland 2013-11-14 07:42:30 EST
This is not a bug. The reason is that neither Remove nor RemoveAt are designed to Dispose of the series. You can see this in the comment of the SeriesCollection.RemoveAllSeries, which says, "Removes all Series from the Chart but not disposes (destroys) them".

You will note that calling Dispose on the series works as expected:

    Steema.TeeChart.Styles.NumericGauge num;

    private void InitializeChart()
    {
      num = new Steema.TeeChart.Styles.NumericGauge();
      tChart1.Series.Add(num);

      num.FillSampleValues();
    }

    private void button1_Click(object sender, EventArgs e)
    {
      num.Dispose();
    }