height are used to override the width and height
of the provided
spec, if the
spec does not have multiple views.
The dimensions you provide describe the overall width and height of the
rendered chart, including axes, labels, legends, etc.
vw_autosize(spec, width = NULL, height = NULL)
An object to be coerced to
S3 object with class
In a Vega or Vega-Lite specification, the default interpretation
of width and height is to describe the dimensions of the
data rectangle, not including the space used by the axes, labels,
legends, etc. When
height are specified using
the meanings of
height change to describe the dimensions
of the entire chart, including axes, labels, legends, etc.
There is an important limitation: specifying
effective only for single-view and layered specifications.
It will not work for specifications with multiple views
repeat); this will issue a
warning that there will be no effect on the specification when rendered.
vw_autosize(spec_mtcars, width = 350, height = 350)