jlmontes@rauroszm.com Posted September 17, 2016 Share Posted September 17, 2016 Hello, I have one TuniURLFrame with this HTML: <!DOCTYPE html> <html style="height:95%"> <head> <script src="/files/TeeChart/teechart.js" type="text/javascript"></script> <script type="text/javascript"> var Chart1; function draw() { Chart1=new Tee.Chart("canvas"); Chart1.panel.transparent=true; Chart1.walls.back.format.shadow.visible=true; Chart1.title.text=""; Chart1.addSeries(new Tee.Line()).addRandom(1000); resize(Chart1); }; function resize(chart) { if (!chart) return; var canvas = chart.canvas; var w=800; canvas.width=w; canvas.setAttribute('width', ""+w+"px"); var h=800; canvas.height=h; canvas.setAttribute('height', ""+h+"px"); canvas.style.width=""+w+"px"; canvas.style.height=""+h+"px"; chart.bounds.width=w; chart.bounds.height=h; chart.draw(); }; </script> </head> <body onload="draw()" onresize="resize(Chart1)" style="margin:0; padding:0; min-height:100%; height:100%; overflow:hidden"> <br><canvas id="canvas" style="height:400; width:800; align: center;"> </canvas> </body></html> This html works wel. When in the delphi source code execute this command: UniSession.AddJS( 'Chart1.addSeries(new Tee.Line()).addRandom(1000);') I get one error: "Chart1 is not defined" How I can access to Chart1 var?? Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 18, 2016 Share Posted September 18, 2016 Hi, Which version and edition UniGUI are you using?! Best regards. Quote Link to comment Share on other sites More sharing options...
jlmontes@rauroszm.com Posted September 18, 2016 Author Share Posted September 18, 2016 Trial 0,99.96 build 1321. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.