Profile picture for user raviteja.avvari

Hello there, readers!

Have you ever found yourself in a situation where you needed to have a visualization against a different dimension? Perhaps you achieved this by making a copy of the existing chart and adjusting the dimensions. If that worked for you, great!

Now, let's explore another method to achieve the same goal. Let's learn how to dynamically alter the dimensions of a chart based on a drop-down selection.

Imagine a scenario where you want to switch the x-axis of a bar chart dynamically, depending on the selection in a drop-down menu. The process remains consistent for any app component.

Let's break it down into two parts:

1. Making the selection
2. Passing the selection to the chart and updating it

Part 1

To start, let's add an input component and convert it into a dropdown menu. 

Set the type to manual values. :

Each manual value will have two properties.

  1.  A title/value (This is seen in the drop down)
  2. A column name (This is referred for the selection)

If you want a title different from the column name, simply click on the link icon next to it and enter the column name (remember, it's case-sensitive). Here you dont have to worry about the table it is a part of.

Now, the selection from the dropdown can be stored in a variable. For creating a variable, you could refer to this post (https://www.ariscommunity.com/users/ravitejaavvari/2023-03-06-scriped-columns-aris-process-mining).

 

Part 2

For the second part, let's add a bar chart and configure it to read from the selected variable in the dropdown. To make the x-axis dynamic, let's create a scripted definition. You can find this while adding the new dimension.

The content of the scripted definition should be executed to the column name selected in the dropdown. Here we need to reference the table name like below.

TableName.${variable name}

The variable name is picked up from the selection in the drop down. Because we have ensured that the case sensitive name is provided as a part of manual values it should be replaced here. Here's an example code snippet that shows the table name and the variable name. 


"Purchase to Pay - Enhancement table_csv"."${SelectedDimension}"

Ensure that the value matches exactly what's referenced in the dropdown menu selection. Now assign a number column to the Y-Axis and see the chart update automatically upon the changes in the dropdown.

Happy Process Mining!

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock