Search code examples
javascripthighchartsdraw2d-js

Adding Highcharts chart to draw2d canvas


I was wondering if there is a mean to add a graph made with Highcharts into a draw2d canvas. I tried to use the class made to import external SVG SVGFigure, but it seems like the SVG is too complex to be used with this class according to this and my test.

draw2d.SVGFigure;

Thank you for your suggestions :)


Solution

  • I've figured out a solution, converting the svg to an image and use SetFigure class from draw2d to insert it in the canvas.

    draw2d.SetFigure;
    

    You can find an example here of the implementation with canvg or with vanilla js.