-
Notifications
You must be signed in to change notification settings - Fork 6
fix: Resolve chart rendering issues in PowerPoint generation #2
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
Open
awol2005ex
wants to merge
15
commits into
yingkitw:main
Choose a base branch
from
awol2005ex:chart-fix-awol2005ex-20251229
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: Resolve chart rendering issues in PowerPoint generation #2
awol2005ex
wants to merge
15
commits into
yingkitw:main
from
awol2005ex:chart-fix-awol2005ex-20251229
Conversation
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
Implement chart functionality, including: 1. Expose the chart module as public 2. Add chart support to all slide layouts 3. Implement chart data generation and relationship handling 4. Extend the PPTX generator to support chart files 5. Add utility functions for generating chart XML
- Add the `rust_xlsxwriter` dependency to support generating Excel data files - Extend the `ChartSeries` struct to support XY and bubble chart data - Implement the `ExcelWriter` trait and Excel generators for multiple chart types - Modify chart XML generation logic to reference external Excel data - Update relationship files and content types to support Excel files - Refactor chart data generation logic to support multiple chart types
- Add the `rust_xlsxwriter` dependency to support generating Excel data files - Extend the `ChartSeries` struct to support XY and bubble chart data - Implement the `ExcelWriter` trait and Excel generators for multiple chart types - Modify chart XML generation logic to reference external Excel data - Update relationship files and content types to support Excel files - Refactor chart data generation logic to support multiple chart types
…el data storage location Refactored chart generation logic by moving Excel data files into the `embeddings` directory and introducing a new `relationships` module to generate chart relationship XML files. Additionally, numbered generation functions have been added for all chart types to improve code consistency. - Added a `relationships` module to manage relationships between charts and Excel data - Changed the Excel data file storage path to `ppt/embeddings/` - Added numbered generation functions for all chart types - Updated related tests and documentation references
…el data storage location Refactored chart generation logic by moving Excel data files into the `embeddings` directory and introducing a new `relationships` module to generate chart relationship XML files. Additionally, numbered generation functions have been added for all chart types to improve code consistency. - Added a `relationships` module to manage relationships between charts and Excel data - Changed the Excel data file storage path to `ppt/embeddings/` - Added numbered generation functions for all chart types - Updated related tests and documentation references
Implemented XML generation for chart styles and colors, including the creation of `chartStyle.xml` and `colors.xml` files, and updated chart relationship files to support style references.
…scheme Added category references to chart XML generation and refactored the file naming logic to use a global counter.
- Implemented generation of 11 WPS-compatible slide layout types - Refactored chart generation logic to support global chart numbering and precise data range references - Added control over Excel data reference ranges to improve chart data accuracy - Enhanced chart XML generation for better compatibility with WPS
…l XML attributes - Added system language detection capability, supporting retrieval of the system language via environment variables or the Windows API - Added `lang` and `altLang` attributes to XML elements to enable multilingual text handling - Updated default positions and dimensions for charts and tables to better align with WPS reference standards - Removed redundant external data relationship references to optimize chart XML structure
Ensure unique axis IDs across different charts to prevent rendering issues in PPTX files.
…on WPS reference coordinates - Refactored chart XML generation logic: moved axis ID references into internal chart definitions and relocated axis definitions externally - Standardized chart positions and dimensions in examples to align with WPS reference specifications
…charts Refactored scatter chart XML generation logic to ensure correct axis ID references and cross-references. Added dedicated functions to generate scatter chart axis definitions, maintaining consistent references between X and Y axes.
… XML generation code
Replaced Chinese placeholder text and titles in the theme XML generator with English equivalents to support internationalization requirements.
Clean up println statements used for debugging in the code, which were previously used during development to track variable values and program flow, and are no longer needed.
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.
🐛 Problem Solved
Fixed critical chart rendering issues that prevented charts from displaying properly in generated PowerPoint files.
🔧 Root Cause
✨ Changes Made
🧪 Testing
🎉 Impact
Users can now successfully create PowerPoint presentations with functional charts that display actual data visualization instead of empty placeholders.
📋 Before vs After
Before: Charts would not render at all
After: Charts display with proper data, legends, and formatting
This fix enables the library's core chart functionality, making it suitable for data visualization use cases.