UNPKG

@progress/kendo-angular-schematics

Version:

Kendo UI Schematics for Angular

232 lines (231 loc) 7.48 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ export declare enum DataSource { /** * An example data source will be added to the project with predefined column definitions. * The data and column definitions can not be modified. * * This is the default. */ "Example" = "Example", /** * The user is expected to provide column definitions. * A mock data will be generated out of the column definitions. */ "Mock Data" = "Mock Data", /** * The user can specify a basic module to bind to and provide column definitions, * but in general the user will have to author some code to connect the data. */ "Existing App Data" = "Existing App Data" } export interface Series { type: CategoricalChartType; categoryField: string; currentField: string; field: string; name: string; width: number; } export interface CategoryAxis { name?: string; title?: string; type: CategoryAxisType; } export interface ValueAxis { name?: string; title?: string; type: ValueAxisType; } export interface Schema { renderAs?: 'canvas' | 'svg'; legend?: boolean; legendTitleText?: string; legendTitleAlign?: 'left' | 'right' | 'center'; legendTitlePosition?: 'top' | 'bottom'; legendAlign?: 'center' | 'start' | 'end'; legendOrientation?: 'vertical' | 'horizontal'; legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom'; dataSource: DataSource; series?: Series[]; categoryAxis?: CategoryAxis[]; valueAxis?: ValueAxis[]; dataPath?: string; dataName: string; dataSourceType?: string; dataSourceModule?: string; dataSourceMember?: string; dataSourceMethod?: string; } export interface SchemaCircular { renderAs?: 'canvas' | 'svg'; series?: string; showLabels?: boolean; legend?: boolean; legendTitleText?: string; legendTitleAlign?: 'left' | 'right' | 'center'; legendTitlePosition?: 'top' | 'bottom'; legendAlign?: 'center' | 'start' | 'end'; legendOrientation?: 'vertical' | 'horizontal'; legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom'; dataPath?: string; dataName: string; mockedData?: boolean; dataSourceType?: string; dataSourceModule?: string; dataSourceMember?: string; dataSourceMethod?: string; } export interface SchemaStock { renderAs?: 'canvas' | 'svg'; series?: string; categoryAxis?: string; valueAxis?: string; legend?: boolean; legendTitleText?: string; legendTitleAlign?: 'left' | 'right' | 'center'; legendTitlePosition?: 'top' | 'bottom'; legendAlign?: 'center' | 'start' | 'end'; legendOrientation?: 'vertical' | 'horizontal'; legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom'; navigator?: boolean; navigatorFrom?: string; navigatorТо?: string; navigatorSeries?: string; dataPath?: string; dataName: string; mockedData?: boolean; dataSourceType?: string; dataSourceModule?: string; dataSourceMember?: string; dataSourceMethod?: string; } export interface SchemaScatter { renderAs?: 'canvas' | 'svg'; series?: string; categoryAxis?: string; valueAxis?: string; legend?: boolean; legendTitleText?: string; legendTitleAlign?: 'left' | 'right' | 'center'; legendTitlePosition?: 'top' | 'bottom'; legendAlign?: 'center' | 'start' | 'end'; legendOrientation?: 'vertical' | 'horizontal'; legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom'; dataPath?: string; dataName: string; mockedData?: boolean; dataSourceType?: string; dataSourceModule?: string; dataSourceMember?: string; dataSourceMethod?: string; } export interface AngularComponentSchema { name: string; path?: string; project?: string; module?: string; selector?: string; prefix: string; style?: "css" | "scss" | "sass" | "less" | "none"; flat?: boolean; type?: string; displayBlock?: boolean; inlineStyle: boolean; inlineTemplate: boolean; skipTests: boolean; standalone: undefined | boolean; } export interface KendoChartPageLayoutSchema { title: boolean; legend: boolean; } export declare enum CategoricalChartType { "area" = "area", "bar" = "bar", "bullet" = "bullet", "column" = "column", "horizontalWaterfall" = "horizontalWaterfall", "line" = "line", "radarArea" = "radarArea", "radarColumn" = "radarColumn", "radarLine" = "radarLine", "rangeArea" = "rangeArea", "rangeBar" = "rangeBar", "rangeColumn" = "rangeColumn", "waterfall" = "waterfall" } export declare enum ValueAxisType { "numeric" = "numeric", "log" = "log" } export declare enum CategoryAxisType { "category" = "category", "date" = "date" } export interface CommonCategoricalChartSchema extends AngularComponentSchema, KendoChartPageLayoutSchema { /** * Time charts do not group in discrete categories but show data over continuous time range. */ time: boolean; /** * Show time navigator for time charts. */ navigator: boolean; /** * The category name of the single category axis chart. */ category: string; categories: string[]; /** * Series for the single category. */ series: string[]; /** * Use logarithmic scale for the single value axis. */ log: boolean; renderAs: "svg" | "canvas"; /** * Value name of a single axis categorical chart. */ value: string; } export declare function isCategorical(chart: KendoAngularChartSchema): chart is CategoricalChartSchema; export interface CategoricalChartSchema extends CommonCategoricalChartSchema { chartType: "area" | "bar" | "bullet" | "column" | "horizontalWaterfall" | "line" | "radarArea" | "radarColumn" | "radarLine" | "waterfall"; } export declare function isCategoricalRange(chart: KendoAngularChartSchema): chart is CategoricalRangeChartSchema; export interface CategoricalRangeChartSchema extends CommonCategoricalChartSchema { chartType: "rangeArea" | "rangeBar" | "rangeColumn"; } export interface ScatterChartSchema extends AngularComponentSchema, KendoChartPageLayoutSchema { chartType: "scatter"; } export interface StockChartSchema extends CommonCategoricalChartSchema, KendoChartPageLayoutSchema { chartType: "stock"; navigator: boolean; navigatorFrom: string; navigatorTo: string; } export interface CircularChartSchema extends AngularComponentSchema, KendoChartPageLayoutSchema { } export interface PieChartSchema extends CircularChartSchema { chartType: "pie"; time: false; value: string; series: ["value"]; category: string; categories: string[]; } export interface DonutChartSchema extends CircularChartSchema { chartType: "donut"; time: false; value: string; series: ["value"]; category: string; categories: string[]; } export type KendoAngularChartSchema = CategoricalChartSchema | CategoricalRangeChartSchema | ScatterChartSchema | StockChartSchema | PieChartSchema | DonutChartSchema;