Install
@graphysdk/react and React 19. Pass the theme to createGraphyKit; it is set in Arial, so there are no fonts to import:
kit.GraphProvider takes the theme. The spec is written as usual and names no theme:
<GraphProvider theme={spreadsheet}>.
The provider reads the theme once, when it mounts. To switch themes, remount the provider, for example with a React key.
What the theme decides
Changing the look of one graph
A spec’s ownstyles(), scales and config() sit above the theme. Yellow and orange sit under 3:1 contrast against white, but keep their place in the palette because that order is the look. This graph keeps the look and draws its groups in blue, red and green only:
style.graph({ textScale }) scales its type for a larger or smaller one.
With a geom package
Spreadsheet repaints no geom. A geom from a package, such as the dumbbell, is drawn in the theme’s colors and type like a built-in one.Fonts
The theme is set in Arial, which every system has, so it loads no font and ships nofonts.css.
