Select only relavant variables for the chart #4881
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
It looks like there's no way to filter or select data columns to reduce the size of the data using only vegalite chart spec. So , I just chopped off the unused variables from the datasets before passing it to the chart.
Before we had an issue of browser crashing when more than 3 variables are selected. Now more variables can be selected.
Note: We still have issues when too many variables are selected with large dataset. For this particular example (https://app.staging.terarium.ai/projects/f6a5af08-8d19-4462-bc5b-c12a9d6f6616/workflow/d7bf01c5-7c6e-4503-800c-f2d03dea9d1e?operator=bff38ac4-ca7a-44c4-8eca-e82f2a69dccb) , it will still crash the browser when all variables are selected. We may want to introduce the limit on the chart to prevent user from selecting too many variables.
Resolves #4731