Troubles dealing with bar chart stacked 100%

Hello Community!

We’ve been having a trouble with the visualization of the bar chart stacked 100%.
We want to visualize two bars of the variable “Type of Transaction” and the payment method used inside of each bar.

After this combination of nodes the output is

We are trying to use the node Math Formula to calculate the percentages, but we didn’t reached the way to do it so far.

Thank you for your help!

Hi @AlexandraM,

the new Bar Chart nodes lack the functionality to automatically scale to 100%. You have to calculate that yourself I am afraid to say. Check out my post for a solution and upvote it so that feature gab gets close :wink:

PS: I quickly created an example workflow for you and future Knimers as this question has been asked recently. If it is a suitable solution, I’d appreciate if you mark my post as one.



Hi @AlexandraM,

79136 – KNIME Community Hub shows how to achieve this for your exact use case. @mwiegand’s solution is much more flexible, but I had already started building my workflow so I thought I’d still share it :wink:

Best regards,


Hello @AlexandraM and welcome to the KNIME community.

You may want to take a look into the following post:



Good day @AlexandraM,
I had similar issues and dug into it a bit deeper. I have published a workflow and component with the results. Basically you can use the Crosstab node to start with as it calculates the row and column percentages and then add the Pivot node.
Good luck :Kurt

1 Like

Very nice solution Kurt, indeed!

Would it make sense to include a missing value node behind the pivot table or round double to avoid any missing values shown as error messages later (setting missings to zero).

Thank you.
Within the component it seems to be unlikely that the tables for visualization have missing values. It would make sense though to fix missing values in a workflow before the component. I have added a Missing Values node ind the corresponding workflow before the component.
Cheers :Kurt

Hello Kurt,

thanks for the quick reply and the update.

I have occasionally had data that resulted in empty cells in crosstabs. The pivot node then turns this into missing values, which are then referred to in the bar chart. I then intercept this via a missing node after the pivot and then get “zero” displayed as a value, which I prefer to “missing”.
But everyone can customise this as required.

Many thanks in any case for the nice solution!

Aha, I see. Yes good idea. Will add it can’t hurt. Thx.