@univerjs-pro/engine-chart 1.0.0-rc.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/chart-builder/chart-types.d.ts +10 -1
- package/lib/types/chart-builder/configuration/chart-config-group.d.ts +1 -0
- package/lib/types/chart-builder/conversion/chart-context-patch.d.ts +5 -2
- package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +5 -0
- package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +1030 -16
- package/lib/types/chart-text-measure-canvas.d.ts +1 -0
- package/lib/types/enum.d.ts +11 -1
- package/lib/types/facade/builders/f-scatter-chart-builder.d.ts +24 -0
- package/lib/types/facade/f-chart-builder-base.d.ts +22 -0
- package/lib/types/facade/f-chart.d.ts +22 -0
- package/lib/types/index.d.ts +3 -3
- package/lib/types/model/chart-data-operators/build-chart-data.d.ts +4 -0
- package/lib/types/model/chart-data-operators/index.d.ts +2 -0
- package/lib/types/model/chart-data-operators/operators.d.ts +25 -0
- package/lib/types/model/chart-locale-texts.d.ts +22 -0
- package/lib/types/model/chart-model.d.ts +3424 -0
- package/lib/types/model/chart-theme.service.d.ts +40 -0
- package/lib/types/model/constants/build-in-theme/default.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/index.d.ts +15 -0
- package/lib/types/model/constants/build-in-theme/theme-util.d.ts +5 -0
- package/lib/types/model/constants/build-in-theme/types.d.ts +76 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient1.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient2.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient3.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient4.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient5.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer-gradient6.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer1.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer2.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer3.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer4.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer5.d.ts +2 -0
- package/lib/types/model/constants/build-in-theme/univer6.d.ts +2 -0
- package/lib/types/model/constants/default-chart-style.d.ts +114 -0
- package/lib/types/model/constants/default.d.ts +11 -0
- package/lib/types/model/data-context-transformers/bar-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/box-plot-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/line-like-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/pareto-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/percent-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/pie-data-context-transformer.d.ts +3 -0
- package/lib/types/model/data-context-transformers/word-cloud-data-context-transform.d.ts +3 -0
- package/lib/types/model/echart-render-model.d.ts +32 -0
- package/lib/types/model/echart-to-chart-model-init.d.ts +3 -0
- package/lib/types/model/mode-converter/converters/boxplot-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/bubble-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/combination-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/constants.d.ts +7 -0
- package/lib/types/model/mode-converter/converters/funnel-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/heatmap-chart-convert.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/pareto-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/pie-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/radar-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/relation-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/sankey-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/scatter-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/tools.d.ts +15 -0
- package/lib/types/model/mode-converter/converters/waterfall-chart-converter.d.ts +2 -0
- package/lib/types/model/mode-converter/converters/word-cloud-converter.d.ts +76 -0
- package/lib/types/model/mode-converter/mode-converter.d.ts +96 -0
- package/lib/types/model/mode-converter/render-spec-operators/axis-title.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/bubble-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/chart-axes.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/chart-box-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/empty-style-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/font-size.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/grid-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/heatmap-chart-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/hover-mark-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/index.d.ts +13 -0
- package/lib/types/model/mode-converter/render-spec-operators/invalid-value-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/legend-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/line-like-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/operator-types.d.ts +7 -0
- package/lib/types/model/mode-converter/render-spec-operators/pie-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/radar-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/relation-chart-operator/relation-chart-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/relation-chart-operator/relation-force-directed-layout.d.ts +28 -0
- package/lib/types/model/mode-converter/render-spec-operators/sankey-chart-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/scatter-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/pareto-series-style.handler.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-chart-style.handler.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-data-label.handler.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-style-operator.d.ts +11 -0
- package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/waterfall-series-style-operator.d.ts +3 -0
- package/lib/types/model/mode-converter/render-spec-operators/stack.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/theme.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/title-style.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/tool-tip-operator.d.ts +3 -0
- package/lib/types/model/mode-converter/render-spec-operators/tools.d.ts +26 -0
- package/lib/types/model/mode-converter/render-spec-operators/trend-line/trend-line.operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/trend-line/trendline-util.d.ts +13 -0
- package/lib/types/model/mode-converter/render-spec-operators/visual-map-operator.d.ts +2 -0
- package/lib/types/model/mode-converter/render-spec-operators/watermark.operator.d.ts +2 -0
- package/lib/types/model/spec-converter/spec-converter.d.ts +1 -0
- package/lib/types/model/word-cloud-musk-image.service.d.ts +17 -0
- package/lib/types/models/chart-context/chart-field-selection.d.ts +3 -7
- package/lib/types/models/chart-data/build-chart-data.d.ts +1 -1
- package/lib/types/models/chart-host/chart-license.d.ts +5 -0
- package/lib/types/models/chart-model/chart-model.d.ts +3093 -48
- package/lib/types/models/chart-render/axes/axis-placement.d.ts +19 -0
- package/lib/types/models/chart-render/chart-field-button-layout.d.ts +51 -0
- package/lib/types/models/chart-render/converter/calendar-date-axis.d.ts +7 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/date-axis-label-layout.d.ts +5 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/error-bars.operator.d.ts +3 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/grid-operator.d.ts +3 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/legend-size.d.ts +24 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/multi-level-category-axis-layout.d.ts +2 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/pie-auto-label-layout.d.ts +4 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/title-size.d.ts +10 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/tool-tip-operator.d.ts +2 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/tools.d.ts +6 -3
- package/lib/types/models/chart-render/converter/render-spec-operators/value-axis-scale.d.ts +9 -0
- package/lib/types/models/chart-render/echart-render-model/echart-render-engine.d.ts +1 -0
- package/lib/types/models/chart-render/format/pie-data-label.d.ts +9 -0
- package/lib/types/models/chart-render/style/chart-runtime-style.d.ts +2 -1
- package/lib/types/models/common/constants/default-chart-style.d.ts +2 -1
- package/lib/types/types.d.ts +142 -11
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { axisTitleStyleOperator } from './axis-title.operator';
|
|
2
|
+
export { chartAxesOperator } from './chart-axes.operator';
|
|
3
|
+
export { chartBoxStyleOperator } from './chart-box-style.operator';
|
|
4
|
+
export { fontSizeOperator } from './font-size.operator';
|
|
5
|
+
export { hoverMarkStyleOperator } from './hover-mark-style.operator';
|
|
6
|
+
export { invalidValueStyleOperator } from './invalid-value-style.operator';
|
|
7
|
+
export { legendStyleOperator } from './legend-style.operator';
|
|
8
|
+
export { lineLikeStyleOperator } from './line-like-style.operator';
|
|
9
|
+
export { pieStyleOperator } from './pie-style.operator';
|
|
10
|
+
export { seriesStyleOperator } from './series-style-operator/series-style-operator';
|
|
11
|
+
export { stackOperator } from './stack.operator';
|
|
12
|
+
export { chartThemeOperator } from './theme.operator';
|
|
13
|
+
export { chartTitleStyleOperator } from './title-style.operator';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface INode {
|
|
2
|
+
id: string;
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
|
+
vx?: number;
|
|
6
|
+
vy?: number;
|
|
7
|
+
fixed?: boolean;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
interface ILink {
|
|
11
|
+
source: string;
|
|
12
|
+
target: string;
|
|
13
|
+
value?: number;
|
|
14
|
+
}
|
|
15
|
+
interface ILayoutOptions {
|
|
16
|
+
iterations?: number;
|
|
17
|
+
repulsion?: number;
|
|
18
|
+
attraction?: number;
|
|
19
|
+
theta?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function processEChartsGraphData(data: {
|
|
22
|
+
nodes: INode[];
|
|
23
|
+
links: ILink[];
|
|
24
|
+
}, canvasWidth?: number, canvasHeight?: number, options?: ILayoutOptions): {
|
|
25
|
+
nodes: INode[];
|
|
26
|
+
links: ILink[];
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChartStyle, DeepPartial, EChartRenderSpecOperator, EChartSeriesItem, ISeriesStyle } from '../../../../types';
|
|
2
|
+
import { ChartTypeBits } from '../../../../enum';
|
|
3
|
+
export interface ISeriesStyleHandlerContext {
|
|
4
|
+
seriesItem: EChartSeriesItem;
|
|
5
|
+
seriesIndex: number;
|
|
6
|
+
seriesStyle: DeepPartial<ISeriesStyle> | undefined;
|
|
7
|
+
chartStyle: ChartStyle;
|
|
8
|
+
chartType: ChartTypeBits;
|
|
9
|
+
}
|
|
10
|
+
export type SeriesItemHandler = (context: ISeriesStyleHandlerContext, isVerticalSeriesValue: boolean) => void;
|
|
11
|
+
export declare const seriesStyleOperator: EChartRenderSpecOperator;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ChartStyle, EChartSeriesItem, EChartSpec, IChartConfig, ILabelStyle } from '../../../types';
|
|
2
|
+
import type { ISpecGrid } from './operator-types';
|
|
3
|
+
type PartialLabelStyle = Partial<Pick<ILabelStyle, 'visible' | 'color' | 'fontSize' | 'italic' | 'bold' | 'underline' | 'strikethrough' | 'showMaxLabel' | 'showMinLabel'>>;
|
|
4
|
+
export declare function applyLabelStyle(spec: Record<string, any>, path: string, labelStyle: PartialLabelStyle): void;
|
|
5
|
+
export declare function applyLineStyle(spec: Record<string, any>, path: string, labelStyle: PartialLabelStyle): void;
|
|
6
|
+
export declare function toArray<T = unknown>(value: T | T[]): T[];
|
|
7
|
+
export declare function seriesForEach(series: EChartSpec['series'], func: (item: EChartSeriesItem, index: number) => void): void;
|
|
8
|
+
export declare function toPercentage(value: number, fixed?: number): string;
|
|
9
|
+
export declare const getLegendOrSeriesMaxWidth: (gridInfo: ISpecGrid, config: IChartConfig, style: ChartStyle) => number;
|
|
10
|
+
export declare const getCategoryLabelVertical: (gridInfo: ISpecGrid, style: ChartStyle) => number;
|
|
11
|
+
export declare const getCategoryLabelHorizontal: (gridInfo: ISpecGrid, style: ChartStyle, seriesCount: number, axisLabelMaxWidth?: number) => number;
|
|
12
|
+
export declare const getIntegerValue: (value: number, digit?: number) => number;
|
|
13
|
+
export declare const getGradientColor: (color: string, gradientFill: boolean) => string | {
|
|
14
|
+
gradient: string;
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
x2: number;
|
|
18
|
+
y2: number;
|
|
19
|
+
colorStops: {
|
|
20
|
+
offset: number;
|
|
21
|
+
color: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
type RenderColorFunc = (color: string) => string;
|
|
25
|
+
export declare const getRenderColorFunc: (style: ChartStyle) => RenderColorFunc;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type DataPoint = [number, number];
|
|
2
|
+
interface IRegressionResult {
|
|
3
|
+
formula: string;
|
|
4
|
+
execute: (x: number) => number;
|
|
5
|
+
R2: number;
|
|
6
|
+
}
|
|
7
|
+
declare function linearRegression(data: DataPoint[]): IRegressionResult;
|
|
8
|
+
declare function exponentialRegression(data: DataPoint[]): IRegressionResult;
|
|
9
|
+
declare function logarithmicRegression(data: DataPoint[]): IRegressionResult;
|
|
10
|
+
declare function powerRegression(data: DataPoint[]): IRegressionResult;
|
|
11
|
+
declare function polynomialRegression(data: DataPoint[], degree: number): IRegressionResult;
|
|
12
|
+
declare function movingAverage(data: DataPoint[], period: number): (number | null)[];
|
|
13
|
+
export { exponentialRegression, linearRegression, logarithmicRegression, movingAverage, polynomialRegression, powerRegression, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function convertToSpecFromModel(model: any): any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Injector } from '@univerjs/core';
|
|
2
|
+
import { Disposable } from '@univerjs/core';
|
|
3
|
+
export declare class WordCloudMuskImageService extends Disposable {
|
|
4
|
+
private _wordCloudMuskImageCollection;
|
|
5
|
+
constructor();
|
|
6
|
+
loadMuskImage(name: string, url: string): void;
|
|
7
|
+
loadMuskImages(): void;
|
|
8
|
+
getWordCloudImageMask(imgName: string): HTMLImageElement | undefined;
|
|
9
|
+
getWordCloudImageMaskMap(): Map<string, HTMLImageElement>;
|
|
10
|
+
dispose(): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* This function is used to register the WordCloudMuskImageService service avoiding the repeated registration of the service.
|
|
14
|
+
* @param injector The injector to register the service.
|
|
15
|
+
* @returns {void}
|
|
16
|
+
*/
|
|
17
|
+
export declare function registerWordCloudChartMakImageService(injector: Injector): void;
|
|
@@ -4,9 +4,6 @@ export interface IChartFieldSelection {
|
|
|
4
4
|
categoryIndexes: number[];
|
|
5
5
|
seriesIndexes: number[];
|
|
6
6
|
}
|
|
7
|
-
type ChartContextWithHistoricalCategoryIndex = Partial<IChartContext> & {
|
|
8
|
-
categoryIndex?: unknown;
|
|
9
|
-
};
|
|
10
7
|
export declare function countChartFieldTypes(field: Array<OptionDataValue | undefined>, sourceTypes?: Array<ChartSourceDataTypeEnum | undefined>): {
|
|
11
8
|
numbers: number;
|
|
12
9
|
strings: number;
|
|
@@ -14,8 +11,7 @@ export declare function countChartFieldTypes(field: Array<OptionDataValue | unde
|
|
|
14
11
|
};
|
|
15
12
|
export declare function classifyChartFields(dataSet: Pick<IUniverDataSet, 'source' | 'sourceType' | 'categorySpans'>): IChartFieldSelection;
|
|
16
13
|
export declare function resolveChartFieldSelectionContext(dataSet: IUniverDataSet, context: IChartContext, initializeSelection?: boolean): IChartContext;
|
|
17
|
-
/**
|
|
14
|
+
/** Reads historical field names through the shared context compatibility boundary. */
|
|
18
15
|
export declare function normalizeChartSnapshotContext(context: IChartSnapshotContext): IChartContext;
|
|
19
|
-
/**
|
|
20
|
-
export declare function
|
|
21
|
-
export {};
|
|
16
|
+
/** Historical snapshots and command patches must remain readable after field renames. */
|
|
17
|
+
export declare function decodeHistoricalChartContext(context: object): Partial<IChartContext>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IChartDataAggregation } from '../../chart-data-aggregation';
|
|
2
|
-
import type { ChartTypeBits } from '../../enum';
|
|
3
2
|
import type { IChartContext, IChartData, IUniverDataSet } from '../../types';
|
|
4
3
|
import type { IChartLocaleTexts } from '../common/chart-locale-texts';
|
|
4
|
+
import { ChartTypeBits } from '../../enum';
|
|
5
5
|
export declare function buildChartData(dataSet: IUniverDataSet, chartContext: IChartContext, chartType: ChartTypeBits, localeTexts: IChartLocaleTexts, dataAggregation?: IChartDataAggregation): IChartData;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IAccessor } from '@univerjs/core';
|
|
2
|
+
/** Validates chart grants independently of the replaceable License plugin and module. */
|
|
3
|
+
export declare function isChartFeatureAuthorized(accessor: IAccessor, feature: 'sf' | 'df' | 'uf'): boolean;
|
|
4
|
+
/** Returns undefined for the free tier; callers own its available chart types. */
|
|
5
|
+
export declare function getSheetChartLicenseTypes(accessor: IAccessor): string[] | undefined;
|