fix: Show x values in data order when grouping enabled#320
Open
nekketsuuu wants to merge 1 commit intobdash-app:masterfrom
Open
fix: Show x values in data order when grouping enabled#320nekketsuuu wants to merge 1 commit intobdash-app:masterfrom
nekketsuuu wants to merge 1 commit intobdash-app:masterfrom
Conversation
If the following conditions are met: - Grouping is enabled, - Values of x axis are not sorted by Plotly, and - Some y value of some group is missing on some x value, then the order of x values is broken because missing values are processed afterward. This patch completely rewrote the way to pack values with grouping, and fixed the problem above by filling the missing values with null. Co-authored-by: Claude <noreply@anthropic.com>
nekketsuuu
added a commit
to nekketsuuu/bdash-server
that referenced
this pull request
Mar 3, 2026
The same change as bdash-app/bdash#320. The following is the same description of the pull request above. ---- If the following conditions are met: - Grouping is enabled, - Values of x axis are not sorted by Plotly, and - Some y value of some group is missing on some x value, then the order of x values is broken because missing values are processed afterward. This patch completely rewrote the way to pack values with grouping, and fixed the problem above by filling the missing values with null.
nekketsuuu
added a commit
to nekketsuuu/bdash-server
that referenced
this pull request
Mar 3, 2026
The same change as bdash-app/bdash#320. The following is the same description of the pull request above. ---- If the following conditions are met: - Grouping is enabled, - Values of x axis are not sorted by Plotly, and - Some y value of some group is missing on some x value, then the order of x values is broken because missing values are processed afterward. This patch completely rewrote the way to pack values with grouping, and fixed the problem above by filling the missing values with null. Co-authored-by: Claude <noreply@anthropic.com>
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.
If the following conditions are met:
then the order of x values is broken because missing values are processed afterward.
This patch completely rewrote the way to pack values with grouping, and fixed the problem above by filling the missing values with null.
Screenshots
Details
An example query:
Without Grouping
Charts are not changed with this patch.
With Grouping
Every chart type except for pie chart is broken with the conditions above.
"2026/01/02"is not located between"2026/01/01"and"2026/01/03". Pie chart doesn't have the grouping option.It seems that Plotly automatically sorts x values (so it hasn't been broken), for example, when they are formatted like
"2026-01-01".