0

These is my code to export a chart as an image, but i am not able to add text to it. Please help out to solve this issue.add only the exporting part, if u need full code i'll forward you.

<body>
  <div class="container">
    <canvas id="canvas" height="300" width="500"></canvas>
    <br/><br/>
    <button id="save-btn">Save Chart Image</button>
  </div>

  <script>
    $("#save-btn").click(function() {
      $("#canvas").get(0).toBlob(function(blob) {
        saveAs(blob, "chart_1.png");
      });
    });
  </script>
</body>
Aelphaeis
  • 2,593
  • 3
  • 24
  • 42
user3686600
  • 121
  • 6

0 Answers0