Drop down menu in a plot

Hi, I want to plot a box plot containing the weekly product sales, and I have several doubts:

  1. Currently, we have the data by date, so what do we do if we need to plot the data daily or weekly or over some time period? I used an interactive range filter widget, but it doesn’t seem to work.

  2. I also need to have some kind of drop down menu in the plot, which contains the different products, so that I can compare the sales pattern of say, 2 products and draw some inference.
    I shall appreciate you could help me.

Hi @Anwaya and welcome to the KNIME community forum,

Sorry for the late response. It rarely happens in this forum.

1- You can use the Extract Date&Time Fields node to extract day of the month, week of the year or any other date fields and then plot your data based on this value. Even if you need to add a label periodically based on your data, you can use the Window Loop Start (time based) to loop over a window of time on your data and add a label so that you can plot your data based on this label later.

2- The Interactive Value Filter Widget node does exactly what you need. In the “Options” tab of the node configuration window, you can select the column and values, then in the “Filter” tab -> “Type” section, you can change the selection type (e.g. single value with dropdown list).

:blush:

4 Likes

Hi @armingrudd, thank you so much for your reply. I tried your 2nd point, and though it is giving me a list, it doesn’t provide a drop-down menu. And after I executed this, I observed the following:

  1. Whenever I try to plot the statistics of a certain product, the corresponding changes are not reflected in the plots. What I am trying to do is, there should be empty box plot, bar chart and scatter plot, and whenever I select a product, its statistics should be plotted. What I am getting is, the plots are full of product data, but when I select a particular product, those changes are not being passed on to the graph.

  2. Is there a way I can stack the graphs side by side rather than see them top to bottom? The point I am trying to make is, how can I place the different graphs and the list I generated using the widget so that it is aesthetically appealing?

Hi there @Anwaya,

check out this blog post about interactive dashboards in KNIME:
https://www.knime.com/blog/how-to-create-an-interactive-dashboard-in-three-steps-with-knime

Additionally here is video to see it in action:

Welcome to KNIME Community!

Br,
Ivan

1 Like

Dear @Anwaya,

1- Sorry, I didn’t notice that you said you are using box plot. This plot does not subscribe to filter or selection events. So you need to do filtering in the previous steps (components).

Here I have created a simple example to demonstrate how it works:
24751-1-1.knwf (69.5 KB)

There are 2 components in the workflow. You have to select “Execute and open views” for both of them since the configurations can be set in views.

In the first component view, you can input a time window (here in days) and select 2 values from products. Then after applying the new changes, you can view 2 box plots in the second component view.

When you run this workflow on WebPortal, they appear as steps.

2- I have put the plots in the second component view side by side. To edit the layout of the views, open the component and click on the corresponding icon in the top bar:

This was a quick hint but if you need more, the resources provided by @ipazin are great and of course you can ask any questions here in the forum.

:blush:

3 Likes

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