bar chart with nominal values

Hi,
First sorry for my awful english.
I have a problem with bar chart and nominal values.
The problem is that I want to see more than a single bar chart in a single image produced from the bar chart node with nominal values. I’ll show you an example:
|BOY OR GIRL| |DO YOU LIKE SCHOOL|
boy - yes a lot
boy - yes
girl - yes a lot
boy - not a lot
girl - yes
This is a simple example as I can’t share the real dataset. The question is how I can made a bar chart that contain this two categories which they have nominal values inside? I see that works with integers, as I could choose more than a column and plot them.
The problem is that the menu option show me only one category from the column category which contain nominal values [S] while I want more than one column, in the previously example I want to plot both the column for example.
I also tried to convert a columns [S] into a column [I] and then plot the result, but the console show me this message: “Values in 29 cells could not be parsed, first error: ‘Girl’ (RowKey: Row0, Position: 8)”, and I don’t know how to solve it
Thanks for the help.

Is this what you are trying for?

Or a single stacked bar per category?

2 Likes

I, thanks for the help!
Yes, I want to do this, can you explain me?

Have you tried the GroupBy node to prep for the graph? Select Boy or Girl column as group, and aggregate Do You Like column as count.

It doesn’t work. It’s strange, for example in the pie chart there is not this prblem, I could choose [S] variables, while the bar chart accept only Integer values to compare. I’m asking how they succed to make the graphic you show me. Where I can found the source of that graphic?

bar_chart.knwf (74.6 KB)

1 Like

Thanks for the help, really. I just have only one another question. How does it works the column expression node?

The Column Expression node is just putting the number 1 on each row as simple way to get a numerical count per entry. Having a row level numerical count simplifies aggregation during pivoting. There are always a ton of ways to do things in KNIME. I just went this way because it was fastest.

1 Like

Okay thanks for all!

No problem! Please mark the solution when you get a chance. It will help later users to quickly identify a solution to similar problems.

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