<PARAM NAME = "Base64" ..> doesn't work

TeeChart for ActiveX, COM and ASP
Post Reply
oleg
Newbie
Newbie
Posts: 1
Joined: Mon Sep 27, 2004 4:00 am
Location: Novato, CA
Contact:

<PARAM NAME = "Base64" ..> doesn't work

Post by oleg » Wed Sep 29, 2004 2:43 pm

Whet I use base64 <PARAM> tag in <OBJECT> declaration for TeeChart v7 on the HTML page, nothing happens.

I create chart in VB and save the HTML page with <PARAM Name="Base64" Value="...." where Value is the chart with data saved from VB using .Export.asNative.ToBase64Stream

Is it supposed to work?

Thanks

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Sep 29, 2004 5:09 pm

Hi,

please read the TeeChart Pro Tutorials (10 - Walk-through VBScript examples ).
Only TeeChart formatting parameters, which does not inclucde series data,can be saved in the PARAM property.

IndustrialMike
Newbie
Newbie
Posts: 5
Joined: Mon Aug 16, 2004 4:00 am
Location: Western Australia

Post by IndustrialMike » Tue Oct 26, 2004 4:39 am

Oleg - you can achieve something quite close to your goal in a slightly different manner:

Put your base64-encoded data in a hidden span, e.g.
<span id="TeechartData">YDBXAVRQRjA... blah blah...</span>

Then, in your window_onload event, go
document.all("TChart1").Import.LoadFromBase64Stream(TeechartData.innerText);

It's not quite as instantaneous as having the chart configuration + data included in the object tag (I also wanted to do that), because you have to wait till the page is fully rendered before the window_onload event will fire. But in practice it's fast enough, and probably avoids some nasty race conditions anyway.

One caveat: You may lose point labels using this technique - see my posting "AddNullXY loses PointLabel using SaveToStream/LoadFromURL" from Sep 17 2004

Post Reply