Skip to content

fix: retain category number format before adding labels - #1162

Open
chenxiaokeng666-prog wants to merge 1 commit into
scanny:masterfrom
chenxiaokeng666-prog:fix/category-number-format
Open

chenxiaokeng666-prog wants to merge 1 commit into
scanny:masterfrom
chenxiaokeng666-prog:fix/category-number-format

Conversation

@chenxiaokeng666-prog

Copy link
Copy Markdown

Problem

Setting chart_data.categories.number_format before adding the first date or numeric category silently loses the format: the next access replaces the empty Categories collection.

Fix

Initialize the collection only if it has not been created. Regression tests cover both date and numeric labels.

Verification

  • Both new regression cases fail on the baseline and pass with the fix.
  • Full suites on Python 3.12: 2,702 pytest tests and 973 Behave scenarios passed.
  • Verified that the chart cache and embedded XLSX retain the explicit category format for add_chart and replace_data.
  • PowerPoint UI rendering was not tested. This change was prepared and verified with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant