Hello team! Is it possible to change the appearanc...
# gooddata-platform
j
Hello team! Is it possible to change the appearance of a widget based on an attribute value? I've found the conditional formatting for metrics, but cannot find similar for attributes. In this case, I have a bar chart which displays the metric "number of survey responses" and viewed by the attribute "answer scale asc". I'd like to change the color of the bars based on the attribute value of answer scale asc , so 1-6 to be in one red, the 7-10 in yellow and 10-11 in green. Thanks in advance! 🙂
j
Hi @Josefin Gruvander, you cannot set different color for different attribute values directly, but there exists workaround for your use case. You can add metric “Number of survey responses” 3 times into Metrics in your insight and use “Stack metrics” feature in “Stack by”. Analytical designer lets you apply attribute filter on metric level so you can filter 1-6 for the first metric, 7-10 for the second metric and 10-11 for the third metric. Then you can change colors of the metrics, edit titles of metrics for the legend or hide the legend in insight configuration.
Other option is to introduce “color” attribute in your model and slice the insight using the color attribute 😉
👀 1
j
Super, got it, thanks a lot! 🌟