feat: allow users to change the inferred chart type#191
Merged
calvarjorge merged 5 commits intomainfrom Mar 17, 2026
Merged
Conversation
Allow users to override the auto-inferred chart type via a small dropdown button next to the Chart/Table tabs. Only compatible chart types are shown based on the data shape. Co-authored-by: Isaac Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Set label color to inherit from slice color and remove textBorderWidth to eliminate the blurry black-text-with-white-border appearance. Co-authored-by: Isaac Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Use CSS grid overlay with forceMount and visibility:hidden so both panels stay in the DOM and contribute to layout sizing. The container always matches the tallest panel, preventing height jumps on tab switch. Co-authored-by: Isaac Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Deduplicate column classification between inferChartType and getCompatibleChartTypes by sharing a classifyColumns helper. Consolidate the two useMemo calls into one since both depend on the same transformed data. Co-authored-by: Isaac Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Co-authored-by: Isaac Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Comment on lines
+170
to
+171
| xKey={inference.xKey} | ||
| yKey={inference.yKey} |
Contributor
There was a problem hiding this comment.
shouldn't the xKey and yKey adapt to the activeChartType if the user overrides it? Or are all values coercible to the right shape for each chart?
Contributor
Author
There was a problem hiding this comment.
No, the user can override the chart type, but the data fed into the chart stays the same. At the moment, we don't allow to override axis keys (I personally think the use case isn't as big).
atilafassina
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Before
After