UNPKG

@progress/kendo-angular-chart-wizard

Version:

Kendo UI Angular Chart Wizard component

261 lines (260 loc) 13.2 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core'; import { chartBarClusteredIcon, chartBarStacked100Icon, chartBarStackedIcon, chartColumnClusteredIcon, chartColumnStacked100Icon, chartColumnStackedIcon, chartLineIcon, chartLineStacked100Icon, chartLineStackedIcon, chartPieIcon, chartScatterIcon, exportIcon } from '@progress/kendo-svg-icons'; import { StateService } from '../state.service'; import { ExpansionPanelComponent } from '@progress/kendo-angular-layout'; import { ChartWizardSeriesTypeButtonComponent } from '../series-type-button.component'; import { ChartWizardLocalizationService } from '../localization/chartwizard-localization.service'; import * as i0 from "@angular/core"; import * as i1 from "../state.service"; import * as i2 from "../localization/chartwizard-localization.service"; /** * @hidden */ export class ChartWizardPropertyPaneChartTabComponent { stateService; cdr; localization; exportIcon = exportIcon; chartBarClusteredIcon = chartBarClusteredIcon; chartBarStackedIcon = chartBarStackedIcon; chartBarStacked100Icon = chartBarStacked100Icon; chartPieIcon = chartPieIcon; chartColumnClusteredIcon = chartColumnClusteredIcon; chartColumnStackedIcon = chartColumnStackedIcon; chartColumnStacked100Icon = chartColumnStacked100Icon; chartLineIcon = chartLineIcon; chartLineStackedIcon = chartLineStackedIcon; chartLineStacked100Icon = chartLineStacked100Icon; chartScatterIcon = chartScatterIcon; constructor(stateService, cdr, localization) { this.stateService = stateService; this.cdr = cdr; this.localization = localization; } ngAfterViewChecked() { this.localization.changes.subscribe(() => { this.detectChanges(); }); } ngOnDestroy() { this.localization.changes.unsubscribe(); } detectChanges() { this.cdr.detectChanges(); } messageFor(key) { return this.localization.get(key); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChartWizardPropertyPaneChartTabComponent, deps: [{ token: i1.StateService }, { token: i0.ChangeDetectorRef }, { token: i2.ChartWizardLocalizationService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ChartWizardPropertyPaneChartTabComponent, isStandalone: true, selector: "kendo-chartwizard-property-pane-chart-tab", ngImport: i0, template: ` <kendo-expansionpanel [title]="messageFor('barChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('barChartBar')" [chartTypeIcon]="chartBarClusteredIcon" seriesType="bar" [stack]="false" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('barChartStackedBar')" [chartTypeIcon]="chartBarStackedIcon" seriesType="bar" [stack]="true" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('barChart100StackedBar')" [chartTypeIcon]="chartBarStacked100Icon" seriesType="bar" [stack]="{ type: '100%' }" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> <kendo-expansionpanel [title]="messageFor('pieChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('pieChartPie')" [chartTypeIcon]="chartPieIcon" seriesType="pie" [stack]="undefined" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> <kendo-expansionpanel [title]="messageFor('columnChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('columnChartColumn')" [chartTypeIcon]="chartColumnClusteredIcon" seriesType="column" [stack]="false" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('columnChartStackedColumn')" [chartTypeIcon]="chartColumnStackedIcon" seriesType="column" [stack]="true" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('columnChart100StackedColumn')" [chartTypeIcon]="chartColumnStacked100Icon" seriesType="column" [stack]="{ type: '100%' }" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> <kendo-expansionpanel [title]="messageFor('lineChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('lineChartLine')" [chartTypeIcon]="chartLineIcon" seriesType="line" [stack]="false" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('lineChartStackedLine')" [chartTypeIcon]="chartLineStackedIcon" seriesType="line" [stack]="true" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('lineChart100StackedLine')" [chartTypeIcon]="chartLineStacked100Icon" seriesType="line" [stack]="{ type: '100%' }" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> <kendo-expansionpanel [title]="messageFor('scatterChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('scatterChartScatter')" [chartTypeIcon]="chartScatterIcon" seriesType="scatter" [stack]="false" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> `, isInline: true, dependencies: [{ kind: "component", type: ExpansionPanelComponent, selector: "kendo-expansionpanel", inputs: ["title", "subtitle", "disabled", "expanded", "svgExpandIcon", "svgCollapseIcon", "expandIcon", "collapseIcon", "animation"], outputs: ["expandedChange", "action", "expand", "collapse"], exportAs: ["kendoExpansionPanel"] }, { kind: "component", type: ChartWizardSeriesTypeButtonComponent, selector: "kendo-chartwizard-series-type-button", inputs: ["title", "chartTypeIcon", "stack", "seriesType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChartWizardPropertyPaneChartTabComponent, decorators: [{ type: Component, args: [{ selector: 'kendo-chartwizard-property-pane-chart-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: ` <kendo-expansionpanel [title]="messageFor('barChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('barChartBar')" [chartTypeIcon]="chartBarClusteredIcon" seriesType="bar" [stack]="false" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('barChartStackedBar')" [chartTypeIcon]="chartBarStackedIcon" seriesType="bar" [stack]="true" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('barChart100StackedBar')" [chartTypeIcon]="chartBarStacked100Icon" seriesType="bar" [stack]="{ type: '100%' }" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> <kendo-expansionpanel [title]="messageFor('pieChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('pieChartPie')" [chartTypeIcon]="chartPieIcon" seriesType="pie" [stack]="undefined" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> <kendo-expansionpanel [title]="messageFor('columnChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('columnChartColumn')" [chartTypeIcon]="chartColumnClusteredIcon" seriesType="column" [stack]="false" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('columnChartStackedColumn')" [chartTypeIcon]="chartColumnStackedIcon" seriesType="column" [stack]="true" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('columnChart100StackedColumn')" [chartTypeIcon]="chartColumnStacked100Icon" seriesType="column" [stack]="{ type: '100%' }" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> <kendo-expansionpanel [title]="messageFor('lineChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('lineChartLine')" [chartTypeIcon]="chartLineIcon" seriesType="line" [stack]="false" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('lineChartStackedLine')" [chartTypeIcon]="chartLineStackedIcon" seriesType="line" [stack]="true" > </kendo-chartwizard-series-type-button> <kendo-chartwizard-series-type-button [title]="messageFor('lineChart100StackedLine')" [chartTypeIcon]="chartLineStacked100Icon" seriesType="line" [stack]="{ type: '100%' }" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> <kendo-expansionpanel [title]="messageFor('scatterChart')" [expanded]="true"> <div class="k-chart-types-wrapper"> <kendo-chartwizard-series-type-button [title]="messageFor('scatterChartScatter')" [chartTypeIcon]="chartScatterIcon" seriesType="scatter" [stack]="false" > </kendo-chartwizard-series-type-button> </div> </kendo-expansionpanel> `, standalone: true, imports: [ExpansionPanelComponent, ChartWizardSeriesTypeButtonComponent] }] }], ctorParameters: () => [{ type: i1.StateService }, { type: i0.ChangeDetectorRef }, { type: i2.ChartWizardLocalizationService }] });