Closed mattijn closed 4 months ago
See https://github.com/altair-viz/altair/discussions/3336
import vl_convert as vlc from IPython.display import Image vl_spec = ''' { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": { "values": [ {"a": "J", "b": 28, "c": "I'm a very long axis label and eventhough my axis label is cutoff, I'm still rendered in the png"}, {"a": "B", "b": 55}, {"a": "C", "b": 43}, {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53}, {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52} ] }, "mark": "bar", "encoding": { "x": {"field": "a", "type": "nominal"}, "y": {"field": "c", "type": "nominal"}, "color": {"field": "c", "legend": null} } } ''' png_data = vlc.vegalite_to_png(vl_spec=vl_spec) Image(png_data)
Fix was just published in version 1.2.4
See https://github.com/altair-viz/altair/discussions/3336