This repository has been archived by the owner on Dec 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from aerogear/AEROGEAR-7693
Aerogear 7693 - Create Mobile Client Service Chart
- Loading branch information
Showing
6 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React, { Component } from 'react'; | ||
import { DonutChart } from 'patternfly-react'; | ||
|
||
import '../style/MobileClientServiceChart.css' | ||
|
||
class MobileClientServiceChart extends Component { | ||
viewAllServices(){ | ||
return ( | ||
<a>View All Mobile Services</a> | ||
) | ||
} | ||
|
||
render = () => { | ||
const mobileServices = Object.values(this.props.mobileServices || {}) | ||
return ( | ||
<div> | ||
<div className="donut-label section-label"> | ||
Mobile Services | ||
</div> | ||
<div> | ||
<DonutChart | ||
id="donunt-chart-2" | ||
size={{width: 270,height: 91}} | ||
data={{colors: { | ||
'Bound Mobile Services' : '#0088ce', | ||
'Unbound Mobile Services': '#ec7a08', | ||
},columns: [ | ||
['Bound Mobile Services', mobileServices[0].bound], | ||
['Unbound Mobile Services',mobileServices[0].unbound], | ||
],type: 'donut'}} | ||
tooltip={{show: true}} | ||
title={{type: 'total'}} | ||
legend={{show: true,position: 'right'}} | ||
/> | ||
</div> | ||
<div> | ||
{this.viewAllServices(this.mobileClients)} | ||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default MobileClientServiceChart; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.donut-label.section-label { | ||
border-bottom: 1px solid #dcdcdc; | ||
line-height: 1; | ||
margin-bottom: 10px; | ||
padding-bottom: 5px; | ||
} |