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 SaveToFile function fails when adding Series Circular
Re: The SaveToFile function fails when adding Series Circular
Hi Chen,
I've translated your code to VB6 and it seems to work fine for me with both v2010.0.0.3 and the actual v2012.0.0.8
Please, try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
I've translated your code to VB6 and it seems to work fine for me with both v2010.0.0.3 and the actual v2012.0.0.8
Code: Select all
Private Sub Form_Load()
TChart1.AddSeries scBar
TChart1.AddSeries scCircularGauge
TChart1.Export.SaveToFile "C:\tmp\new.tee"
TChart1.ClearChart
TChart1.Import.LoadFromFile "C:\tmp\new.tee"
End Sub
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: The SaveToFile function fails when adding Series Circular
Hi Yeray,
you missed the following code
for (int i = 0; i < chart1->SeriesCount; i++)
{
chart1->aSeries->Clear();
}
Please add this and test it again.
you missed the following code
for (int i = 0; i < chart1->SeriesCount; i++)
{
chart1->aSeries->Clear();
}
Please add this and test it again.
Re: The SaveToFile function fails when adding Series Circular
Hi Chen,
Excuse me, you are right.
It seems there's a problem when exporting a CircularGauges that has been Cleared. I've added it to the wish list to be revised for next releases (TV52016300).
In the meanwhile, you could give a Value to this series before exporting it. Ie:
Excuse me, you are right.
It seems there's a problem when exporting a CircularGauges that has been Cleared. I've added it to the wish list to be revised for next releases (TV52016300).
In the meanwhile, you could give a Value to this series before exporting it. Ie:
Code: Select all
TChart1.Series(i).asCircularGauge.Value = 0
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |