Socket
Socket
Sign inDemoInstall

@politico/graphics-kit

Package Overview
Dependencies
39
Maintainers
11
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @politico/graphics-kit

[![npm version](https://badge.fury.io/js/%40politico%2Fgraphics-kit.svg)](https://badge.fury.io/js/%40politico%2Fgraphics-kit)


Version published
Weekly downloads
17
decreased by-79.52%
Maintainers
11
Created
Weekly downloads
 

Readme

Source

@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.

FAQs

Last updated on 16 Oct 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc