Skip to content

feat(sheets): add counta to chart aggregateType enum#1397

Merged
zhengzhijiej-tech merged 2 commits into
feat/lark-sheets-developfrom
fix-chart-aggregate-counta-zzj
Jun 11, 2026
Merged

feat(sheets): add counta to chart aggregateType enum#1397
zhengzhijiej-tech merged 2 commits into
feat/lark-sheets-developfrom
fix-chart-aggregate-counta-zzj

Conversation

@zhengzhijiej-tech

Copy link
Copy Markdown
Collaborator

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 the manage_chart_object dim2.series[].aggregateType enum in the chart flag schema, plus a description distinguishing count (numeric only) from counta (non-empty incl. text). count behavior 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: count counts numeric cells, counta counts 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-end counta render is pending the server-side schema deploy.

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.
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0a81222f-bf05-4a8c-b7ea-7f2867df46c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-chart-aggregate-counta-zzj

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact labels Jun 11, 2026
…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.
@zhengzhijiej-tech zhengzhijiej-tech merged commit cf3c5f1 into feat/lark-sheets-develop Jun 11, 2026
3 checks passed
@zhengzhijiej-tech zhengzhijiej-tech deleted the fix-chart-aggregate-counta-zzj branch June 11, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants