SVG Heatmaps
See original GitHub issueCurrently the color brick area of heatmaps is rendered using data:
URLs. This makes it harder to produce high-quality exported images (especially for print) unless you’re careful with how the image is resampled after exporting (difficult to do given that it’s a PNG embedded in an SVG).
Would you consider using SVG instead, at least for zsmooth=false
?
I made a quick patch to try this out. With a 50 x 200 brick heatmap, performance seems pretty close. I could turn this into a PR if it would be accepted.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
svg-heatmap - npm
Generate GitHub-like heatmap graphs with SVG. Latest version: 2.1.0, last published: a year ago. Start using svg-heatmap in your project by ...
Read more >Heat map Icons – Download for Free in PNG and SVG - Icons8
Free Heat map icons in various UI design styles for web, mobile. Download static and animated Heat map vector icons for free in...
Read more >Heat Map Vector SVG Icon - SVG Repo
Free Download Heat Map SVG vector file in monocolor and multicolor type for Sketch or Illustrator from Heat Map Vectors svg vector collection....
Read more >jayden-chan/svg-heatmap - GitHub
Generate GitHub-style SVG heatmaps . Contribute to jayden-chan/svg-heatmap development by creating an account on GitHub.
Read more >Heat-map Icons - Free SVG & PNG Heat-map Images
Find 21 Heat-map images and millions more royalty free PNG & vector images from the world's most diverse collection of free icons.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @zbjornson. I guess you mean rendering each brick as a separate solid-color rectangle? This could be an interesting mode to have available, but we wouldn’t want it to always turn to SVG when
zsmooth=false
- aside from performance questions when you get to even larger sizes, I seem to recall some situations where it’s still tricky to get the stitching right when two shapes are expected to exactly meet - for example stacked or gapless bar charts.@etpinard what do you think, another
zsmooth
value ('rects'
?) or a new attribute (rendering=('image'|'rects')
where'rects'
forceszsmooth=false
)?@alyst my patch was a super rough one just for benchmarking and is far from usable, sorry. I’ll be revisiting it within the next few months and will post or PR it if I can.
Using SVG rects might fix #888 as well, if the mouse event listeners are placed on the rects directly.