How to pass charts parameters when there are 2 Arguments

Stimulsoft Dashboards.WEB discussion
Post Reply
jlorue
Posts: 126
Joined: Thu Apr 15, 2021 6:33 pm

How to pass charts parameters when there are 2 Arguments

Post by jlorue »

Hi,
I have a bar chart in a Dashboard that has 2 Arguments:
- Year
- Location
, and I need to click on any bar to open a new Dashboard passing both values.

In the interaction section, I defined a parameter called "Year" with value = {Argument}. It works great given that when I click on the bar, it opens the new Dashboard passing the correspondong year value.

However, I do not know how to pass the 2nd parameter (Location) that also corresponds to an Argument.

Please take a look at the attached image. What should I do to create a new parameter called "Location"?

Thanks,
Jose Luis
Attachments
Arguments.png
Arguments.png (163.96 KiB) Viewed 1416 times
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: How to pass charts parameters when there are 2 Arguments

Post by Max Shamanov »

Hello,

Please check the attached dashboard file.

Thank you.
Attachments
SalesOverview.mrt
(302.64 KiB) Downloaded 142 times
jlorue
Posts: 126
Joined: Thu Apr 15, 2021 6:33 pm

Re: How to pass charts parameters when there are 2 Arguments

Post by jlorue »

Thanks Max!
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: How to pass charts parameters when there are 2 Arguments

Post by Max Shamanov »

Hello,

You are welcome!
emanuelv
Posts: 20
Joined: Fri Sep 13, 2019 5:46 pm

Re: How to pass charts parameters when there are 2 Arguments

Post by emanuelv »

I know that this question is pretty old but I am running into the same issue and I don't believe that the supplied SalesOverview.mrt report file actually addresses the original question. In the original question, the chart has two arguments: "year" and "Location". When the Interaction is set up on a click, (second screenshot in the original question), they are passing down the Year as the {Argument}. This works in earlier versions of Stimulsoft since {Argument} appears to be set to the first argument (in this case, "year"). However, I have seen that in the latest version of Stimulsoft, {Argument} seems to be set to ALL of the arguments concatenated together by a " - ". For example, if "year" is "2023" and "Location" is "USA", then {Argument} becomes "2023 - USA". So, how can I specify just the year or just the location? I've tried the equivalent of {Argument[0]}, {Argument[year]}, {Argument["year"]} and {Argument.year} and none have worked.

You can see this with the SalesOverview.mrt file that was supplied as an answer earlier in this post.

1) As seen in the first screenshot, add "Product Price" as a second argument and set it to "TargetSales.Price".
stimulsoft_chart_arguments.png
stimulsoft_chart_arguments.png (12.16 KiB) Viewed 205 times
2) Notice in the Interaction setup window (second screenshot), when the bar chart is clicked on, it is supposed to show a second dashboard passing in 4 parameters. The first parameter is "Name" and it is set to {Argument}. The problem is that there are TWO arguments: "Product Name" and "Product Price" (as seen in the first screenshot). So, what Stimulsoft actually sends down is BOTH of those arguments concatenated by " - ".
stimulsoft_interaction_setup_window.png
stimulsoft_interaction_setup_window.png (23.4 KiB) Viewed 205 times
3) This can be seen in the third screenshot. When the bar chart is clicked on, the second dashboard shows up with that first text block showing the "Name" parameter. But it shows "Baconator - 5.99" instead of just "Baconator". So the question is: If the chart has multiple arguments, how can you specify a single one when passing it down as a parameter in an Interaction? Specifying something like {Argument["Product Name"]} does not work.
stimulsoft_second_dashboard.png
stimulsoft_second_dashboard.png (5.55 KiB) Viewed 205 times
I'm attaching the modified SalesOverview.mrt and I'm using Stimulsoft 2024.1.2
Attachments
SalesOverview.mrt
(304.12 KiB) Downloaded 28 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to pass charts parameters when there are 2 Arguments

Post by HighAley »

Hello,

Finally, there is one argument in the chart.
We will check if we can make an improvement for this.

Thank you.

Ticket reference: #13974
Post Reply