You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using react-vega to render visualizations from a JSON schema. It works well, except when I want to display a vertically concatenated view (using vconcat) that fits the container size and provides an interactive brush feature to select data on the visualization.
I have tested multiple approaches including:
Setting the width and height of the container as schema
Rescaling all visualizations manually (by modifying their width/height properties in the schema)
However, nothing works as expected. Even if the visualization fits the screen, the interactive brush is offset. To be fair, all solutions I've come up with feel "hacky," as the problem of fitting the visualization to the container size should be solved internally by the library itself.
Hello!
I'm using react-vega to render visualizations from a JSON schema. It works well, except when I want to display a vertically concatenated view (using vconcat) that fits the container size and provides an interactive brush feature to select data on the visualization.
I have tested multiple approaches including:
However, nothing works as expected. Even if the visualization fits the screen, the interactive brush is offset. To be fair, all solutions I've come up with feel "hacky," as the problem of fitting the visualization to the container size should be solved internally by the library itself.
Link to a minimal reproduction Sandbox with all approaches explained (React)
Could you point out any invalid logic in my approaches or suggest an alternative? This issue has been haunting me for a while now.
Expected
Visualization fits the container. The interactive brush works as expected. No content clipped.
Actual
Content clipped.
Minimal reproduction code with all my approaches to solve this problem:
Schema:
Link to the Dataset
Compiled schema in the Vega Editor
All solutions are welcome!
The text was updated successfully, but these errors were encountered: