Skip to content

Commit

Permalink
update projects with using twice piechart
Browse files Browse the repository at this point in the history
  • Loading branch information
NEXUS\Anthony.Giretti committed Oct 12, 2017
1 parent fe9867c commit e74e51a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/app/Dashboard/dashboard.component.html
Expand Up @@ -4,7 +4,7 @@ <h2>{{title}}</h2>
<div class="divTable">
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell"><combo-chart [data]="data1" [config]="config1" [elementId]="elementId1"></combo-chart></div>
<div class="divTableCell"><donut-chart [data]="data1" [config]="config1" [elementId]="elementId1"></donut-chart></div>
<div class="divTableCell"><donut-chart [data]="data2" [config]="config2" [elementId]="elementId2"></donut-chart></div>
</div>
</div>
Expand Down
29 changes: 15 additions & 14 deletions src/app/Dashboard/dashboard.component.ts
Expand Up @@ -10,7 +10,7 @@ export class DashboardComponent {
title = 'Reusable charts sample';

data1: any[];
config1: ComboChartConfig;
config1: PieChartConfig;
elementId1: String;

data2: any[];
Expand All @@ -19,26 +19,27 @@ export class DashboardComponent {

ngOnInit(): void {

//Combochart Data & Config
this.data1 = [['Month', 'Bolivia', 'Ecuador', 'Madagascar', 'Papua New Guinea', 'Rwanda'],
['2004/05', 165, 938, 522, 998, 450],
['2005/06', 135, 1120, 599, 1268, 288],
['2006/07', 157, 1167, 587, 807, 397],
['2007/08', 139, 1110, 615, 968, 215],
['2008/09', 136, 691, 629, 1026, 366]];
this.config1 = new ComboChartConfig('Monthly Coffee Production by Country', 'Cups', 'Month');
this.elementId1 = 'myComboChart';

//Piechart Data & Config
//Piechart1 Data & Config
this.data1 = [['Task', 'Hours per Day'],
['Eat', 3],
['Commute', 2],
['Watch TV', 5],
['Video games', 4],
['Sleep', 10]];

this.config1 = new PieChartConfig('My Daily Activities at 20 years old', 0.4);
this.elementId1 = 'myPieChart1';

//Piechart2 Data & Config
this.data2 = [['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]]

this.config2 = new PieChartConfig('My Daily Activities', 0.4);
this.elementId2 = 'myPieChart';
this.config2 = new PieChartConfig('My Daily Activities at 30 years old', 0.4);
this.elementId2 = 'myPieChart2';
}

}

0 comments on commit e74e51a

Please sign in to comment.