Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
Just wondering if and how it is possible to set the color gradient for category within a visual rather than across the full visual.
The below example shows the gradient based all all categories but is is possible for the color gradient to be applied on each individual category.
{ "data": {"url": "data/cars.json"},
"mark": "rect",
"encoding": { "y": {"field": "Origin", "type": "nominal"},
"x": {"field": "Cylinders", "type": "ordinal"},
"color": {"aggregate": "mean", "field": "Horsepower"} },
"config": { "axis": {"grid": true, "tickBand": "extent"}
} }
Thanks in advance
Solved! Go to Solution.
Providing the solution here in case anyone comes across this question down the road.
https://community.powerbi.com/t5/Custom-Visuals-Development/Deneb-Vega-Lite-Color-Gradient-Per-Categ...
Providing the solution here in case anyone comes across this question down the road.
https://community.powerbi.com/t5/Custom-Visuals-Development/Deneb-Vega-Lite-Color-Gradient-Per-Categ...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |