method Clear() on Series does not work
Posted: Thu May 28, 2009 2:04 pm
I am using C++Builder6 and TeeChartPro6 for Builder6.
I have a problem using the Clear() method on a Series : it does not work.
The Series is never cleared.
If I try to add new Values after clearing the Series, I have the old values + the new values.
Delete() does not work either.
There is something wrong but I dont know where.
Thanks for your help.
Following very simple code with a button that clear the Series and Add new Values.
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Series1->Clear();
for(int i=0;i<8;i++) {
Series1->AddBar(random(20), i ,clBlue);
}
}
Thanks,
Bernard.
I have a problem using the Clear() method on a Series : it does not work.
The Series is never cleared.
If I try to add new Values after clearing the Series, I have the old values + the new values.
Delete() does not work either.
There is something wrong but I dont know where.
Thanks for your help.
Following very simple code with a button that clear the Series and Add new Values.
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Series1->Clear();
for(int i=0;i<8;i++) {
Series1->AddBar(random(20), i ,clBlue);
}
}
Thanks,
Bernard.