Reputation: 15386
The minExtent
has no effect on Vega Lite Chart if there's no Y axis. Is there other way to shift chart to the left in order to align multiple charts properly.
Example and playground, the minExtent
has no effect on the chart:
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/cars.json"},
"mark": "tick",
"encoding": {"x": {"field": "Horsepower", "type": "quantitative"}},
"config": {
"tick": {"thickness": 2, "bandSize": 10},
"axisY": {"minExtent": 100}
}
}
The actual problem, I can't align the second chart, it's misaligned and shifted to the left.
Upvotes: 2
Views: 15
Reputation: 30324
Force it like this:
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/cars.json"}, "height":30,
"mark": {"type": "tick", "height":30},
"encoding": {"x": {"field": "Horsepower", "type": "quantitative"}, "y":{"datum":0 }},
"config": {
"tick": {"thickness": 2, "bandSize": 10},
"axisY": {"minExtent": 100, }
}
}
Upvotes: 1