Color rules in Domo Phoenix

Hi all, I am using the DDX Phoenix Scatter Plots App and wanted to apply some color rules like you do in a regular card in Analyzer.

I was looking at the documentation but it is only shown how to change the color palette, not how to apply color rules (ex: if Metric < 1 then red else green). Do you have any suggestion?

Thanks

Tagged:

Best Answer

  • MarkSnodgrass
    Answer ✓

    This will likely involve creating new classes in the CSS section of the DDX brick where you would define your colors. You would then need to go to javascript section and then apply logic to use a certain class based on the values.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.

Answers

  • MarkSnodgrass
    Answer ✓

    This will likely involve creating new classes in the CSS section of the DDX brick where you would define your colors. You would then need to go to javascript section and then apply logic to use a certain class based on the values.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • I came looking for an answer to this question, and I am unsure how the suggested solution would work. As far as I am aware, the charts rendered by Phoenix can't be directly affected by CSS. If inspected the chart element is a canvas, with it's only properties that are available are the width, height, margin and padding of the external frame.

    If it is possible to add colour rules to a Phoenix chart using CSS + JS, would somebody be able to detail how this is possible?