How do I use relative bar width with altair? According to vega-lite documentation. This code:
{
"data": {"url": "data/seattle-weather.csv"},
"mark": {"type": "bar", "width": {"band": 0.7}},
"encoding": {
"x": {
"timeUnit": "month",
"field": "date"
},
"y": {
"aggregate": "mean",
"field": "precipitation"
}
}
}
produces a bar that occupies 70% of each x band.
How do I set this in altair? If I use something like:
.mark_bar(width={'band':0.7})
I got an error about width not being a number.
How do I set relative bar widths in altair?