Bar Chart with data from Pivot table

Hello,

I do have the following issue:

  • data from an Excel file which is collected in a production area
  • it contains
    • where a problem occured (Place)
      • more than on instance possible
    • which problem occured (event)
      • more than on instance possible

So far I have prepared the data, created a pivot table and made a bar chart for visualzation. For better understanding and a more precise presentation I would like to sort the data descending but until now I could not find a way to sort data in pivot or create a bar chart which shows data listed in a column and not in a row.

https://hub.knime.com/s/khPTxXhgPefZRXJV

Attached the (very simple) workflow.

Every idea to solve the issue is very much appreciated.

kind regards

Gerald

Hi Gerald,

unfortunately the data isn’t included in your workflow, so I cannot have a look into it.

How about using a “Sorter” node right before the “bar chart” node?

Hello Andreas,

I tought I included it into the workflow
 Can you tell me how I could include it so that it is available for you? I can not attach a link to the file even if I upload it to my public space.

I tried the sorter node, but it is (as far as I know) only possible to sort a column and not a row.

Hi,

to include some data into a workflow you can do this:

Grab a file explorer (e.g. windows explorer on Windows systems) and go to the workspace folder.
Navigate then to your current workflow.
(on my system the path looks like this “C:\Users\andi_KNIME\knime-workspace\Bar Chart - Pivot - Forum”)
Create a folder called “data” and copy the excel file into it.

Now it’s included and can be shared with someone else

1 Like

Hello,

I did as described and uploaded the newly exported workflow:

Hi,

thanks! But you added a table which is not related to the workflow.
Anyways.. I created one by myself which should have the structure of the table right before the unpivot node.

I’m wondering why do you need to do this Unpivoting as the bar plots accept columns as categories.

Group setting is: Vorfallsort

Thank you for the effort but I do have a data set which is a little bit more complex (don’t know why it is not included in the workflow - never done this before).

I tried it the way you showed it in your screen-shot, that’s the way it looked with my data:

That’s the way it looks like not sorted:

Hi,
its really hard to guess what you are looking for.

The table I provided was in the structure simular to the table right before your “pivot” node.

Now I created this one here, where I tried to reproduce you original table:

2 Likes

Hallo Andreas,

noch mal vielen Dank fĂŒr deine UnterstĂŒtzung und Geduld. Ich versuche es mal auf Deutsch zu erklĂ€ren, vielleicht gelingt es mir dann besser:

Die aufgezeichneten Daten stellen Ereignisse/VorfĂ€lle in einer Fertigung dar. Die erste Unterscheidung in der Aufzeichnung erfolgt ĂŒber den Vorfallsort (Fertigungsauftrag, AuftragsbestĂ€tigung), danach kommt die Vorfallsart (Toleranz fehlt, Zeichnung unklar,
). Die Auswertung an und fĂŒr sich ist klar, habe ich gemacht und stellt kein Problem dar.

Mir geht es um eine “hĂŒbschere” Darstellung, auch um mehr Leute in meiner Firma von den Möglichkeiten und KapazitĂ€ten von KNIME zu ĂŒberzeugen, in der Form, dass ich die (aktuell zwei, durchaus möglich das es noch mehr werden, Vorfallsorte mit den dazugehörigen Vorfallsarten absteigend grafisch darstelle.

Ich schaffe es nicht, die Daten in jeder Spalte Vorfallsort separat absteigend zu sortieren, und in einer Grafik darzustellen.

Vielleicht ist diese ErklÀrung besser nachvollziehbar.

GrĂŒĂŸe

Gerald

@GHoertner ein Ansatz könnte sein sich evt auch mit Hilfe von ChatGPT kĂŒnstliche Daten erzeugen zu lassen die das Problem demonstrieren. Dann könnte man auch verstehen was ‘absteigend’ bedeutet. Dann vielleicht eine kurze Skizze welcher Ausgang erwartet wird.

Was ich empfehlen kann ist heute Graphiken mit Python zu erzeugen und dann KNIME als OberflĂ€che der Teile zu nutzen die man flexible Ă€ndern können wird. Das ist einmaliger Aufwand und dann hat man das gewĂŒnschte Chart fertig.

1 Like

Hi Gerald,

Alles klar. Hab ich verstanden.

Wenn du richtig hĂŒbsche Plots haben möchtest, nutze entweder wie von Markus beschrieben die Python Plots oder die Generic E-Charts. Beide kannst Du super mit Hilfe von K-AI oder den allgemeinen LLMs wie ChatGPT easy anpassen.

In deinen Posts konnte ich leider nicht erkennen, welche Darstellung wĂŒnschst.

Super Vorlagen und ein schönen Überblick findest du hier:

Oder by Apache echarts:

1 Like

@ActionAndi this indeed is a good idea. KNIME is integrating the K-AI assistant with the E-Charts. It might be worth exploring that since they seem to be very powerful and with LLM support there might not be a need for massive coding - just chatting :slight_smile: .