changxin commited on
Commit
61849f9
1 Parent(s): 4462a19

Update wps-test/ui/chartjs.html

Browse files
Files changed (1) hide show
  1. wps-test/ui/chartjs.html +2 -2
wps-test/ui/chartjs.html CHANGED
@@ -1,4 +1,4 @@
1
- <head><meta chartset="utf-8">
2
  <script src="https://cdn.staticfile.org/Chart.js/3.9.1/chart.js"></script>
3
  </head>
4
  <body>
@@ -22,7 +22,7 @@ const myChart = new Chart(ctx, {type: 'bar',
22
  </body>
23
  <script>
24
  function fx(){
25
- var a=canvas.get(0).toDataURL('image/png');
26
  document.getElementsByTagName('p')[0].innerText=a
27
  }
28
  </script>
 
1
+ <head><meta chartset="utf-8">
2
  <script src="https://cdn.staticfile.org/Chart.js/3.9.1/chart.js"></script>
3
  </head>
4
  <body>
 
22
  </body>
23
  <script>
24
  function fx(){
25
+ var a=document.getElementById('myChart').toDataURL();
26
  document.getElementsByTagName('p')[0].innerText=a
27
  }
28
  </script>