Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Can't create charts with this package #347

Open
ankit6373 opened this issue Mar 28, 2019 · 0 comments
Open

Can't create charts with this package #347

ankit6373 opened this issue Mar 28, 2019 · 0 comments

Comments

@ankit6373
Copy link

I installed react-d3 package in my react project but It is giving this error

download

Here is my component:

`

    import React, { Component } from 'react';
    import { PieChart } from 'react-d3';

    class CusBarChart extends Component {

         state  = {
              pieData : [
                 {label: 'A', value: 5},
                 {label: 'B', value: 6},
                 {label: 'F', value: 7}
             ]
          }

         render() {
                return (
                     <div className="content">
                            <PieChart
                                data={this.state.pieData}
                                width={400}
                                height={400}
                                radius={100}
                                innerRadius={20}
                                sectorBorderColor="white"
                                title="Pie Chart"
                            />
                       </div>
                );
          }
      }

     export default CusBarChart;

`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant