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
Best 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 any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Answers
-
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 any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
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?
0 -
I know this is old but it's the top result if you try and google how to accomplish this, and no answer was available anywhere I could find.
I found a way to do this using the logic from the gradient effect, which allows you to change the colors with conditional formatting. In my case I wanted a specific month to be highlighted, you can use javascript to do that dynamically if you need like the current month highlighted.
In my case, this highlights the current month green while the rest of the bars are blue.
colorFormats = [ { 'condition' : { 'column' : "Column Name (Month)", 'operand' : "EQUALS", 'values': ['Column Value (Current Month)'] }, 'format' : { 'color' : "#a2fc8b" } } ] var options = { width: size.width, height: size.height, properties: propertyOverrides, conditionalFormats: colorFormats };
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive