I have a bit of a head scratcher here, specifically with how I am going to structure this.
What I need to accomplish is to have the 5 dropdowns input values to the chart in a “combined” fashion, that is to say, #Selection1 will have 5 values, #Selection2 another 5 and so on, without physically having to run over 3000 if-statements.
#Selection1 will have 5 options, and each of #Selection2’s 5 options will be applicable to each of #Selection1’s 5 options and so on, but will have to dispay different values on the chart. For example, let’s assume #Selection1 is Age with 5 age groups, and #Selection2 is 5 different Coffees. If I am aged between 25 - 35 and prefer cuppachino’s, the chart will display different data than someone who is also aged beween 25 - 35 but prefers plain black coffee, and also different data for someone who is 45 - 55 but prefers cuppachinos.
Hey,
I recommend checking out our Cascading Form example which demonstrates a similar scenario of populating a form element with options based on a previous selection:
As for changing the Graph based on the user’s selection, you should post a message to the HTML component on the dropdown change event as demonstrated here: https://www.wix.com/code/home/example/Chart
I got this working. Had to reduce the dropdowns to 3 options, 700-odd lines off code totalling 175 different final options, each with it’s own unique chart output. I won’t paste it here due to the lenght, please comment if you would like to see the code