vega
vega copied to clipboard
Allow Usage Of Scale Factor For Non-Static Canvas
The View API only allows for a scaleFactor for static images. However sometimes rendering at a larger logical size in the browser is useful.
Currently in the renderer, if the Canvas is being rendered in the DOM, the scaleFactor is defined as the devicePixelRatio.
A solution is to add an options.scaleFactor parameter to the View constructor (defaults to devicePixelRatio) and use it in the CanvasRenderer.
cc: @jheer any opinion here?