1- import IgLinearGauge from 'igniteui-react-wrappers/ui/igLinearGauge.js' ;
21import React from 'react' ;
2+ import createReactClass from 'create-react-class' ;
3+ import IgLinearGauge from 'igniteui-react-wrappers/ui/igLinearGauge.js'
4+ import '../sample.css' ;
35
4- class GaugesBox extends React . Component {
5- gaugeInterval = 10 ;
6- revenueColor = "#a4ba29" ;
7- expensesColor = "#d3404b" ;
8- profitColor = "#216EDD" ;
9- needleColor = "white" ;
10- needleOutlineColor = "#2582a9" ;
116
12- render ( ) {
7+
8+ var GaugesBox = createReactClass ( {
9+ gaugeInterval : 10 ,
10+ revenueColor : "#a4ba29" ,
11+ expensesColor : "#d3404b" ,
12+ profitColor : "#216EDD" ,
13+ needleColor : "white" ,
14+ needleOutlineColor : "#2582a9" ,
15+ render : function ( ) {
1316 return (
1417 < div className = "gauges" >
1518 < div className = "gauge-container" >
@@ -32,7 +35,7 @@ class GaugesBox extends React.Component {
3235 endValue : 50 ,
3336 brush : this . revenueColor
3437 }
35- ] }
38+ ] }
3639 valueChanged = { this . revenueChanged } />
3740 </ div >
3841 < div className = "gauge-container" >
@@ -76,25 +79,22 @@ class GaugesBox extends React.Component {
7679 endValue : 50 ,
7780 brush : this . profitColor
7881 }
79- ] }
82+ ] }
8083 valueChanged = { this . profitChanged } />
8184 </ div >
8285 < div className = "clear" > </ div >
8386 </ div >
8487 )
85- }
86-
87- revenueChanged = ( e , args ) => {
88+ } ,
89+ revenueChanged : function ( e , args ) {
8890 this . props . changeRevenue ( args . newValue ) ;
89- } ;
90-
91- expensesChanged = ( e , args ) => {
91+ } ,
92+ expensesChanged : function ( e , args ) {
9293 this . props . changeExpenses ( args . newValue ) ;
93- } ;
94-
95- profitChanged = ( e , args ) => {
94+ } ,
95+ profitChanged : function ( e , args ) {
9696 this . props . changeProfit ( args . newValue ) ;
97- } ;
98- }
97+ }
98+ } ) ;
9999
100100export default GaugesBox ;
0 commit comments