question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Currently 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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcjohnsoncommented, Aug 26, 2019

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' forces zsmooth=false)?

0reactions
zbjornsoncommented, May 26, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found