@thematic/d3
This package provides a variety of helpers for applying Thematic to visualizations based on [D3](https://d3js.org/).
Last updated 2 months ago by natoverse .
MIT · Original npm · Tarball · package.json
$ cnpm install @thematic/d3 
SYNC missed versions from official npm registry.

This package provides a variety of helpers for applying Thematic to visualizations based on D3.

D3's general programming model is to use function chaining to update selections. We provide a variety of applicator functions that work directly with the D3 selection.call mechanism to apply theme parameters to the selection items.

For example, you may want to apply the core chart properties to your root svg:

import { chart} from '@thematic/d3'
...
const svg = select('svg').call(chart as any, theme)

This example selects the svg DOM element, then passes the chart applicator function to the selection.call method, along with the theme instance as a parameter. Thematic will then read the chart properties from the theme, such as border and background color properties, and apply them to the svg as stroke and fill attributes.

We can do this with any selection, and Thematic provides applicator functions for both the core svg primitives (e.g., rect, circle, line, etc.), as well as higher-level charting components and semantics such as chart, plotArea, and axis.

Current Tags

  • 0.9.0                                ...           latest (2 months ago)

2 Versions

  • 0.9.0                                ...           2 months ago
  • 0.8.0                                ...           4 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |