简体   繁体   English

将 Highcharts 图表添加到 draw2d canvas

[英]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.我想知道是否有办法将用Highcharts制作的图表添加到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 . 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:)谢谢你的建议:)

I've figured out a solution, converting the svg to an image and use SetFigure class from draw2d to insert it in the canvas.我想出了一个解决方案,将 svg 转换为图像并使用draw2d中的 SetFigure class将其插入 canvas 中。

draw2d.SetFigure;

You can find an example here of the implementation with canvg or with vanilla js.您可以在此处找到使用 canvg 或使用 vanilla js 的实现示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM