pynkvalerian / react-roughviz

React roughviz wrapper, lightweight package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-roughviz

This is a thin React wrapper around the awesome roughViz.

Installation

npm i react-roughviz

Usage

    <h3>Bar</h3>
    <Bar
      data='https://raw.githubusercontent.com/jwilber/random_data/master/flavors.csv'
      labels='flavor'
      values='price'
    />
    <h3>Pie</h3>
    <Pie
      data={{
        labels: ['North', 'South', 'East', 'West'],
        values: [10, 5, 8, 3]
      }}
      title='Regions'
      colors={['red', 'orange', 'blue', 'skyblue']}
      roughness={8}
    />

See it in action here: https://codesandbox.io/s/react-codesandbox-urbsw?fontsize=14

Development

Run it via

npm start

This runs an example app (at http://localhost:3000) via react-scripts, you can then edit the example or the packaged code.

About

React roughviz wrapper, lightweight package


Languages

Language:HTML 51.5%Language:JavaScript 48.5%