Controlled parameters and highcharts

I’m trying to use my parameter with a control (a drop-down with example values “Default”, and “Gender”) in my highchart, so the colour of the bubbles changes based on what the user selects. This is a simplified version of my code that does not seem to be picking up the drop-down parameter selection at all and always shows the last else option Yellow.

{
“chart”: { “type”: “bubble” },
“title”: { “text”: “Financial Personas Bubble Chart” },
“legend”: {
“enabled”: true,
“title”: {
“text”: “Percent male”
}
},

“xAxis”: {
//w don’t want a line with ticks at the bottom
“gridLineWidth”: 1,
“lineWidth”: 0,
“tickLength”: 0,
“labels”: { “enabled”: false },
“title”: { “text”: “← Avoid                          &nbsp                                                   &nbsp                           Approach→” },

"plotLines": [
  {
    "color": "#A9A9A9",
    "width": 1,
    "value": 0,
    "zIndex": 5
  }
]

},
“yAxis”: {
“labels”: { “enabled”: false },
“title”: {
“text”: “← Self-directed                   Guided →”
},
“plotLines”: [
{
“color”: “#A9A9A9”,
“width”: 1,
“value”: 0,
“zIndex”: 5
}
]
},

“tooltip”: {
“pointFormat”: “{point.name}
X: {point.x}
Y: {point.y}
Size: {point.z}”
},
“plotOptions”: {
“bubble”: {

  "minSize": 40,
  "maxSize": 120,
  "dataLabels": {
    "enabled": true,
    "format": "{point.name}"
  }
}

},
“series”: [
{
“name”: “”,
“colorKey”: “colorValue”,
“data”: [
“map”, //Iterate through each row of below dataset
[“getColumn”, 0, 1, 2, 3, 4], //State code, State, Tilemap X, Tilemap Y, Sales
//Create the following object for each row
{
“name”: [“get”, [“item”], 3], //persona
“x”: [“get”, [“item”], 0],
“y”: [“get”, [“item”], 1],
“z”: [“get”, [“item”], 2],//size
“color”: [
“case”,
[“==”, [“parameter”, “<<${ColorByChoice}>>”], “Default”],
“Red”,
[“==”, [“parameter”, “<<${ColorByChoice}>>”], “Gender”],
“Blue”,
“Yellow”
]
}
]
}
]
}

Thank you for posting your question here in the community. After checking on your code, I would suggest put the logic of setting parameter value outside chart object configuration. Similar to this article if statement in Highcharts - Stack Overflow

Hi @rapisarda,
It’s been awhile since we last heard from you on this thread, did you have any additional questions regarding your initial post?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @rapisarda,
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you