Page 1 of 1

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

Posted: Wed Sep 29, 2004 2:43 pm
by 9524319
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

Posted: Wed Sep 29, 2004 5:09 pm
by Pep
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.

Posted: Tue Oct 26, 2004 4:39 am
by 9523557
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