Skip to content

Commit

Permalink
* Fix missing zone.js in demo project
Browse files Browse the repository at this point in the history
* Make inputs properly optional so that they will work with projects using strict typescript
  • Loading branch information
Landon Tetreault committed Aug 2, 2024
1 parent 4c51d34 commit 9ebcba2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.less"],
Expand Down
66 changes: 33 additions & 33 deletions projects/ng-apexcharts/src/lib/chart/chart.component.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
import { isPlatformBrowser } from "@angular/common";
import {
ChangeDetectionStrategy,
Component,
ElementRef,
EventEmitter,
inject,
Input,
Output,
NgZone,
OnChanges,
OnDestroy,
SimpleChanges,
ViewChild,
NgZone,
ChangeDetectionStrategy,
EventEmitter,
inject,
Output,
PLATFORM_ID,
signal,
SimpleChanges,
ViewChild,
} from "@angular/core";
import { asapScheduler } from "rxjs";
import {
ApexAnnotations,
ApexAxisChartSeries,
ApexChart,
ApexDataLabels,
ApexFill,
ApexForecastDataPoints,
ApexGrid,
ApexLegend,
ApexNonAxisChartSeries,
ApexMarkers,
ApexNoData,
ApexNonAxisChartSeries,
ApexPlotOptions,
ApexResponsive,
ApexStates,
Expand All @@ -34,10 +37,7 @@ import {
ApexTooltip,
ApexXAxis,
ApexYAxis,
ApexForecastDataPoints,
} from "../model/apex-types";
import { BehaviorSubject, asapScheduler } from "rxjs";
import { isPlatformBrowser } from "@angular/common";

declare global {
interface Window {
Expand All @@ -52,28 +52,28 @@ declare global {
standalone: true,
})
export class ChartComponent implements OnChanges, OnDestroy {
@Input() chart: ApexChart;
@Input() annotations: ApexAnnotations;
@Input() colors: any[];
@Input() dataLabels: ApexDataLabels;
@Input() series: ApexAxisChartSeries | ApexNonAxisChartSeries;
@Input() stroke: ApexStroke;
@Input() labels: string[];
@Input() legend: ApexLegend;
@Input() markers: ApexMarkers;
@Input() noData: ApexNoData;
@Input() fill: ApexFill;
@Input() tooltip: ApexTooltip;
@Input() plotOptions: ApexPlotOptions;
@Input() responsive: ApexResponsive[];
@Input() xaxis: ApexXAxis;
@Input() yaxis: ApexYAxis | ApexYAxis[];
@Input() forecastDataPoints: ApexForecastDataPoints;
@Input() grid: ApexGrid;
@Input() states: ApexStates;
@Input() title: ApexTitleSubtitle;
@Input() subtitle: ApexTitleSubtitle;
@Input() theme: ApexTheme;
@Input() chart?: ApexChart;
@Input() annotations?: ApexAnnotations;
@Input() colors?: any[];
@Input() dataLabels?: ApexDataLabels;
@Input() series?: ApexAxisChartSeries | ApexNonAxisChartSeries;
@Input() stroke?: ApexStroke;
@Input() labels?: string[];
@Input() legend?: ApexLegend;
@Input() markers?: ApexMarkers;
@Input() noData?: ApexNoData;
@Input() fill?: ApexFill;
@Input() tooltip?: ApexTooltip;
@Input() plotOptions?: ApexPlotOptions;
@Input() responsive?: ApexResponsive[];
@Input() xaxis?: ApexXAxis;
@Input() yaxis?: ApexYAxis | ApexYAxis[];
@Input() forecastDataPoints?: ApexForecastDataPoints;
@Input() grid?: ApexGrid;
@Input() states?: ApexStates;
@Input() title?: ApexTitleSubtitle;
@Input() subtitle?: ApexTitleSubtitle;
@Input() theme?: ApexTheme;

@Input() autoUpdateSeries = true;

Expand Down

0 comments on commit 9ebcba2

Please sign in to comment.