@univerjs-pro/engine-chart 1.0.0-alpha.2 → 1.0.0-alpha.4
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/README.md +9 -3
- package/lib/cjs/facade.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -0
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -0
- package/lib/index.js +1 -1
- package/lib/types/chart-builder/chart-builder-adapter.d.ts +13 -0
- package/lib/types/chart-builder/chart-builder.d.ts +35 -0
- package/lib/types/chart-builder/chart-description.d.ts +3 -0
- package/lib/types/chart-builder/chart-types.d.ts +459 -0
- package/lib/types/chart-builder/configuration/aggregation.d.ts +7 -0
- package/lib/types/chart-builder/configuration/appearance.d.ts +8 -0
- package/lib/types/chart-builder/configuration/area.d.ts +3 -0
- package/lib/types/chart-builder/configuration/axes.d.ts +26 -0
- package/lib/types/chart-builder/configuration/axis-pointer.d.ts +9 -0
- package/lib/types/chart-builder/configuration/bar.d.ts +3 -0
- package/lib/types/chart-builder/configuration/cartesian-series.d.ts +25 -0
- package/lib/types/chart-builder/configuration/chart-config-operation.d.ts +40 -0
- package/lib/types/chart-builder/configuration/combination.d.ts +10 -0
- package/lib/types/chart-builder/configuration/funnel.d.ts +4 -0
- package/lib/types/chart-builder/configuration/heatmap.d.ts +9 -0
- package/lib/types/chart-builder/configuration/index.d.ts +29 -0
- package/lib/types/chart-builder/configuration/invalid-value.d.ts +3 -0
- package/lib/types/chart-builder/configuration/legend.d.ts +3 -0
- package/lib/types/chart-builder/configuration/line.d.ts +3 -0
- package/lib/types/chart-builder/configuration/mapping.d.ts +4 -0
- package/lib/types/chart-builder/configuration/mark-lines.d.ts +3 -0
- package/lib/types/chart-builder/configuration/palette.d.ts +4 -0
- package/lib/types/chart-builder/configuration/pareto.d.ts +7 -0
- package/lib/types/chart-builder/configuration/pie.d.ts +23 -0
- package/lib/types/chart-builder/configuration/point-mapping.d.ts +5 -0
- package/lib/types/chart-builder/configuration/radar.d.ts +5 -0
- package/lib/types/chart-builder/configuration/relation.d.ts +14 -0
- package/lib/types/chart-builder/configuration/subtitle.d.ts +3 -0
- package/lib/types/chart-builder/configuration/theme.d.ts +4 -0
- package/lib/types/chart-builder/configuration/title.d.ts +3 -0
- package/lib/types/chart-builder/configuration/trendline.d.ts +12 -0
- package/lib/types/chart-builder/configuration/waterfall.d.ts +12 -0
- package/lib/types/chart-builder/configuration/word-cloud.d.ts +7 -0
- package/lib/types/chart-builder/conversion/chart-config-converter.d.ts +24 -0
- package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +115 -0
- package/lib/types/chart-builder/conversion/chart-type-converter.d.ts +6 -0
- package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +11 -0
- package/lib/types/chart-builder/conversion/resolve-chart-model-data.d.ts +5 -0
- package/lib/types/chart-builder/detached-chart-builder-adapter.d.ts +19 -0
- package/lib/types/chart-builder/index.d.ts +12 -0
- package/lib/types/chart-builder/internal/deep-freeze.d.ts +1 -0
- package/lib/types/chart-builder/internal/host-builder-runtime.d.ts +5 -0
- package/lib/types/chart-builder/internal/merge-description.d.ts +2 -0
- package/lib/types/enum.d.ts +36 -0
- package/lib/types/facade/builders/f-area-chart-builder.d.ts +33 -0
- package/lib/types/facade/builders/f-bubble-chart-builder.d.ts +33 -0
- package/lib/types/facade/builders/f-combination-chart-builder.d.ts +66 -0
- package/lib/types/facade/builders/f-funnel-chart-builder.d.ts +61 -0
- package/lib/types/facade/builders/f-heatmap-chart-builder.d.ts +124 -0
- package/lib/types/facade/builders/f-line-chart-builder.d.ts +36 -0
- package/lib/types/facade/builders/f-pareto-chart-builder.d.ts +112 -0
- package/lib/types/facade/builders/f-pie-chart-builder.d.ts +324 -0
- package/lib/types/facade/builders/f-radar-chart-builder.d.ts +62 -0
- package/lib/types/facade/builders/f-relation-chart-builder.d.ts +184 -0
- package/lib/types/facade/builders/f-scatter-chart-builder.d.ts +33 -0
- package/lib/types/facade/builders/f-waterfall-chart-builder.d.ts +226 -0
- package/lib/types/facade/builders/f-word-cloud-chart-builder.d.ts +91 -0
- package/lib/types/facade/builders/index.d.ts +13 -0
- package/lib/types/facade/chart-builder-registry.d.ts +8 -0
- package/lib/types/facade/chart-builder-type-map.d.ts +30 -0
- package/lib/types/facade/chart-host-builder-types.d.ts +21 -0
- package/lib/types/facade/f-axis-chart-builder.d.ts +245 -0
- package/lib/types/facade/f-cartesian-chart-builder.d.ts +146 -0
- package/lib/types/facade/f-chart-base.d.ts +82 -0
- package/lib/types/facade/f-chart-builder-base.d.ts +331 -0
- package/lib/types/facade/f-charts-base.d.ts +74 -0
- package/lib/types/facade/f-enum.d.ts +75 -0
- package/lib/types/facade/index.d.ts +16 -0
- package/lib/types/facade/internal/chart-builder-facade-context.d.ts +12 -0
- package/lib/types/facade/internal/constants.d.ts +2 -0
- package/lib/types/facade/internal/host-builder-composer.d.ts +16 -0
- package/lib/types/facade/register-builders.d.ts +1 -0
- package/lib/types/index.d.ts +74 -15
- package/lib/types/models/chart-data-operators/build-chart-data.d.ts +6 -1
- package/lib/types/models/chart-data-operators/cartesian-point-data.d.ts +43 -0
- package/lib/types/models/chart-data-operators/operators.d.ts +6 -6
- package/lib/types/models/chart-element-axis-id.d.ts +9 -0
- package/lib/types/models/chart-element-edit-overlay/chart-element-edit-overlay.d.ts +38 -0
- package/lib/types/models/chart-element-edit-overlay/index.d.ts +4 -0
- package/lib/types/models/chart-element-edit-overlay/palette.d.ts +2 -0
- package/lib/types/models/chart-element-edit-overlay/resolve-chart-element-hit-layout.d.ts +16 -0
- package/lib/types/models/chart-element-edit-overlay/types.d.ts +20 -0
- package/lib/types/models/chart-host-style.d.ts +40 -0
- package/lib/types/models/chart-model.d.ts +181 -49
- package/lib/types/models/chart-render-input-resolver.d.ts +13 -0
- package/lib/types/models/chart-render-model-manager.service.d.ts +26 -0
- package/lib/types/models/chart-resource-serializer.d.ts +10 -0
- package/lib/types/models/chart-semantic-axes.d.ts +4 -0
- package/lib/types/models/constants/build-in-theme/index.d.ts +12 -12
- package/lib/types/models/constants/build-in-theme/univer-gradient1.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient2.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient3.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient4.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient5.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer-gradient6.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer1.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer2.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer3.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer4.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer5.d.ts +1 -1
- package/lib/types/models/constants/build-in-theme/univer6.d.ts +1 -1
- package/lib/types/models/constants/default-chart-style.d.ts +21 -1
- package/lib/types/models/constants/default.d.ts +3 -1
- package/lib/types/models/echart-render-model.d.ts +37 -2
- package/lib/types/models/image-chart-host.d.ts +2 -1
- package/lib/types/models/mode-converter/converters/waterfall-layout.d.ts +34 -0
- package/lib/types/models/mode-converter/mode-converter.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/legend-size.d.ts +2 -1
- package/lib/types/models/mode-converter/render-spec-operators/mark-line.operator.d.ts +3 -0
- package/lib/types/models/mode-converter/render-spec-operators/tools.d.ts +2 -3
- package/lib/types/models/series-style/series-style-resolver.d.ts +9 -0
- package/lib/types/source/chart-data-item.d.ts +3 -0
- package/lib/types/source/source-util.d.ts +1 -1
- package/lib/types/source/static-chart-source.d.ts +11 -3
- package/lib/types/types.d.ts +162 -39
- package/lib/types/util.d.ts +2 -4
- package/lib/types/utils/compact.d.ts +4 -0
- package/lib/types/wordcloud-chart/adapters/echarts/chart-view.d.ts +2 -2
- package/lib/types/wordcloud-chart/adapters/echarts/install.d.ts +2 -2
- package/lib/types/wordcloud-chart/adapters/echarts/layout-register.d.ts +2 -2
- package/lib/types/wordcloud-chart/adapters/echarts/series-model.d.ts +2 -2
- package/lib/types/wordcloud-chart/core/collision/box-shape-engine.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/engine.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/footprint.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/glyph-shape-engine.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/grid.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/candidates.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/layout-config.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/layout.d.ts +1 -2
- package/lib/types/wordcloud-chart/core/layout/phases.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/place-word.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/placement-stats.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/placement-types.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/placement-word-manager.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/runtime-mask.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/layout/word-prepare.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/shape/shape-mask.d.ts +1 -1
- package/lib/types/wordcloud-chart/index.d.ts +3 -2
- package/lib/types/wordcloud-chart/types.d.ts +2 -0
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +15 -5
- package/lib/types/wordcloud-chart/core/collision/types.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/layout/types.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/shape/types.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/text/types.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/types/option.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/types/shape.d.ts +0 -1
- package/lib/types/wordcloud-chart/core/types/word.d.ts +0 -1
- package/lib/types/wordcloud-chart/echarts.d.ts +0 -2
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { IChartContext, IChartData, IUniverDataSet } from '../../types';
|
|
2
2
|
import type { IChartLocaleTexts } from '../chart-locale-texts';
|
|
3
3
|
import { ChartTypeBits } from '../../enum';
|
|
4
|
-
export declare
|
|
4
|
+
export declare enum RelationColumnIndex {
|
|
5
|
+
Source = 0,
|
|
6
|
+
Target = 1,
|
|
7
|
+
Weight = 2
|
|
8
|
+
}
|
|
9
|
+
export declare function buildChartData(dataSource: IUniverDataSet, chartContext: IChartContext, chartType: ChartTypeBits, _isRowDirection: boolean, localeTexts: IChartLocaleTexts): IChartData;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IUniverDataSet } from '../../types';
|
|
2
|
+
import type { IChartLocaleTexts } from '../chart-locale-texts';
|
|
3
|
+
export declare enum CartesianPointRoleIndex {
|
|
4
|
+
X = 0,
|
|
5
|
+
Y = 1,
|
|
6
|
+
Size = 2
|
|
7
|
+
}
|
|
8
|
+
export declare enum CartesianPointValueIndex {
|
|
9
|
+
X = 0,
|
|
10
|
+
Y = 1,
|
|
11
|
+
Size = 2,
|
|
12
|
+
Label = 3
|
|
13
|
+
}
|
|
14
|
+
export interface ICartesianPointRecord {
|
|
15
|
+
sourceIndex: number;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
label?: string;
|
|
19
|
+
size?: number;
|
|
20
|
+
group?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ICartesianPointData {
|
|
23
|
+
isValid: boolean;
|
|
24
|
+
xIndex: number;
|
|
25
|
+
yIndex: number;
|
|
26
|
+
xName: string;
|
|
27
|
+
yName: string;
|
|
28
|
+
labelName?: string;
|
|
29
|
+
sizeName?: string;
|
|
30
|
+
groupName?: string;
|
|
31
|
+
records: ICartesianPointRecord[];
|
|
32
|
+
}
|
|
33
|
+
interface ICartesianPointRoleIndexes {
|
|
34
|
+
xIndex: number;
|
|
35
|
+
yIndex: number;
|
|
36
|
+
labelIndex?: number;
|
|
37
|
+
sizeIndex?: number;
|
|
38
|
+
seriesIndex?: number;
|
|
39
|
+
headers?: string[];
|
|
40
|
+
}
|
|
41
|
+
/** Builds normalized Cartesian point records consumed by coordinate-chart converters. */
|
|
42
|
+
export declare function buildCartesianPointData(dataSource: IUniverDataSet, roles: ICartesianPointRoleIndexes, localeTexts: IChartLocaleTexts): ICartesianPointData;
|
|
43
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IChartContext, OptionDataValue } from '../../types';
|
|
1
|
+
import type { IChartContext, IChartDataSource, OptionDataValue } from '../../types';
|
|
3
2
|
import type { ChartModel } from '../chart-model';
|
|
4
3
|
import { ChartSourceDataTypeEnum } from '../../enum';
|
|
5
|
-
export type IChartContextOperator = (dataSource:
|
|
4
|
+
export type IChartContextOperator = (dataSource: IChartDataSource, context: IChartContext, model: ChartModel) => IChartContext;
|
|
6
5
|
type Nil = null | undefined;
|
|
7
6
|
export declare function isNil(value: any): value is Nil;
|
|
8
7
|
export declare function countTypesFromArray(arrayData: Array<OptionDataValue | undefined>, sourceTypes?: Array<ChartSourceDataTypeEnum | undefined>): {
|
|
@@ -11,10 +10,11 @@ export declare function countTypesFromArray(arrayData: Array<OptionDataValue | u
|
|
|
11
10
|
total: number;
|
|
12
11
|
};
|
|
13
12
|
export declare function toColumnOrient<T = any>(dataSource: T[][]): T[][];
|
|
14
|
-
export declare function findCategoryIndexes(dataSource:
|
|
15
|
-
export declare const
|
|
13
|
+
export declare function findCategoryIndexes(dataSource: IChartDataSource): number[];
|
|
14
|
+
export declare const findHeaderOperator: IChartContextOperator;
|
|
15
|
+
export declare const findCategoryOperator: IChartContextOperator;
|
|
16
16
|
export declare const findSeriesOperator: IChartContextOperator;
|
|
17
17
|
export declare const pieSeriesFilterOperator: IChartContextOperator;
|
|
18
18
|
export declare const defaultChartContextOperators: IChartContextOperator[];
|
|
19
|
-
export declare function generateChartModelContextByOperators(chartModel: ChartModel, dataSource:
|
|
19
|
+
export declare function generateChartModelContextByOperators(chartModel: ChartModel, dataSource: IChartDataSource, operators?: IChartContextOperator[]): IChartContext;
|
|
20
20
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChartDirection, IChartElementHit, IRuntimeAxis } from '../types';
|
|
2
|
+
export declare const CHART_ELEMENT_AXIS_ID_META = "__univerChartElementAxisId";
|
|
3
|
+
export type ChartElementAxisId = NonNullable<IChartElementHit['axisId']>;
|
|
4
|
+
type ChartElementAxisTarget = 'title' | 'label' | 'line';
|
|
5
|
+
export declare function getChartElementAxisId(axisOption: unknown): ChartElementAxisId | undefined;
|
|
6
|
+
export declare function setChartElementAxisId(axisOption: Record<string, unknown>, axisId: ChartElementAxisId): void;
|
|
7
|
+
export declare function resolveChartElementAxisId(axisPosition: IChartElementHit['axisPosition'] | undefined, direction: ChartDirection | undefined, runtimeAxes: IRuntimeAxis[] | undefined): ChartElementAxisId;
|
|
8
|
+
export declare function getChartElementAxisKind(axisId: ChartElementAxisId, target: ChartElementAxisTarget): IChartElementHit['kind'];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IChartElementBounds, IChartElementHit } from '../../types';
|
|
2
|
+
import type { ChartElementEditBorderType, IChartElementEditOverlayPalette } from './types';
|
|
3
|
+
export declare class ChartElementEditOverlay {
|
|
4
|
+
private readonly _getInstance;
|
|
5
|
+
private readonly _getContainer;
|
|
6
|
+
private readonly _paletteOverride?;
|
|
7
|
+
private _group;
|
|
8
|
+
private _hoverBorder;
|
|
9
|
+
private _hoverHit;
|
|
10
|
+
private _hoverBorderBounds;
|
|
11
|
+
private _hoverBorderHitKey;
|
|
12
|
+
private _fixedBorder;
|
|
13
|
+
private _fixedBorderBounds;
|
|
14
|
+
constructor(_getInstance: () => echarts.ECharts | null, _getContainer?: () => HTMLElement | null | undefined, _paletteOverride?: Partial<IChartElementEditOverlayPalette> | undefined);
|
|
15
|
+
ensure(): any;
|
|
16
|
+
remove(): void;
|
|
17
|
+
clearAll(): void;
|
|
18
|
+
clearHover(): void;
|
|
19
|
+
clearFixed(): void;
|
|
20
|
+
isFixed(bounds: IChartElementBounds | undefined): boolean;
|
|
21
|
+
containsHoverPoint(point: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}): boolean;
|
|
25
|
+
getHoverHitAt(point: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}): IChartElementHit | null;
|
|
29
|
+
setBorder(type: ChartElementEditBorderType, hit: IChartElementHit): void;
|
|
30
|
+
withHidden<T>(callback: () => T): T;
|
|
31
|
+
private _removeBorder;
|
|
32
|
+
private _createEditBorderElement;
|
|
33
|
+
private _createLineBorderElement;
|
|
34
|
+
private _createPolygonBorderElement;
|
|
35
|
+
private _createStrokeStyle;
|
|
36
|
+
private _resolvePalette;
|
|
37
|
+
private _refresh;
|
|
38
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ChartElementEditOverlay } from './chart-element-edit-overlay';
|
|
2
|
+
export { resolveChartElementEditOverlayPalette } from './palette';
|
|
3
|
+
export { createRectOverlay, getChartElementComponentInfo, getChartElementPropertyInChain, getChartElementTarget, getChartElementTargetSeriesIndex, isSeriesLabelTarget, resolveChartElementHitLayout, toChartElementFiniteNumber, } from './resolve-chart-element-hit-layout';
|
|
4
|
+
export type { ChartElementEditBorderType, IChartElementEditOverlayPalette, IChartElementHitLayout, IResolvedChartElementOverlay, } from './types';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IChartElementBounds, IChartElementHit } from '../../types';
|
|
2
|
+
import type { ECharts } from '../../utils/echarts';
|
|
3
|
+
import type { IChartElementHitLayout, IResolvedChartElementOverlay } from './types';
|
|
4
|
+
export declare function toChartElementFiniteNumber(value: unknown): number | undefined;
|
|
5
|
+
export declare function getChartElementTarget(params: any): any;
|
|
6
|
+
export declare function getChartElementComponentInfo(element: any): {
|
|
7
|
+
mainType?: string;
|
|
8
|
+
index?: number;
|
|
9
|
+
} | undefined;
|
|
10
|
+
export declare function getChartElementPropertyInChain(element: any, propertyName: string): unknown;
|
|
11
|
+
export declare function isSeriesLabelTarget(element: any): boolean;
|
|
12
|
+
export declare function getChartElementTargetSeriesIndex(instance: any, target: any): number | undefined;
|
|
13
|
+
export declare function getAxisComponentMainType(hit: IChartElementHit): 'xAxis' | 'yAxis' | undefined;
|
|
14
|
+
export declare function createRectOverlay(bounds: IChartElementBounds, padding?: number, shape?: Record<string, any>): IResolvedChartElementOverlay;
|
|
15
|
+
export declare function isSameBounds(left: IChartElementBounds | null | undefined, right: IChartElementBounds | undefined): boolean;
|
|
16
|
+
export declare function resolveChartElementHitLayout(hit: IChartElementHit, params: any, instance?: ECharts | null): IChartElementHitLayout;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IChartElementBounds, IChartElementOverlay } from '../../types';
|
|
2
|
+
export type ChartElementEditBorderType = 'hover' | 'fixed';
|
|
3
|
+
export interface IChartElementEditOverlayPalette {
|
|
4
|
+
hoverStroke: string;
|
|
5
|
+
fixedStroke: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IChartElementOverlaySourceStyle {
|
|
8
|
+
stroke?: string;
|
|
9
|
+
lineWidth?: number;
|
|
10
|
+
opacity?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface IResolvedChartElementOverlay extends IChartElementOverlay {
|
|
13
|
+
items?: IResolvedChartElementOverlay[];
|
|
14
|
+
sourceCtor?: new (options: any) => any;
|
|
15
|
+
sourceStyle?: IChartElementOverlaySourceStyle;
|
|
16
|
+
}
|
|
17
|
+
export interface IChartElementHitLayout {
|
|
18
|
+
bounds?: IChartElementBounds;
|
|
19
|
+
overlay?: IResolvedChartElementOverlay;
|
|
20
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ChartImageSource, ChartStyle, IChartHostBorderStyle, IChartHostRect, IChartHostStyle } from '../types';
|
|
2
|
+
export interface IResolveChartHostFrameStyleInput {
|
|
3
|
+
style?: ChartStyle | null;
|
|
4
|
+
getRenderColor?: (color: string) => string;
|
|
5
|
+
fallbackStroke?: string | null;
|
|
6
|
+
defaultStrokeWidth?: number;
|
|
7
|
+
defaultRadius?: number;
|
|
8
|
+
enableFallbackStroke?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Shared visual defaults for chart containers across Sheet, Doc, Slide, and Board.
|
|
12
|
+
* Consumers should still prefer a chart's explicit border color.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CHART_HOST_DEFAULT_BORDER_COLOR = "#D1D5DB";
|
|
15
|
+
export declare const CHART_HOST_DEFAULT_BORDER_RADIUS = 8;
|
|
16
|
+
export declare const CHART_HOST_DEFAULT_BORDER_WIDTH = 1;
|
|
17
|
+
export interface IResolveDefaultChartHostFrameStyleInput {
|
|
18
|
+
style?: ChartStyle | null;
|
|
19
|
+
getRenderColor?: (color: string) => string;
|
|
20
|
+
fallbackStroke?: string | null;
|
|
21
|
+
}
|
|
22
|
+
interface IChartHostContentRect extends IChartHostRect {
|
|
23
|
+
left: number;
|
|
24
|
+
top: number;
|
|
25
|
+
}
|
|
26
|
+
export declare function resolveChartHostFrameStyle(input: IResolveChartHostFrameStyleInput): IChartHostStyle;
|
|
27
|
+
/**
|
|
28
|
+
* Resolves the standard chart frame used when an author has not chosen a custom border.
|
|
29
|
+
* `getRenderColor` keeps the fallback frame in sync with the active light or dark theme.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveDefaultChartHostFrameStyle(input: IResolveDefaultChartHostFrameStyleInput): IChartHostStyle;
|
|
32
|
+
export declare function getChartHostFrameContentRect(outer: IChartHostRect, hostStyle: IChartHostStyle): IChartHostContentRect;
|
|
33
|
+
export declare function shouldComposeChartHostFrame(hostStyle: IChartHostStyle): boolean;
|
|
34
|
+
export declare function composeChartHostFrameImage(image: ChartImageSource, outer: IChartHostRect, hostStyle: IChartHostStyle): ChartImageSource;
|
|
35
|
+
/**
|
|
36
|
+
* Resolves the canonical border consumed by every chart host frame renderer.
|
|
37
|
+
* Missing or empty colors and non-positive or non-finite widths disable the border.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveChartHostFrameBorder(hostStyle: IChartHostStyle): Required<IChartHostBorderStyle> | undefined;
|
|
40
|
+
export {};
|