import { Component, NgZone, ElementRef, Input, OnChanges, AfterViewInit } from "@angular/core";
import { Portlet } from "../../portlet/portlet";
import { BaseAmChart } from "./baseAmChart";
import * as am4core from "@amcharts/amcharts4/core";
import * as am4charts from "@amcharts/amcharts4/charts";
import am4themes_dataviz from "@amcharts/amcharts4/themes/dataviz";
export type SerieItemTypes = "line" | "bar" | "bar3D" | "area" | "cylinder" | "candlestick";
export interface IXYChartSerieItem {
name: string;
valueField: string;
type: SerieItemTypes;
axis?: string;
hidden?: boolean;
stacked?: boolean;
color?: string; // #hex
tooltip?: string;
}
export interface IXYChartAxisItem {
name: string;
title: string;
opposite?: boolean;
}
@Component({
selector: "rd-amchart-xy",
template: `
`
})
export class AmChartXY extends BaseAmChart implements OnChanges, AfterViewInit {
constructor(zone: NgZone, public element: ElementRef, portlet: Portlet) {
super(zone, element, portlet);
}
@Input("rd-data") data: Array