Repository navigation
fix(pptx): render missing chart data points as empty cells, not None - #2758
Open
zhouh (OUAO-FRANK) wants to merge 1 commit into
Open
zhouh (OUAO-FRANK) wants to merge 1 commit into
zhouh (OUAO-FRANK) wants to merge 1 commit into
Conversation
_convert_chart_to_markdown joined map(str, row), so a None data point became the literal string "None" in the Markdown table. Render None as an empty cell so a missing value is not mistaken for a value named None downstream.
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.
Summary
_convert_chart_to_markdownbuilt each Markdown row withmap(str, row), so aNonedata point (a missing value in a chart series) became the literal string"None"in the output table — indistinguishable from a value actually named "None".The fix renders
Noneas an empty cell, so a missing point reads as empty in every downstream consumer.Testing
Added
test_pptx_chart_missing_data_point_renders_empty, which builds a chart with a(1.0, None, 3.0)series and asserts the missing point renders as| Q2 | |with no literal"None"in the output. It fails on the previous code (| Q2 | None |) and passes now.Fixes #2526.