Hi @DougStanley.
What I think in effect you are asking for is small multiples with the colour scale applied to each small multiple independently. If so, here’s a version:
To do this, you’ll need to add a row block to the encoding block and a resolve block with scale-color-independent.
{
"title": {
"anchor": "start",
"align": "left",
"offset": 10,
"text": "eDNA Forum - Deneb Heatmap Colouring by Row",
"font": "Verdana",
"fontSize": 20,
"fontWeight": "bold",
"fontStyle": "normal"
},
"data": {"name": "dataset"},
"width": 800,
"height": 45,
"mark": {
"type": "rect",
"stroke": "white",
"tooltip": true
},
"encoding": {
"row": {
"field": "Category",
"header": {
"labelAngle": 0,
"labelPadding": -50,
"title": null
},
"spacing": 0
},
"x": {
"field": "Date",
"type": "ordinal",
"title": "",
"timeUnit": "yearmonth",
"axis": {
"domain": false,
"ticks": false,
"labels": true,
"labelAngle": -90,
"orient": "top"
}
},
"tooltip": [
{
"field": "Category",
"type": "nominal"
},
{
"field": "Date",
"type": "ordinal"
},
{
"field": "Growth (MoYaM)",
"type": "quantitative",
"format": ".1%"
},
{
"field": "Growth (WDC)",
"type": "quantitative",
"format": ".1%"
}
],
"color": {
"field": "Growth (WDC)",
"type": "quantitative",
"title": "Growth (WDC)",
"scale": {
"scheme": "pbiColorDivergent"
},
"legend": null
}
},
"resolve": {
"scale": {"color": "independent"}
}
}
I’m not at all sure this is your desired outcome. (For example, to get the chart to render in reasonable space, I needed to suppress the legend for each row, which decreases utility.) Nevertheless, I think a faceted plot is on the path to the solution
Hope it helps.
Greg
eDNA Forum - Deneb Heatmap with Colouring by Row.pbix (1.3 MB)