graphics framework for sveltejs
This release makes the API for calcExtents more consistent with its output format and also makes it easier to access that data in examples like Small Multiples. See this pull request for more info and also the CHANGELOG.
For layout components, this exports the underlying HTML elements and canvas contexts. It's helpful in things like Canvas components if you want to modify the main canvas outside of any child component and you don't want to create an intermediary wrapper. It also lets you use things like d3.zoom, which require access to the root <svg>
tag. It closes https://github.com/mhkeller/layercake/issues/40
This fixes a long standing issue where domain padding was off by a few pixels. Many thanks to @veltman for figuring out the fix. This release also adds support for non-linear scales so you can safely use logarithmic or power scales, too.
Closes https://github.com/mhkeller/layercake/issues/17. See the CHANGELOG for more details.
Server-side rendering was a little weird in v2.0 since you got it for free but it actually caused an annoying flash of unsized content. In this version, you can control server-side rendering via ssr={true}
or ssr={false}
(the default) as a prop on <LayerCake>
. It takes a cue from Rich's Pancake and builds out a new ScaledSvg
layout component for doing server-side SVGs and also includes numerous examples about how to do other things like maps with a fixed aspect ratio as well as others.
This release also has a few helper functions for SVG hovers and evens out parts of the API.
See the CHANGELOG for full details.
Complete rewrite to use Svelte 3! It's now a component based interface and is a lot more intuitive to compose graphics. The API options are pretty much the same. Some notable changes:
xReverse
instead of reverseX
This will be the final release in the <=1.0.0 branch. The next version is the Svelte 3 version and will jump to 2.0.0.