Executes JavaScript code to generate a view. The code in the script editor is executed when displayed in the view (right-click -> Interactive View) or in the KNIME server web portal.
Within the java script code block you have access to the input table and can use a set of predefined libraries to generate the view.
Note, this node is currently under development. Future versions of the node will have more functionality, including the ability to define and use templates and to generate a static view/image output.
The list contains the flow variables that are currently available at the node input. Double clicking any of the entries will insert the respective identifier at the current cursor position in the JavaScript editor.
Choose from the list of available JavaScript library dependencies. Any entries selected here are available at runtime of the view. Note that this list will be expanded in the future.
Enter optional CSS instructions for styling the view.
Example
Change the standard font used for rendering for the whole document:
html, body {font-family: sans-serif;}Enter the JavaScript code to be executed. All HTML elements have to be created in the JavaScript and appended to the <body> element.
If data is available at the input port, a JavaScript object knimeDataTable is automatically created and populated.
The methods available on this object are:
Example
Loop over all values contained in the table object and process only number types:
var rows = knimeDataTable.getRows(); for (var rowID = 0; rowID < knimeDataTable.getNumRows(); rowID++) { var row = rows[rowID]; for (var colID = 0; colID < knimeDataTable.getNumColumns(); colID++) { if (knimeDataTable.getColumnTypes()[colID] === 'number') { var value = row.data[colID]; // process value } } }
You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.
To use this node in KNIME, install the extension Foodprocess-Lab from the below update site following our NodePit Product and Node Installation Guide:
A zipped version of the software site can be downloaded here.
Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com, follow @NodePit on Twitter or botsin.space/@nodepit on Mastodon.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.