Page 1 of 1


Posted: Thu Jun 19, 2014 4:15 pm
by 9347097
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.


Re: LoadChartFromFile?

Posted: Fri Jun 20, 2014 11:33 am
by yeray

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.

Re: LoadChartFromFile?

Posted: Fri Jun 20, 2014 2:57 pm
by 9347097
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 " ...".


Re: LoadChartFromFile?

Posted: Fri Jun 20, 2014 3:00 pm
by 9347097
Update: I changed the link to "v2014." and it's showing now.