I'm building a demo app for a project, and the customer has given me colour codes for targets, red, amber and green. I am OK with building a variable and passing it a measure to return the colour code, however, one of the other charts I built is coloured by measure, using the customers colours from the theme I built.
One of the customers has asked if they can toggle between the target colours and the "nice" colours in the TreeMap chart.
For one, I have to edit the page and set the Appearance:Colours and Legend:Colours=by Expression, and enter the Expression, for the other I have to set it to by Measure, select the measure and select the colour theme.
So I can build two versions of the same chart, pop them in a container, and show them conditionally using a button, but I wondered if any community geniuses had a way to do this just using one chart, and by expression, but being able to create an expression that mimics the by measure mode and selects a colour scheme?
the current expression is toggled using a selector variable: