diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-07-25 13:18:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 13:18:52 +0200 |
commit | e561d11d7d517fbe9f3e2cfac3af9d11fd0fbf56 (patch) | |
tree | 594be45f13149d274e252d2a844733a12a25dc5b /server/sonar-web/src/main/js/components/charts/bar-chart.js | |
parent | e8e323c872295d176016bd1dfcc3c7191b3de0e6 (diff) | |
download | sonarqube-e561d11d7d517fbe9f3e2cfac3af9d11fd0fbf56.tar.gz sonarqube-e561d11d7d517fbe9f3e2cfac3af9d11fd0fbf56.zip |
update react (#2288)
Diffstat (limited to 'server/sonar-web/src/main/js/components/charts/bar-chart.js')
-rw-r--r-- | server/sonar-web/src/main/js/components/charts/bar-chart.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/components/charts/bar-chart.js b/server/sonar-web/src/main/js/components/charts/bar-chart.js index 1d89adb5475..37e847d580d 100644 --- a/server/sonar-web/src/main/js/components/charts/bar-chart.js +++ b/server/sonar-web/src/main/js/components/charts/bar-chart.js @@ -18,20 +18,24 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import createReactClass from 'create-react-class'; +import PropTypes from 'prop-types'; import { max } from 'd3-array'; import { scaleLinear, scaleBand } from 'd3-scale'; import { ResizeMixin } from './../mixins/resize-mixin'; import { TooltipsContainer } from './../mixins/tooltips-mixin'; -export const BarChart = React.createClass({ +export const BarChart = createReactClass({ + displayName: 'BarChart', + propTypes: { - data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, - xTicks: React.PropTypes.arrayOf(React.PropTypes.any), - xValues: React.PropTypes.arrayOf(React.PropTypes.any), - height: React.PropTypes.number, - padding: React.PropTypes.arrayOf(React.PropTypes.number), - barsWidth: React.PropTypes.number.isRequired, - onBarClick: React.PropTypes.func + data: PropTypes.arrayOf(PropTypes.object).isRequired, + xTicks: PropTypes.arrayOf(PropTypes.any), + xValues: PropTypes.arrayOf(PropTypes.any), + height: PropTypes.number, + padding: PropTypes.arrayOf(PropTypes.number), + barsWidth: PropTypes.number.isRequired, + onBarClick: PropTypes.func }, mixins: [ResizeMixin], |