Display loading indicator for entire application, rather than

individual components.
This commit is contained in:
John Furrow
2016-03-19 20:17:37 +01:00
parent c3d6bee205
commit ff728429d8
13 changed files with 203 additions and 30 deletions
@@ -1,8 +1,27 @@
import d3 from 'd3';
import React from 'react';
const METHODS_TO_BIND = ['renderGraphData'];
export default class LineChart extends React.Component {
constructor() {
super();
METHODS_TO_BIND.forEach((method) => {
this[method] = this[method].bind(this);
});
}
componentDidMount() {
this.renderGraphData();
}
componentDidUpdate() {
this.renderGraphData();
}
renderGraphData() {
// console.log('')
let graph = d3.select('#' + this.props.id);
let transferData = this.props.data;
let transferLimit = this.props.limit;