vscode-vega-viewer
                                
                                 vscode-vega-viewer copied to clipboard
                                
                                    vscode-vega-viewer copied to clipboard
                            
                            
                            
                        specs with "container" width do not render
Hi there, thanks a lot for the work you put in, we use the extension every day π As the title mentions, a simple spec with "width":"container" won't work. Do you think it would be possible to patch the CSS or the spec itself in that case? I can PR in a week or so if you don't have the time.
Hi Ben,
Is that container width setting new?
I have not updated to the latest vega or vega-lite libs.
Yeah, send me a PR if you know the fix.
Thanks
Great, I'll work on this next week, it probably boils down to setting a width or height on the spec's config. As for the setting, it was added a bit over a year ago as far as I can tell.
@bbenzikry is this still the case? I never got your PR to get containers width fixed.
Also, do you have a simple example or a screenshot that illustrates the container width issue?
Hi @RandomFractals, sorry for the late response. I'll have a look at it next week and see if it still reproduces. I'll share an example if it does.
Renders preview normally


Doesn't render

@bbenzikry oh, I see now. So, we'll need to set that view to container width. I'll look into it on the next vega libs update.
@domoritz do I need to set or pass view container width param for this to work in vega lite?
Thanks for the screenshots!
No, I think we read the size of the surrounding element. Take a look at a spec with container sizing in the Vega editor.
@domoritz will do on the next vega libs update.