Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.

Commit cd9b701

Browse files
author
booleanhunter
committed
Created component for donut-chart
1 parent 71984b1 commit cd9b701

12 files changed

Lines changed: 1985 additions & 1702 deletions

File tree

reactjs-adminlte/public/dist/js/chartVendors.bundle.js

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reactjs-adminlte/public/dist/js/dashboardV1.bundle.js

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reactjs-adminlte/public/dist/js/generalUIElements.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reactjs-adminlte/public/dist/js/timeline.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reactjs-adminlte/public/dist/js/vendors.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reactjs-adminlte/public/dist/js/widgets.bundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reactjs-adminlte/public/plugins/morris/morris.js

Lines changed: 1879 additions & 1654 deletions
Large diffs are not rendered by default.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
define(
2+
[
3+
'react',
4+
'jquery',
5+
'raphael',
6+
'morris'
7+
],
8+
function(React, $, Raphael, Morris){
9+
var DonutChart = React.createClass({
10+
getDefaultProps: function() {
11+
return {
12+
id: 'donut-chart-1',
13+
colors: ['#3c8dbc'],
14+
data: [
15+
{
16+
label: "Donut piece", value: 40
17+
}
18+
]
19+
}
20+
},
21+
componentDidMount: function(){
22+
var donut = new Morris.Donut({
23+
element: this.props.id,
24+
resize: true,
25+
colors: this.props.colors,
26+
data: this.props.data,
27+
hideHover: 'auto'
28+
});
29+
},
30+
render: function(){
31+
var style = {
32+
position: 'relative',
33+
height: '300px'
34+
};
35+
36+
return (
37+
<div className="chart tab-pane active" id={this.props.id} style={style}>
38+
{this.props.children}
39+
</div>
40+
)
41+
}
42+
})
43+
44+
return DonutChart;
45+
}
46+
)

reactjs-adminlte/public/src/dashboardV1/js/components/charts/donut.js

Whitespace-only changes.

reactjs-adminlte/public/src/dashboardV1/js/components/containers/container-one.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ define(
2222
<div className="tab-content no-padding">
2323
{/* Morris chart - Sales */}
2424
<div className="chart tab-pane" id="revenue-chart" style={style}></div>
25-
<div className="chart tab-pane active" id="sales-chart" style={style}>
26-
{this.props.children}
27-
</div>
25+
{this.props.children}
2826
</div>
2927
</div>
3028
)

0 commit comments

Comments
 (0)