Use viewbox for svg elements
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Currently plotly uses a fixed width/height layout for the svg elements. Even when using a responsive layout, the svg gets sized to fixed width/height box according to the outer div. This means that any css styling, and in particular @media print do not get applied. Is there any reason not to use a layout that is actually use controllable / customizable by setting viewbox parameters instead of fixed pixel sizes for the plots containers?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points; start by tracing how plotly.js sizes SVG elements and handles responsive layouts. Compare the current fixed width/height behavior with the requested viewBox-based customization, and define done as CSS, including @media print, being able to control plot sizing without breaking responsive plots.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100