Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

intermediate value)[chartType] is not a function #112

@SylarRuby

Description

@SylarRuby

What am I doing wrong, guys?

var LineChart = require("react-chartjs");

var MyComponent = React.createClass({
  render() {
   var chartData = {

  };
    return <LineChart.Line data={chartData} width="600" height="250"/>
  }
});

Only to get:

intermediate value)[chartType] is not a function

Which is at:

 classData.initializeChart = function(nextProps) {
      var Chart = require('chart.js');
      var el = ReactDOM.findDOMNode(this);
      var ctx = el.getContext("2d");
      var chart = new Chart(ctx)[chartType](nextProps.data, nextProps.options || {});
      this.state.chart = chart;
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions