Column Selection Widget Error

I’m trying to use the Column Selection widget to feed a selected column to a bar chart. I get the following error. Any help would be appreciated.

Node: 51:0:55
Message: Error in script
TypeError: Cannot read property ‘length’ of null
TypeError: Cannot read property ‘length’ of null
at processData (eval at fn (file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//org/knime/dynamic/js/dynamicJSNode.js:103:37), :657:44)
at drawChart (eval at fn (file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//org/knime/dynamic/js/dynamicJSNode.js:103:37), :221:13)
at Object.window.knimeGroupedBarChart.barChart.init (eval at fn (file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//org/knime/dynamic/js/dynamicJSNode.js:103:37), :108:9)
at file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//org/knime/dynamic/js/dynamicJSNode.js:108:41
at Object.execCb (file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//js-lib/requireJS/2.1.8/require.js:29:229)
at X.check (file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//js-lib/requireJS/2.1.8/require.js:18:423)
at X. (file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//js-lib/requireJS/2.1.8/require.js:23:9)
at file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//js-lib/requireJS/2.1.8/require.js:8:70
at file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//js-lib/requireJS/2.1.8/require.js:23:369
at y (file:///C:/Users/genef/AppData/Local/Temp/knimeViewContainer54901//js-lib/requireJS/2.1.8/require.js:7:172)

Hi,
Can you provide more information so we can reproduce the error?
An example workflow would be the best.

Works if reset manually. Won’t work inside interactive dashboard.
REF Challenge 6 w Dashboard.knwf (806.3 KB)

@rfeigel
I can confirm that there is something wrong with resetting the Bar Chart node while the aggregation mode is “Occurrence Count” (there is also a typo in the node’s configuration). The node displays everything well in the first run but as soon as you choose another column, everything goes wrong.

But still you have other options to do the same thing. You can use Constant Value Column or Math Formula to add a new column with a constant value of 1 and then in the Bar Chart node set the aggregation to “Sum” and include the new column. So it works the same as occurrence count.
Or you can use a GroupBy node, include the selected column using flow variables (as grouping column) and count one of the other columns (you can count ID and don’t forget to filter it before the column selection widget).

This is the modified version of your workflow in which I have implemented my suggestions:
REF Challenge 6 w Dashboard-modified.knwf (80.6 KB)

To KNIME: The node takes the values of the included column as the result of the aggregation only if the same column is chosen as the category column. So to reproduce this error you need a numeric column and include it in the Bar Chart node and pass the column name as variable to the node configurations and set it as the category column as well. Then you see the values of column as occurrence count. If the category column and the included column are not the same, the node throws an error when it gets reset in the same view. Closing the view and opening it again with the new configurations will not cause any errors.

1 Like

Thank you very much. I wouldn’t have figured out the workaround. Any idea when the bug will be fixed and will it be announced?

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