Jump to content

TuniURLFrame Help Needed


jlmontes@rauroszm.com
 Share

Recommended Posts

Hello,

 

I have uniGUI_Professional_0.99.96.1329.

 

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
 
 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...