A key/value object was added for shared strings so that it can be used to fetch the sharedString index of category axes and removed an unneeded summand when calculating a label's column.
Change Description
Calculating the col and row position of the category labels
getExcelColName(idx + 1 + idy) did not need idx, and caused each subsequent row of labels to be shifted one more column to the right from the previous row.
Calculating the category label indexes in sharedStrings.xml
I could not find a fix for the calculation, so I instead create a key/value object (e.g. { 'Category Label': 4 }) that maps strings to their respective indexes in sharedStrings.xml, and use it to get the correct index of any given string.
Other
There is at least one WIP: FIXME: note around this code; I did not remove it, as I wasn't sure if the note was referencing this issue in particular.
Lastly, I only updated the accessing of shared strings for IS_MULTI_CAT_AXES, as I'm not too familiar with the other chart types and I'd risk introducing more bugs. The dictionary object should get correctly populated by all chart types, though.
Change Type
[x] Bug fix
[ ] New feature
[ ] Documentation update
Motivation and Context
While the PPTX charts with multiple category axes looked fine, their embedded Excel contained malformed data, and upon opening the Excel, the related chart would also break.
Checklist before requesting a review
[ ] If it is a core feature, I have added new code under /demos/modules/
[x] My code follows the style guidelines of this project
[x] My changes generate no new eslint warnings
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] 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
[x] 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
Change Summary
A key/value object was added for shared strings so that it can be used to fetch the sharedString index of category axes and removed an unneeded summand when calculating a label's column.
Change Description
Calculating the col and row position of the category labels
getExcelColName(idx + 1 + idy)
did not needidx
, and caused each subsequent row of labels to be shifted one more column to the right from the previous row.Calculating the category label indexes in sharedStrings.xml
I could not find a fix for the calculation, so I instead create a key/value object (e.g.
{ 'Category Label': 4 }
) that maps strings to their respective indexes in sharedStrings.xml, and use it to get the correct index of any given string.Other
There is at least one
WIP: FIXME:
note around this code; I did not remove it, as I wasn't sure if the note was referencing this issue in particular.Lastly, I only updated the accessing of shared strings for
IS_MULTI_CAT_AXES
, as I'm not too familiar with the other chart types and I'd risk introducing more bugs. The dictionary object should get correctly populated by all chart types, though.Change Type
Motivation and Context
While the PPTX charts with multiple category axes looked fine, their embedded Excel contained malformed data, and upon opening the Excel, the related chart would also break.
Checklist before requesting a review
/demos/modules/
Screenshots / Sample Code (if appropriate)