FERNman / angular-google-charts

A wrapper for the Google Charts library written in Angular.
Other
276 stars 107 forks source link

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

Closed kintela closed 2 months ago

kintela commented 1 year ago

Hi

I have a component where I am going to 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 { } }

` But nothing is shown, no error appears and the graphic component receives the data correctly

image

Any idea, please?

Thanks

FERNman commented 2 months ago

I'll close this since it's quite old already. I hope you managed to resolve this in the meantime!