LoadChartFromFile?

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
Jim Green
Newbie
Newbie
Posts: 43
Joined: Thu Aug 03, 2006 12:00 am

LoadChartFromFile?

Post by Jim Green » Thu Jun 19, 2014 4:15 pm

Is there any equivalent to LoadChartFromFile? I have Delphi VCL server code that produces a TChart, converts it to a PNG, and returns the image to the browser to display in an IMG. It would be preferable to render the chart in the browser, to avoid transmitting image data and to have the chart redrawn if the browser is resized. But I don't want to rewrite all our Delphi chart code in JavaScript. So it would be great if we could just create a small .tee file on the server and send that back to the Tee.Chart to display.

TIA.

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

Re: LoadChartFromFile?

Post by Yeray » Fri Jun 20, 2014 11:33 am

Hello,

Have you seen the exportation from TeeChart VCL to Javascript? You can directly generate an htm page from a VCL chart without having to rewrite all the chart.
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

Jim Green
Newbie
Newbie
Posts: 43
Joined: Thu Aug 03, 2006 12:00 am

Re: LoadChartFromFile?

Post by Jim Green » Fri Jun 20, 2014 2:57 pm

Are you referring to TeeSaveToJavascriptFile? What is the procedure - to insert the output into an <iframe>? Will the chart re-draw if the container is resized?

BTW, I did export a simple chart with one bar series and tried viewing it in Firefox and Chrome. Neither chart rendered except for the title. Chrome reports "Uncaught TypeError: The 1st argument is neither an array, nor does it have indexed properties."; Firefox reports "TypeError: Argument 1 of CanvasRenderingContext2D.setLineDash can't be converted to a sequence". The generated script link is to "http://www.steema.com/files/public/teec ... 12.09.30.1".

Thanks.

Jim Green
Newbie
Newbie
Posts: 43
Joined: Thu Aug 03, 2006 12:00 am

Re: LoadChartFromFile?

Post by Jim Green » Fri Jun 20, 2014 3:00 pm

Update: I changed the link to "v2014.04.28.1.6" and it's showing now.

Post Reply