1.0.3 • Published 5 years ago

@politico/graphics-kit v1.0.3

Weekly downloads
38
License
MIT
Repository
github
Last release
5 years ago

npm.io

@politico/graphics-kit

npm version

Install

$ yarn add @politico/graphics-kit

Use

import { BaseChart, d3 } from '@politico/graphics-kit';

class MyChart extends BaseChart {
  defaultProps = {
    stroke: '#ccc',
  }

  defaultData = [60, 40, 20]

  draw() {
    const data = this.data();
    const props = this.props();
    const node = this.selection().node();

    d3.select(node).appendSelect('svg');
    // ...
  }
}

Snippets

Includes Atom snippets to shortcut building your chart.

  • Chart component demonstrates how to use the base chart component.
  • Chart container imports your chart component into a React container component, with resize and higher-level state hooks.
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago