I have had a look around the Altair and Vega* documentation and I have not been able to find anything, so please forgive me if I am missing something obvious.
In the vega-embed JS library (or elsewhere), are there methods I can use to get the rendered width and height? Basically, I am looking to answer the question, "how big is this entire thing being rendered"?
Here's the operative bit of my embedding code:
vegaEmbed(el, chart_spec, opt = embed_options).then(function(result) {
// access view as result.view
vegaTooltip.vegaLite(result.view, chart_spec, tooltip_options);
console.log(result.view.width());
console.log(result.view.height());
}).catch(console.error);
Using the result.view .width() and .height() return the values from my chart specification. In this case, these refer to the data rectangle (plotting) dimensions, not the ultimate rendered dimensions.
For what it's worth, I am using vega-embed 3.2.0. (I just tried to update to 3.7.0, but I am getting some tooltip errors - I have something else to sort out there).
Can anyone provide any pointers?
Thanks!