Quantcast
Channel: KNIME RSS
Viewing all articles
Browse latest Browse all 4157

D3 example workflow in KNIME 3.3 not working

$
0
0

Hi,

Having just updated to KNIME 3.3 I decided to have a play with the JavaScript nodes. I had a look over the blog post about D3 charting (https://www.knime.org/blog/from-d3-example-to-interactive-knime-view-in-10-minutes) and downloaded the workflow to tinker with. As it is, it works fine, but since it uses a deprecated version of the Generic View I thought I’d see if I could run the code in the current version of the node.

Unfortunately it doesn’t work. Without modifying the code at all I get the error: “TypeError: Unable to get property ‘format’ of undefined or null reference” followed by a long stack trace (see attached). The error seems to be centred on RequireJS. Any idea what’s going on there?

I did wonder if it had something to do with versions of D3, since the newer node refers to D3 v4.2.6 while the original code uses v3, as supplied by the older node. So, I tried calling require.config(…) to load D3 v3 and then wrapped the original code in a require(['d3'], function (d3) {…}) function. Sadly no success here either. I don’t get an error, but neither is anything drawn to the canvas. I could be doing something wrong, of course, but does anyone have any ideas why it isn’t drawing?

I’ve attached the workflow, in case anyone wants to have a look.

Finally, is there any plan to develop a more flexible way of loading external libraries? Being able to add library definitions to the Dependencies box in the node dialogue would be really handy.

Cheers,

Richard


Viewing all articles
Browse latest Browse all 4157

Trending Articles