feat(sheets): add counta to chart aggregateType enum#1397
Merged
zhengzhijiej-tech merged 2 commits intoJun 11, 2026
Conversation
Add `counta` (count non-empty cells, incl. text) to manage_chart_object dim2.series[].aggregateType in the chart flag schema. `count` only counts numeric cells, so counting occurrences of a text/category column renders an empty chart; `counta` enables category frequency counts. Synced from the sheet-skill-spec canonical schema.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…n +pivot-create Both flags map to the same wire field (properties.range), so passing non-default values for both is ambiguous. Mirror the --target-sheet-id / --target-sheet-name mutex pattern: --target-position takes priority over --range, and supplying both with non-default values is rejected up front with a typed FlagErrorf. --target-position=A1 is the documented default and is treated as "not set". Add a symmetric validateCreateInput hook on objectCRUDSpec (alongside the existing validateUpdateInput), wire it into objectCreateInput, and inject the pivot-specific check on pivotSpec.
xiongyuanwen-byted
approved these changes
Jun 11, 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.
Problem
Creating a column chart that counts occurrences of a text/category column (e.g. "matches per venue") renders an empty chart (Y-axis 0–1, no bars). The only counting aggregate exposed,
count, counts numeric cells only — a text column aggregates to 0 for every group, so no bars are drawn.Change
Add
counta(count non-empty cells, including text) to themanage_chart_objectdim2.series[].aggregateTypeenum in the chart flag schema, plus a description distinguishingcount(numeric only) fromcounta(non-empty incl. text).countbehavior is unchanged.Scope
Generated file only:
shortcuts/sheets/data/flag-schemas.json. Synced from the sheet-skill-spec canonical schema (which mirrors the upstream byted-sheet tool schema).Verification
Engine-level:
countcounts numeric cells,countacounts non-empty. The empty-chart bug and the correct render were reproduced on a real sheet via an equivalent numeric count grouped by category. End-to-endcountarender is pending the server-side schema deploy.