How to export template without data?

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
cimdev
Newbie
Newbie
Posts: 4
Joined: Mon Nov 27, 2006 12:00 am

How to export template without data?

Post by cimdev » Thu Feb 09, 2012 3:50 am

Fisrt,
I have tried

Code: Select all

chart.getExport().getTemplate().toFile("d:\\test.tej");
but the exported test.tej still inclueds series data, and can't be used for live chart (runtime loading the exported tej file) :(

Second,
We bought TeeChart Pro V2 at 2012/01, and no one told us the new version (TeeChart 2012) will be come out so early, It's unendurable!! :oops:

cimdev
Newbie
Newbie
Posts: 2
Joined: Thu Jan 01, 1970 12:00 am

Re: How to export template without data?

Post by cimdev » Thu Feb 09, 2012 5:13 am

I forgot to change my account ...

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to export template without data?

Post by Yeray » Thu Feb 09, 2012 10:16 am

Hi,
cimdev wrote:the exported test.tej still inclueds series data, and can't be used for live chart (runtime loading the exported tej file) :(
You could remove all the series after loading the tej file:

Code: Select all

chart.getSeries().removeAllSeries();
cimdev wrote:We bought TeeChart Pro V2 at 2012/01, and no one told us the new version (TeeChart 2012) will be come out so early, It's unendurable!! :oops:
We are studying your case and we'll contact you soon.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

cimdev
Newbie
Newbie
Posts: 2
Joined: Thu Jan 01, 1970 12:00 am

Re: How to export template without data?

Post by cimdev » Wed Feb 15, 2012 4:48 am

Thanks for ypur reply, I have tried

Code: Select all

			
Chart a = chart.getImport().getTemplate().fromFile("d:\\test.tej");
a.getSeries().removeAllSeries();
chart.setChart(a);
it's work,
but all of series lose color property :shock: , I don't think it's right way...

besides,
Docs\Tutorials told us:
Data may optionally be included with the tee template according to your preference.
if the exported template always contains series data,
how could we reduce the storage and transfer bandwidth ? :?:

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to export template without data?

Post by Yeray » Fri Feb 17, 2012 4:04 pm

Hi,

Have you tried clearing all the series points instead of removing them completely?

Code: Select all

for (int i=0; i<tChart1.getSeriesCount(); i++) {
  tChart1.getSeries(i).clear();
}
Right, the tutorials give confusing information. I've added to the wish list the possibility to choose if the data has to be exported to the .tej or not (TJ71016041).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply