vscode-vega-viewer icon indicating copy to clipboard operation
vscode-vega-viewer copied to clipboard

specs with "container" width do not render

Open bbenzikry opened this issue 4 years ago β€’ 8 comments

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.

bbenzikry avatar Dec 14 '20 13:12 bbenzikry

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

RandomFractals avatar Dec 15 '20 12:12 RandomFractals

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 avatar Dec 15 '20 21:12 bbenzikry

@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?

RandomFractals avatar Nov 14 '21 12:11 RandomFractals

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.

bbenzikry avatar Nov 16 '21 02:11 bbenzikry

Renders preview normally

image

image

Doesn't render image

bbenzikry avatar Nov 26 '21 23:11 bbenzikry

@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!

RandomFractals avatar Nov 27 '21 13:11 RandomFractals

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 avatar Nov 27 '21 13:11 domoritz

@domoritz will do on the next vega libs update.

RandomFractals avatar Dec 01 '21 16:12 RandomFractals