feat(SVG): support for viewport in SVG only providing width and height#1403
Merged
dangreen merged 3 commits intochartist-js:mainfrom Sep 30, 2025
Merged
feat(SVG): support for viewport in SVG only providing width and height#1403dangreen merged 3 commits intochartist-js:mainfrom
dangreen merged 3 commits intochartist-js:mainfrom
Conversation
455fa60 to
e02f446
Compare
Collaborator
|
Hey, thanks for your contribution! I guess this would also be relevant for the other chart types, right? https://github.com/chartist-js/chartist/blob/main/src/charts/BarChart/BarChart.ts#L215-L221 |
Contributor
Author
|
Sure, I just use a fork right now and needed it for Line-Charts although I also have Bar-Chats in use. I am going to add it here too. I will update the PR within the next days. |
Contributor
Author
|
@gionkunz the example I added it to is not too great though. Only thing missing are unit tests around the |
Contributor
Author
|
Ok, updated the tests. |
Contributor
Author
|
@gionkunz In case you got some time please review. I would also like to create more PRs later on. |
Contributor
Author
|
@gionkunz Quick reminder 😄 |
dangreen
approved these changes
Sep 30, 2025
Merged
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.
For now a draft but this should outline what should be achieved. The charts scale without redrawing and rearranging. The drawback might be that fonts can get too small if no responsive options are used.
I do believe we could also smartly skip redraw in such cases until we hit a breakpoint.
Closes #1402