Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 629 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 629 Bytes

This package provides a Vega adapter for thematic.

To use this, you feed it a Vega Specification and a Theme instance, and it will return a copy of the Vega spec with appropriate properties added to globally theme the chart and marks.

Example:

import { load } from '@thematic/core'
import { vega as decorator } from '@thematic/vega'
const vega = require('vega')

const theme = load()
const spec = // a valid Vega spec
const merged = decorator(theme, spec)
const parsed = vega.parse(merged)
return new vega.View(parsed).renderer('svg')