fraserxu/react-chartist — pull request #2 by theponti (2014-12-18 22:49:06+00:00)
Title: Update index.js

I was using the component but realised that, with the way it was initially constructed, one cannot update the properties of the chart once it has been rendered. I added `componentWillReceiveProps` so that the chart will re-render upon new props being supplied to the component by passing the `newProps`. I also moved the logic that was previously in `componentDidMount` into a method called `updateChart` and now `componentDidMount` calls `updateChart` passing it `this.props`. The API remains unchanged. This pull request is to facilitate updating of the form after initial render.