I don't get any error but I don't see anything

66 views
Skip to first unread message

Roberto Quintela

unread,
May 12, 2023, 10:47:09 AM5/12/23
to Google Visualization API
Hi

I'm using this versions 

"angular-google-charts": "^2.2.3",
"@angular/common": "^14.2.0",

I have a component where I0m going embed several graphics

..`
<app-grafica [title]="'Costes y Horas'" [type]="'ColumnChart'" [data]="dataHorasCostesOfertas" [columns]="chartHorasCostesOfertasColumns" [options]="options">
...
<app-grafica [title]="'Ofertas Presentadas y Adjudicadas'" [type]="'ColumnChart'"
[data]="dataPorcentajeAdjudicadas" [columns]="chartPorcentajeAdjudicadasColumns" [options]="options">

chartPorcentajeAdjudicadasColumns = ['Año', 'Presentadas', 'Adjudicadas'];
chartHorasCostesOfertasColumns = ['Año', 'Horas', 'Costes'];

options={
hAxis: {
title: 'Años',
},
vAxis: {
minValue: 0,
},
legend: { position: 'top' }
`

then I have this graficaComponent

`

import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';

@component({
selector: 'app-grafica',
templateUrl: './grafica.component.html',
styleUrls: ['./grafica.component.scss']
})
export class GraficaComponent implements OnInit, OnChanges {
@input() title: string;
@input() type: string;
@input() origen: string;
@input() data: any[][];
@input() columns: string[];
@input() options: any;

constructor() { }
ngOnChanges(changes: SimpleChanges): void {
console.log('GraficaComponent-ngOnChanges-data', this.data);
}
ngOnInit(): void {
}
}

I don't get any error but I don't see anything

Any  idea, please?

Thanks

Captura.JPG
Reply all
Reply to author
Forward
0 new messages