Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Andres Londoño Espejo committed Jan 3, 2020
1 parent 188ae25 commit ba6d2e0
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/app/components/grafico-dona/grafico-dona.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ChartType } from 'chart.js';
import { MultiDataSet, Label } from 'chart.js';

@Component({
selector: 'app-grafico-dona',
Expand Down
19 changes: 16 additions & 3 deletions src/app/pages/graficas1/graficas1.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<p>
graficas1 works!
</p>
<div class="row">
<div class="col-6">
<div class="card">
<div class="card-body">
<app-grafico-dona></app-grafico-dona>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<div class="card-body">
Grafica x
</div>
</div>
</div>
</div>
27 changes: 27 additions & 0 deletions src/app/pages/graficas1/graficas1.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ import { Component, OnInit } from '@angular/core';
})
export class Graficas1Component implements OnInit {

graficos: any = {
'grafico1': {
'labels': ['Con Frijoles', 'Con Natilla', 'Con tocino'],
'data': [24, 30, 46],
'type': 'doughnut',
'leyenda': 'El pan se come con'
},
'grafico2': {
'labels': ['Hombres', 'Mujeres'],
'data': [4500, 6000],
'type': 'doughnut',
'leyenda': 'Entrevistados'
},
'grafico3': {
'labels': ['Si', 'No'],
'data': [95, 5],
'type': 'doughnut',
'leyenda': '¿Le dan gases los frijoles?'
},
'grafico4': {
'labels': ['No', 'Si'],
'data': [85, 15],
'type': 'doughnut',
'leyenda': '¿Le importa que le den gases?'
},
};

constructor() { }

ngOnInit() {
Expand Down
4 changes: 3 additions & 1 deletion src/app/pages/pages.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { DashboardComponent } from './dashboard/dashboard.component';
import { ProgressComponent } from './progress/progress.component';
import { Graficas1Component } from './graficas1/graficas1.component';
import { IncreaserComponent } from '../components/increaser/increaser.component';
import { GraficoDonaComponent } from '../components/grafico-dona/grafico-dona.component';



Expand All @@ -20,7 +21,8 @@ import { IncreaserComponent } from '../components/increaser/increaser.component'
DashboardComponent,
ProgressComponent,
Graficas1Component,
IncreaserComponent
IncreaserComponent,
GraficoDonaComponent
],
exports: [
DashboardComponent,
Expand Down

0 comments on commit ba6d2e0

Please sign in to comment.