Forum Discussion

DW868990's avatar
DW868990
Helper IV
3 years ago

Deneb - Data Labels to a Heat Map

Hi,

in vega lite is it possible to add data label to the below code so labels would show on the table heatmap - 

 

 "data": {"name": "dataset"},
"mark": "rect",
"encoding": {
 "x": {"field": "Subcategory", "type": "nominal"},
 "y": {"field": "Metric", "type": "ordinal",
"bin":{"maxbins":10}},
"color": {"aggregate": "count", "field": "Horsepower"}

},
"config": { "axis": {"grid": true, "tickBand": "extent"}

}

}

 

 

I have tried adding a layer but it doesnt seem to work when with a 'rect' mark but must be something i am missing.

 

TIA

 

JJ