Neophobe Plebeian Mumpsimus

    @stamen/discretebarchart

    0.2.0 • Public • Published

    DiscreteBarChart

    A simple vertical bar chart.

    Part of the @stamen/panorama toolkit.

    Usage

    import React from 'react';
    import ReactDOM from 'react-dom';
    import { DiscreteBarChart } from '@panorama/toolkit';
    
    let discreteBarChartConfig = {
      data: [
        { key: 'red', value: 20 },
        { key: 'blue', value: 40 },
        { key: 'green', value: 10 }
      ],
      width: 400,
      height: 400
    
      // Optionally specify custom margins
      margin: { top: 10, right: 10, bottom: 10, left: 10 },
    
      // Optionally specify accessors to match your data format
      xAccessor: d => d.key,
      yAccessor: d => d.value
    };
    
    ReactDOM.render(<DiscreteBarChart {...discreteBarChartConfig}/>, document.body);

    Keywords

    none

    Install

    npm i @stamen/discretebarchart

    DownloadsWeekly Downloads

    1

    Version

    0.2.0

    License

    ISC

    Last publish

    Collaborators

    • ericsoco
    • mojodna
    • stamen