-
Hi, From the documentation I figured out how to set the absolute size: {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/cars.json"},
"mark": {
"type": "rect",
"width": 10
},
"encoding": {
"y": {"field": "Origin", "type": "nominal"},
"x": {"field": "Cylinders", "type": "ordinal"},
"color": {"aggregate": "mean", "field": "Horsepower"}
},
"config": {
"axis": {"grid": true, "tickBand": "extent"}
}
} It is not possible, however, to specify a value like "50%" for the width field. With 50% I mean that each cell of the heatmap is centered in the x coordinate and fills the 50% of the available width (instead of the default 100%). I know that one could set both the Do you have suggestions? Thank you very much. Best! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think you can achieve this with the Band scale properties. Something like this ...
"scale": {"padding": 0.5, "align": 1}
... |
Beta Was this translation helpful? Give feedback.
I think you can achieve this with the Band scale properties. Something like this