Generic eCharts View SVG Rendering

Hi KNIMERs,

I really love this node because you can fully customize the graph beyond CSS capabilities. Recently, I was generating a Heat map with it and I realize that one cannot download the graph as a vector for further working with it.

I try applying:

image

This is from the eCharts webpage but it is not working.

Any Ideas on how to get the SVG from the graph?

Thanks in advance,

AG.

Hello @VAGR_ISK,

Unfortunately, I do not believe you are able to export the view as an SVG directly, but you can add a tooltip to download a PNG of the view (which you can then convert to SVG if needed)

Add the following to your echarts code:

  toolbox: {
    feature: {
      saveAsImage: {
        name: "default_name",
        show: true,
      }
    }
  }

You can find more info below from comment from @armingrudd :

Hope this helps,
TL

3 Likes

Hi @VAGR_ISK,

views will be able to output crispy SVGs directly in the 5.4 release of KNIME AP (you can already try it in the nightly version).

Best,
Manuel

Edit: I was just informed that it’s not the case (yet) for this view :frowning:

Hi,

Thanks for the try. I ran into several emotions reading you post such as:

:star_struck: → :thinking: → :upside_down_face: → :disappointed_relieved:

1 Like

Ok, I give up on the topic, which is beyond my knowledge area.

However, I leave all the data whether someone, smarter than me, can manage to get this working.

There is indeed a SVG rendering possibility with Echarts. However, it requires that KNIME have the default module or KNIME should allow the users to install modules.

Here there is a screenshot of how to do it:

Here I include the link to the documentation pointing to this screenshot information:

https://echarts.apache.org/handbook/en/best-practices/canvas-vs-svg

Wishing that someone mnage to get it throw.

Cheers,

AG.

Thanks. it works for PNGs.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.