diff --git a/src/app/components/grafico-dona/grafico-dona.component.ts b/src/app/components/grafico-dona/grafico-dona.component.ts index 4d06c69..8f6221a 100644 --- a/src/app/components/grafico-dona/grafico-dona.component.ts +++ b/src/app/components/grafico-dona/grafico-dona.component.ts @@ -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', diff --git a/src/app/pages/graficas1/graficas1.component.html b/src/app/pages/graficas1/graficas1.component.html index 5c570c2..9608946 100644 --- a/src/app/pages/graficas1/graficas1.component.html +++ b/src/app/pages/graficas1/graficas1.component.html @@ -1,3 +1,16 @@ -

- graficas1 works! -

+
+
+
+
+ +
+
+
+
+
+
+ Grafica x +
+
+
+
diff --git a/src/app/pages/graficas1/graficas1.component.ts b/src/app/pages/graficas1/graficas1.component.ts index 9b2d659..a67885b 100644 --- a/src/app/pages/graficas1/graficas1.component.ts +++ b/src/app/pages/graficas1/graficas1.component.ts @@ -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() { diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index 2bd764a..ff4ca9e 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -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'; @@ -20,7 +21,8 @@ import { IncreaserComponent } from '../components/increaser/increaser.component' DashboardComponent, ProgressComponent, Graficas1Component, - IncreaserComponent + IncreaserComponent, + GraficoDonaComponent ], exports: [ DashboardComponent,