altair
altair copied to clipboard
Change axis depending on data
I use a transform_filter to filter my data. With that the x-axis is changing quite bit and I would like to
- change the axis label (e.g. change "Horsepower" to "Motor" if a different group is selected interactively)
- change the axis values
is this possible in altair? If not, could this be implemented or should I ask at vega-lite's issue tracker?
No, it's not possible in Altair. I believe it's possible in newer versions of Vega-Lite via the signals API, but Altair does not yet support this.
I recently opened a related issue in the VL repo https://github.com/vega/vega-lite/issues/7365
A way to do this is described in the developer version of the docs and will be available in the next version of altair. For more explicit support, the vega-lite issue above needs to be implemented, so I'm closing this for now as there is nothing to do on the altair side of things.