The SaveToFile function fails when adding Series Circular
Posted: Fri Aug 10, 2012 10:56 am
Hi,
The version of TeeChart is 2010.0.0.3, SaveToFile funtion fails when adding Series Circular Gauge to TeeChart.Please see the following test Code
#include "stdafx.h"
using namespace std;
void RunTeeChart( );
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize(NULL);
RunTeeChart( );
CoUninitialize();
return 0;
}
void RunTeeChart( )
{
using namespace TeeChart;
ITChartPtr chart1;
_com_util::CheckError(chart1.CreateInstance(__uuidof(TeeChart::TChart)));
chart1->SetTheme(TeeChart::EChartTheme::ctDefault,TeeChart::EColorPalette::cpTeeChart);
chart1->AddSeries(scBar);
chart1->AddSeries(scCircularGauge); //if delete this line the SaveToFile function will works well
for (int i = 0; i < chart1->SeriesCount; i++)
{
chart1->aSeries->Clear();
}
chart1->Export->SaveToFile(L"new.tee"); // SaveToFile fails and throw an exception
}
please tell me how to use it correctly or give me a fix , thanks.
Regards,
Haitao Sun
CA Technologies
Senior Software Engineer
Tel: +86-10-58162132
Fax:+86-10-58162300
Haitao.Sun@ca.com
The version of TeeChart is 2010.0.0.3, SaveToFile funtion fails when adding Series Circular Gauge to TeeChart.Please see the following test Code
#include "stdafx.h"
using namespace std;
void RunTeeChart( );
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize(NULL);
RunTeeChart( );
CoUninitialize();
return 0;
}
void RunTeeChart( )
{
using namespace TeeChart;
ITChartPtr chart1;
_com_util::CheckError(chart1.CreateInstance(__uuidof(TeeChart::TChart)));
chart1->SetTheme(TeeChart::EChartTheme::ctDefault,TeeChart::EColorPalette::cpTeeChart);
chart1->AddSeries(scBar);
chart1->AddSeries(scCircularGauge); //if delete this line the SaveToFile function will works well
for (int i = 0; i < chart1->SeriesCount; i++)
{
chart1->aSeries->Clear();
}
chart1->Export->SaveToFile(L"new.tee"); // SaveToFile fails and throw an exception
}
please tell me how to use it correctly or give me a fix , thanks.
Regards,
Haitao Sun
CA Technologies
Senior Software Engineer
Tel: +86-10-58162132
Fax:+86-10-58162300
Haitao.Sun@ca.com