Skip to content

Commit 113a1b7

Browse files
committed
Fix financial-state sample
1 parent a8c3b76 commit 113a1b7

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

samples/ig-financial-state/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"@infragistics/ignite-ui-full": "latest",
77
"babel-runtime": "6.22.0",
88
"bootstrap": "^3.3.7",
9+
"create-react-class": "^15.7.0",
910
"igniteui-react-wrappers": "^1.4.0",
1011
"jquery": ">=1.9.1",
1112
"jquery-ui": ">=1.10.5",

samples/ig-financial-state/src/components/GaugesBox.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
import IgLinearGauge from 'igniteui-react-wrappers/ui/igLinearGauge.js';
21
import 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

100100
export default GaugesBox;

0 commit comments

Comments
 (0)