Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 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! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
144 | |
73 | |
64 | |
52 | |
51 |
User | Count |
---|---|
208 | |
91 | |
62 | |
59 | |
56 |