Repository navigation
Conversation
2 tasks done
Member
|
Thanks for taking this on, and for the thorough tests. We went a different direction for #807 in #1036, which has now been merged: chart.setSize(1920, 1080);
ChartEncoder.saveChart(chart, "./MyChart", "png");That covers the same use case with a single method instead of three overloads, and it makes the size change explicit rather than a side effect of exporting. Closing this one in favor of that approach. Your other two PRs (#1033 and #1035) are still being looked at. |
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.
Adds explicit width and height to
ChartEncoderfile, stream and byte-array exports, so callers can choose the output size without rebuilding a chart.The overloads reuse the existing raster/vector/PDF encoders through an
IChartview with the requested dimensions. Charts are laid out at that size rather than scaling a rendered image. Invalid dimensions are rejected before opening the output file.Rendering follows the existing
IChart.paintbehavior: XChart charts retain the last rendered dimensions. This is documented in the API and README. Existing overloads are unchanged.Includes
TestForIssue807and tests for XY/pie/category charts, PNG/JPEG dimensions, SVG viewBox and PDF page size, stream ownership, file extensions, and invalid dimensions preserving existing files.Validation: Java 11
mvn clean verify— 175 tests passed. The demo also rendered at 1280×720 and 600×800 headlessly. The repository skipsmvn fmt:check; changed Java files pass a direct check with its google-java-format 1.23.0 version.Fixes #807.