import { OnInit, EventEmitter, AfterViewInit, OnDestroy } from '@angular/core'; import { ApexChart, ApexDataLabels, ApexPlotOptions, ApexLegend, ApexTitleSubtitle, ApexNonAxisChartSeries, ApexResponsive, ApexStroke, ApexTheme, ApexNoData, ApexStates } from 'ng-apexcharts'; import { CdkDragDrop } from '@angular/cdk/drag-drop'; import { ResizeEvent } from 'angular-resizable-element'; import { MatMenuTrigger } from '@angular/material/menu'; import { Utils } from '../../../utils/utils'; import { FieldsListService } from '../../.././../field-list-lib/fields-list.service'; import { Router } from '@angular/router'; import { CrossFilterDto, ElementsDto } from '../../../../common-dto/elements-dto'; import { ChartProperty } from '../chart/chart-property'; import { IGraphicalReportComponent } from '../igraphical-report.component'; import { PieChart } from './pie-chart'; import { ReportBuilderMasterService } from '../../report-builder-master.service'; import { SendToDashboardService } from '../../../../dashboard-lib/send-to-dashboard.service'; import { Report } from '../../../../common-utils/report'; import { ElementService } from '../../element.service'; import { IChartComponent } from '../ichart-component'; import { CommonService } from '../../../../common.service'; import { ScreenType } from '../../../filters/condition-type'; import { AxFilter } from '../../../filters/ax-filter'; import { Page } from '../page/page'; import { DrillThroughService } from '../../../../drill-through/drill-through.service'; import { AxElement } from '../../../elements/ax-element'; import { DashboardBuilderService } from '../../../../dashboard-lib/dashboard-builder.service'; import { GhostLoaderType } from '../../../../ghost-loader/ghost-loader.component'; import { FiltersService } from '../../../../filters/filters.service'; import * as i0 from "@angular/core"; export declare type PieChartOptions = { series: ApexNonAxisChartSeries; chart: ApexChart; responsive: ApexResponsive[]; labels: any; title: ApexTitleSubtitle; plotOptions: ApexPlotOptions; legend: ApexLegend; stroke: ApexStroke; theme: ApexTheme; dataLabels: ApexDataLabels; states: ApexStates; fill: any; colors: Array; chartOptions: any; noData: ApexNoData; toolbar: any; tooltip: ApexTooltip; state: ApexStates; }; export declare class PieChartComponent implements IGraphicalReportComponent, OnInit, AfterViewInit, OnDestroy, IChartComponent { private _fieldsListService; private _reportBuilderMasterService; private _sendToDashboardService; private _elementService; private _commonService; private _drillThroughService; private _dashboardService; private _router; private _filterService; reportData: PieChart; isEditable: boolean; guid: string; onchartClickedEvent: EventEmitter; onchartRightClickDeleteEvent: EventEmitter; chartRendered: EventEmitter; screenType: ScreenType; drillThroughFilterInput: AxFilter; drillThroughParentType: ScreenType; currentPageId: number; appVersionId: number; ScreenType: typeof ScreenType; ShowFilters: Boolean; yPosition: number; xPosition: number; contextMenu: MatMenuTrigger; componentRef: IChartComponent; pieChartOptions: Partial; uniquekey: number; reportId: number; property: ChartProperty; report: Report; handle: boolean; isDataPointSelected: boolean; contextMenuPosition: { x: string; y: string; }; selectedDataPoints: Array; isDrillThrough: boolean; selectedSeriesIndexes: Array; _utils: Utils; pages: Array; isDirty: boolean; drillThroughFilter: AxFilter; showGhostLoader: boolean; GhostLoaderType: typeof GhostLoaderType; private _unsubscribeAll; /** * Constructor * */ constructor(_fieldsListService: FieldsListService, // Used for get matrix data _reportBuilderMasterService: ReportBuilderMasterService, _sendToDashboardService: SendToDashboardService, _elementService: ElementService, _commonService: CommonService, _drillThroughService: DrillThroughService, _dashboardService: DashboardBuilderService, _router: Router, _filterService: FiltersService); get screenTypes(): typeof ScreenType; click(event: any): void; ngAfterViewInit(): void; /** * On init */ ngOnInit(): void; /** * Initialized pie chart */ initializePieChartOptions(): void; /** * On destroy */ ngOnDestroy(): void; subscribers(): void; getChartData(): void; /** * * Called when we select a pie by a click event * * @param opts */ dataPointSelection(opts: any): void; /** * set data to chart if entitiesAttribute is not equal to null then this method will call and will highlight the matrix */ highlightSeriesData(indexList: Array): void; /** * Created filter object for cross filtering. * * @param CrossFilterDto */ createCrossFilter(crossFilterData: CrossFilterDto): void; /** * pushed the filter object into basic filter and applied the filter on the data * * @param CrossFilterDto * @param AxFilter */ getCrossFilterData(_filter: AxFilter, crossFilterData: CrossFilterDto): void; /** * Deselect selected data points of chart. */ deselectDataPoints(): void; /** * set data to chart if entitiesAttribute is not equal to null then this method will call */ setDataToChart(entitiesAttribute: ElementsDto): void; /** * attributeDropped * Called when attribute is dragged from left side fields list and dropped on the Pie chart * * @param $event */ attributeDropped($event: CdkDragDrop): void; chartSelect(): void; /*** * On chart context click Function */ onContextMenu(event: MouseEvent, chart: PieChart): void; openOptionPopUp(): void; onDeleteClick(event: MouseEvent, item: AxElement): void; sendToDashboard(): void; /** * chartResizeMinDimensions = this function use Resize min dimensions validation */ chartResizeMinDimensions(event: ResizeEvent): boolean; /** * onResizing = this function use for resize the chart */ onResizing(event: ResizeEvent): void; /** * Called when resizing ends */ resizeEnd(): void; /** * to set isDirty after changes in pie-chart filter * */ dirtyFlowCheckEvent(): void; /** * call cdk drag start event * * @param $event */ dragStart($event: DragEvent): void; /** * call cdk drag end event * * @param $event */ dragEnd($event: DragEvent): void; /** * Created filter object for cross filtering. * * @param CrossFilterDto */ createDrillThroughFilter(series: any): void; /** * Called on page name clicked on dropdown options of drill through pages * * @param page */ pageClick(page: Page): void; /** * Navigate to drill through component with page id as route params * Checks the parent URL if it is already exists or not * * @param page */ navigateToDrillThrough(page: Page): void; /** * Apply local filter. */ applyLocalFilter(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }