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.

is svg support really necessary?

See original GitHub issue

I am thinking of removing svg support completely in a future version,

Benefits:

  1. smaller library size, because all code related to svg will be removed
  2. less testing time, possibly faster development of the library as no svg related code to write or test

Drawbacks:

  1. vector graphics mean ability to create resolution independent charts, so I could server render a chart with svg and create high resolution images
  2. no server side rendering to svg, server side rendering to canvas is possible with node-canvas though I have never tested it myself
  3. when developing new components I usually start with svg as it is easier to develop and troubleshoot, so development might become a little harder initially till we get used to developing with canvas first
  4. doing interactive components on canvas is much more difficult, and needs to be explored if it is even possible with the current design

The main motivation behind this thought is that, in order to improve the performance on pan actions, there are some hacks in place for canvas, and these hacks are getting bigger and complex to deal with to support both svg and canvas. I think most users don’t really care if it is svg or canvas, they care about performance and usability.

Thoughts?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
trevorbernardcommented, Jul 27, 2016

Right now I use SVG because over canvas because it’s doesn’t render well on retina screens

0reactions
itsjimbocommented, Dec 23, 2016

https://github.com/Flipboard/react-canvas Just thought I throw this out there… I believe https://cryptowat.ch is built with react-canvas

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an SVG File Used For and Why Developers Should be ...
SVGs are scalable and will render pixel-perfect at any resolution whereas JPEGs, PNGs and GIFs will not. · SVGs are vector images and...
Read more >
6 reasons why you should be using SVG - Creative Bloq
Scalable Vector Graphics (opens in new tab) (SVGs) are image types that are universally supported across all desktop and mobile browsers.
Read more >
Pros & Cons of Using SVGs on a Website - tekRESCUE
The browser compatibility of Scalable Vector Graphics is extremely good. With support for all modern browsers, it means your website can display ...
Read more >
SVG vs PNG: What Are the Differences and When to Use Them
However, SVGs are better for responsive and retina-ready web design due to their scalability and lack of quality degradation. In addition, they ...
Read more >
9 Reasons Why SVGs are Important for the Web - SitePoint
SVGs offer improved SEO because Google, Yahoo, Bing, and other search engines can index an image's content. To some extent, canvas has stolen ......
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