Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charts with a single category axis discard values of zero #1331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MariusOpeepl
Copy link
Contributor

@MariusOpeepl MariusOpeepl commented May 14, 2024

Change Summary

Values of zero are now inserted in excel data cells for charts with a single category axis.

Change Description

The existing logic for inserting data values into Excel cells, simplified as

<c r="A1">
  <v>${dataValue || ''}</v>
</c>

would not add values of 0 to the Excel table, causing cutoff points for line charts that had this value in them. This was changed to only exclude nullish values:

<c r="A1">
  <v>${dataValue ?? ''}</v>
</c>

Change Type

  • Bug fix
  • New feature
  • Documentation update

Motivation and Context

Charts with explicitly one category axis (!IS_MULTI_CAT_AXES), particularly line charts, would get split in two at plot points with values of zero, because its respective Excel cell would have no value inside it, instead of the expected zero number. This would only happen upon opening the embedded Excel file, as the XML of the pptx chart was written correctly.

Checklist before requesting a review

  • If it is a core feature, I have added new code under /demos/modules/
  • My code follows the style guidelines of this project
  • My changes generate no new eslint warnings
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have included code/tests that prove my fix is effective or that my feature works
    • The existing demos can be run to see that the fix works
  • I have used the "Run All Demos" feature on the browser demo and no errors were found
    • I couldn't get the browser demos to run, so I ran the node demos instead

- Fixed values of zero getting converted to empty strings
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