You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No encuentra referencia del objeto apexchart "undefined",
En el componente:
import {
ApexAxisChartSeries,
ApexChart,
ChartComponent,
ApexDataLabels,
ApexPlotOptions,
ApexResponsive,
ApexXAxis,
ApexLegend,
ApexFill,
NgApexchartsModule
} from "ng-apexcharts";
import * as ApexCharts from 'apexcharts'
No encuentra referencia del objeto apexchart "undefined",
En el componente:
import {
ApexAxisChartSeries,
ApexChart,
ChartComponent,
ApexDataLabels,
ApexPlotOptions,
ApexResponsive,
ApexXAxis,
ApexLegend,
ApexFill,
NgApexchartsModule
} from "ng-apexcharts";
import * as ApexCharts from 'apexcharts'
@component({
selector: 'app-grafica1',
standalone: true,
imports: [ NgApexchartsModule,
...
...
@ViewChild('chart') mychar: ChartComponent;
...
..
this.chartOptions = {
series: [
..
this.mychar.dataURI().then(function (e) {
....
Html:
<apx-chart #chart
[series]="chartOptions.series"
[chart]="chartOptions.chart"
[dataLabels]="chartOptions.dataLabels"
[plotOptions]="chartOptions.plotOptions"
[responsive]="chartOptions.responsive"
[xaxis]="chartOptions.xaxis"
[legend]="chartOptions.legend"
[fill]="chartOptions.fill"
[colors]="chartOptions.colors"
>
Error:
ERROR TypeError: Cannot read properties of undefined (reading 'dataURI')
Package
"apexcharts": "^3.44.0",
"ng-apexcharts": "^1.8.0",
"@angular/cli": "~16.1.0",
El gráfico se presenta sin problemas, funciona bien la parte visual, pero al exportar desde script con la función dataURI presenta problema
Agradezco puedan ayudarme con el error
The text was updated successfully, but these errors were encountered: