1.1.0 • Published 9 months ago

react-div-charts v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Install it by running npm install react-div-charts --save or yarn add react-div-charts. Then to use it:

import { LineChart } from 'react-div-charts';

Examples

Line Chart.

Image of LineChart Component for a simple data visualization

Line Chart

<LineChart
    width={400}
    height={400}
    labels={['January', 'February', 'March', 'April', 'May', 'June','July', 'August', 'September', 'October', 'November', 'December']}
    data={[{
    label: 'Primary',
    value: [52,53,11,17,14,88,91,31,13,73,55,64],
    color:'blue',
    },
    {
    label: 'Secondary',
    value: [72,82,33,95,77,19,71,69,44,5,93,25],
    color:'red',

    }]}
/>

Bar Chart.

Image of BarChart Component for a simple data visualization

Bar Chart

<BarChart
    width={400}
    height={400}
    data={[{
    label: 'Primary',
    value: [1,86,42,71,15,17,78,54,44,10,65,38],
    color:'blue',
    },
    {
    label: 'Secondary',
    value: [19,54,1,36,75,27,2,93,8,30,29,2],
    color:'red',
    }]}
    labels={['January', 'February', 'March', 'April', 'May', 'June','July', 'August', 'September', 'October', 'November', 'December']}
/>

Multi Chart.

Image of MultiChart Component for a simple data visualization

Multi Chart

<MultiChart
    width={400}
    height={400}
    labels={['January', 'February', 'March', 'April', 'May', 'June','July', 'August', 'September', 'October', 'November', 'December']}
    data={[{
    label: 'Primary',
    value: [74,42,92,7,6,7,61,20,13,49,98,40],
    color:'red',
    chartType:'line',
    },
    {
    label: 'Secondary',
    value: [16,94,24,2,98,21,82,48,68,13,14,90],
    color:'yellow',
    chartType:'bar',

    }]}
/>

Half Angle Radial Chart.

Image of HalfAngleRadialChart Component for a simple data visualization

Half Angle Radial Chart

<HalfAngleRadialChart
    width={400}
    value={80}
/>

Pie Chart.

Image of PieChart Component for a simple data visualization

Pie Chart

<PieChart
    data={[
    { value: 30, label: 'Category A', color: '#FF6384' },
    { value: 20, label: 'Category B', color: '#36A2EB' },
    { value: 50, label: 'Category C', color: '#FFCE56' },
    ]}
    width={400}
/>

Doughnut Chart.

Image of DoughnutChart Component for a simple data visualization

Doughnut Chart

<div style={{
        backgroundColor: 'white',
      }}>
    <DoughnutChart
        data={[
        { value: 30, label: 'Category A', color: '#FF6384' },
        { value: 20, label: 'Category B', color: '#36A2EB' },
        { value: 50, label: 'Category C', color: '#FFCE56' },
        ]}
        width={400}
    />
</div>
1.1.0

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

0.1.0

9 months ago