enable zooming of any rectangular shape on a Plotly heatmap
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Currently there are 2 “zooming” behaviours in Plotly.JS heatmaps:
-
Demo here : Here you can take any rectangular shape for the zoom (click, drag and drop). But then the pixels are not square, which is not ok for some applications (the aspect ratio is not preserved, and sometimes it should be preserved):
-
Demo here : Here the pixels are square thanks to
{'yaxis': {'scaleanchor': 'x'}}, but then you can zoom only with a certain aspect ratio rectangular shape, which is sometimes a limiting factor for the UX/UI:
But often, it is useful to have both, i.e. being able to draw a rectangle selection zoom of any shape + keep square-shape pixels.
Eric found a solution here: https://stackoverflow.com/a/76142244/1422096
IMHO this feature should be available directly in Plotly heatmaps (because it's the standard expected behaviour, which is common in Matplotlib etc.), what do you think? @lvlte @archmoj
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
Start by reproducing the two linked heatmap demos and reading the linked Stack Overflow solution. Compare their zoom and aspect-ratio behavior, then determine how the proposed interaction should fit Plotly heatmaps; done means arbitrary rectangular zooming preserves square pixels and is covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100