@univerjs-pro/sheets-chart-ui 1.0.0-alpha.7 → 1.0.0-beta.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/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/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/index.css +14 -377
- 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/commands/commands/focused-chart.command.d.ts +1 -1
- package/lib/types/commands/commands/sheet-chart-menu.command.d.ts +4 -1
- package/lib/types/commands/operations/open-chart-panel-operation.d.ts +1 -1
- package/lib/types/config/config.d.ts +4 -0
- package/lib/types/controllers/chart-element-float-menu.controller.d.ts +4 -3
- package/lib/types/controllers/chart-render.controller.d.ts +3 -1
- package/lib/types/controllers/ui.controller.d.ts +7 -6
- package/lib/types/index.d.ts +0 -2
- package/lib/types/locale/en-US.d.ts +55 -302
- package/lib/types/services/chart-element-selection.d.ts +6 -6
- package/lib/types/services/chart-render.service.d.ts +10 -10
- package/lib/types/services/sheet-chart-host.d.ts +2 -4
- package/lib/types/services/sheets-chart-host-provider.service.d.ts +2 -2
- package/lib/types/services/sheets-chart-ui.service.d.ts +25 -138
- package/lib/types/util.d.ts +7 -4
- package/lib/types/views/chart-edit-panel/chart-editor-default-values.d.ts +79 -0
- package/lib/types/views/chart-edit-panel/data-tab-panel/DataTabPanel.d.ts +4 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/StyleTabPanel.d.ts +4 -5
- package/lib/types/views/chart-menu/chart-menu-factory.d.ts +1 -2
- 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 +20 -20
- package/lib/types/hooks.d.ts +0 -3
- package/lib/types/services/chart-panel-route.d.ts +0 -20
- package/lib/types/views/chart-edit-panel/Options.d.ts +0 -165
- package/lib/types/views/chart-edit-panel/RadarChartOptionsEdit.d.ts +0 -3
- package/lib/types/views/chart-edit-panel/button-switch/ButtonSwitch.d.ts +0 -8
- package/lib/types/views/chart-edit-panel/button-switch/index.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/data-tab-panel/BubbleDataEdit.d.ts +0 -6
- package/lib/types/views/chart-edit-panel/data-tab-panel/index.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/index.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/AxisOptionsEdit.d.ts +0 -9
- package/lib/types/views/chart-edit-panel/style-tab-panel/ChartNumfmtDialog.d.ts +0 -6
- package/lib/types/views/chart-edit-panel/style-tab-panel/DataLabelOptions.d.ts +0 -25
- package/lib/types/views/chart-edit-panel/style-tab-panel/IndicatorLine.d.ts +0 -16
- package/lib/types/views/chart-edit-panel/style-tab-panel/ParetoLine.d.ts +0 -5
- package/lib/types/views/chart-edit-panel/style-tab-panel/PieChartStyleEdit.d.ts +0 -6
- package/lib/types/views/chart-edit-panel/style-tab-panel/RelationEdit.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/TrendLineEdit.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/WaterfallSeriesEdit.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/WordCloudShapeSelector.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/grid-line-and-tick-options/GridLineAndTickOptions.d.ts +0 -7
- package/lib/types/views/chart-edit-panel/style-tab-panel/grid-line-and-tick-options/index.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/index.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/CombinationChartTypeSelect.d.ts +0 -4
- package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/DataPointsEdit.d.ts +0 -11
- package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/RadarPoints.d.ts +0 -7
- package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/SeriesStyleEdit.d.ts +0 -7
- package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/Widgets.d.ts +0 -33
- package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/const.d.ts +0 -2
- package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/index.d.ts +0 -1
- package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/use-series-chart-type.d.ts +0 -3
|
@@ -1,156 +1,43 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { CategoryType, ChartTypeBits, DataOrientation } from '@univerjs-pro/engine-chart';
|
|
1
|
+
import type { IChartEditPanelRoute, IChartPanelRouteState, IChartSelectedElementState } from '@univerjs-pro/chart-ui';
|
|
2
|
+
import type { ChartModel } from '@univerjs-pro/engine-chart';
|
|
3
|
+
import type { IChartSourceMultiRangeItem, IChartUpdateConfigCommandParams, ISheetChartDataSource, ISheetChartSourceSingleRange } from '@univerjs-pro/sheets-chart';
|
|
4
|
+
import { ChartUIService, ChartViewStateRegistry } from '@univerjs-pro/chart-ui';
|
|
5
|
+
import { DataOrientation } from '@univerjs-pro/engine-chart';
|
|
7
6
|
import { ChartModelService, SheetsChartService } from '@univerjs-pro/sheets-chart';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
value: string;
|
|
14
|
-
}
|
|
15
|
-
export interface IChartConfigStateMap {
|
|
16
|
-
headers: IChartConfigState<IChartContext['headers']>;
|
|
17
|
-
orient: IChartConfigState<Nullable<DataOrientation>>;
|
|
18
|
-
aggregate: IChartConfigState<boolean>;
|
|
19
|
-
gradientFill: IChartConfigState<Nullable<boolean>>;
|
|
20
|
-
indicator: IChartConfigState<Nullable<ChartStyle['tooltip']>>;
|
|
21
|
-
chartType: IChartConfigState<ChartTypeBits>;
|
|
22
|
-
dataRange: IChartConfigState<Nullable<ISheetChartSourceSingleRange | IChartSourceMultiRangeItem[]>>;
|
|
23
|
-
/** Series & Category */
|
|
24
|
-
categoryIndex: IChartConfigState<Nullable<number>>;
|
|
25
|
-
categoryType: IChartConfigState<Nullable<CategoryType>>;
|
|
26
|
-
categoryList: IChartConfigState<IChartOptionType[]>;
|
|
27
|
-
bubbleCategoryList: IChartConfigState<IChartOptionType[]>;
|
|
28
|
-
seriesValues: IChartConfigState<number[]>;
|
|
29
|
-
trendlineValues: IChartConfigState<ITrendLine[] | undefined>;
|
|
30
|
-
seriesList: IChartConfigState<IChartOptionType[]>;
|
|
31
|
-
seriesResourceList: IChartConfigState<IChartOptionType[]>;
|
|
32
|
-
asCategory: IChartConfigState<boolean>;
|
|
33
|
-
backgroundColor: IChartConfigState<Nullable<string>>;
|
|
34
|
-
borderColor: IChartConfigState<Nullable<string>>;
|
|
35
|
-
fontSize: IChartConfigState<number | undefined, number>;
|
|
36
|
-
titleFontSize: IChartConfigState<number | undefined, number>;
|
|
37
|
-
titles: IChartConfigState<Nullable<DeepPartial<IChartStyle['titles']>>, DeepPartial<IChartStyle['titles']>>;
|
|
38
|
-
allSeriesStyle: IChartConfigState<Nullable<DeepPartial<IAllSeriesStyle>>, IAllSeriesStyle>;
|
|
39
|
-
seriesStyleMap: IChartConfigState<ChartStyle['seriesStyleMap']>;
|
|
40
|
-
legendStyle: IChartConfigState<Nullable<DeepPartial<ILegendStyle>>, Partial<ILegendStyle>>;
|
|
41
|
-
/** Axes */
|
|
42
|
-
xAxisOptions: IChartConfigState<Nullable<DeepPartial<IAxisOptions>>, Partial<IAxisOptions>>;
|
|
43
|
-
yAxisOptions: IChartConfigState<Nullable<DeepPartial<IAxisOptions>>, Partial<IAxisOptions>>;
|
|
44
|
-
rightYAxisOptions: IChartConfigState<Nullable<DeepPartial<RightYAxisOptions>>, Partial<RightYAxisOptions>>;
|
|
45
|
-
runtimeAxes: IChartConfigState<Nullable<IRuntimeAxis[]>>;
|
|
46
|
-
areaLineStyle: IChartConfigState<Nullable<AreaLineStyle>>;
|
|
47
|
-
pieLabelStyle: IChartConfigState<Nullable<DeepPartial<IPieLabelStyle>>>;
|
|
48
|
-
wordCloudShape: IChartConfigState<Nullable<WordCloudShapeEnum>> | undefined;
|
|
49
|
-
wordCloudMask: IChartConfigState<Nullable<string>> | undefined;
|
|
50
|
-
wordCloudRepeat: IChartConfigState<Nullable<boolean>> | undefined;
|
|
51
|
-
funnelGap: IChartConfigState<Nullable<number>>;
|
|
52
|
-
funnelUseAbsValue: IChartConfigState<Nullable<boolean>>;
|
|
53
|
-
padAngleStyle: IChartConfigState<Nullable<boolean>, boolean>;
|
|
54
|
-
isHalfPie: IChartConfigState<Nullable<boolean>, boolean>;
|
|
55
|
-
isRosePie: IChartConfigState<Nullable<boolean>, boolean>;
|
|
56
|
-
showLabelLine: IChartConfigState<Nullable<boolean>, boolean>;
|
|
57
|
-
doughnutHole: IChartConfigState<Nullable<number>, number>;
|
|
58
|
-
pieBorderColor: IChartConfigState<Nullable<string>, string>;
|
|
59
|
-
radarShape: IChartConfigState<Nullable<RadarShape>, RadarShape>;
|
|
60
|
-
radarFill: IChartConfigState<Nullable<boolean>, boolean>;
|
|
61
|
-
invalidValueType: IChartConfigState<Nullable<InvalidValueType>, InvalidValueType>;
|
|
62
|
-
dataPointsOptions: IChartConfigState<Nullable<IChartOptionType[]>>;
|
|
63
|
-
chartThemeColorType: IChartConfigState<Nullable<string>>;
|
|
64
|
-
titlePosition: IChartConfigState<Nullable<TitlePositionEnum>, TitlePositionEnum>;
|
|
65
|
-
bubbleSizeIndex: IChartConfigState<Nullable<number>, number | undefined>;
|
|
66
|
-
scatterXIndex: IChartConfigState<Nullable<number>, number>;
|
|
67
|
-
scatterYIndex: IChartConfigState<Nullable<number>, number>;
|
|
68
|
-
scatterLabelIndex: IChartConfigState<Nullable<number>, number>;
|
|
69
|
-
bubbleSeriesIndex: IChartConfigState<Nullable<number>, number>;
|
|
70
|
-
relationLayout: IChartConfigState<Nullable<RelationChartLayoutEnum>, RelationChartLayoutEnum>;
|
|
71
|
-
useValueAsSymbolSize: IChartConfigState<Nullable<boolean>, boolean>;
|
|
72
|
-
forceOption: IChartConfigState<Nullable<IRelationForceOptions>, IRelationForceOptions | undefined>;
|
|
73
|
-
rotateLabel: IChartConfigState<Nullable<boolean>, boolean>;
|
|
74
|
-
useEmphasis: IChartConfigState<Nullable<boolean>, boolean>;
|
|
75
|
-
relationNodeShape: IChartConfigState<Nullable<LinePointShape>, LinePointShape>;
|
|
76
|
-
useDateAxis: IChartConfigState<Nullable<boolean>, boolean>;
|
|
77
|
-
waterfallStack: IChartConfigState<Nullable<WaterfallStackTypeEnum>, WaterfallStackTypeEnum>;
|
|
78
|
-
useSubtotal: IChartConfigState<Nullable<boolean>, boolean>;
|
|
79
|
-
paretoStyle: IChartConfigState<Nullable<ChartStyle['pareto']>, ChartStyle['pareto']>;
|
|
80
|
-
paretoDataPointsOptions: IChartConfigState<Nullable<IChartOptionType[]>>;
|
|
81
|
-
visualMapType: IChartConfigState<Nullable<'continuous' | 'piecewise'>, 'continuous' | 'piecewise'>;
|
|
82
|
-
heatmapMax: IChartConfigState<Nullable<number>, number>;
|
|
83
|
-
heatmapMin: IChartConfigState<Nullable<number>, number>;
|
|
84
|
-
valueSuffix: IChartConfigState<Nullable<string>, string>;
|
|
85
|
-
valueScale: IChartConfigState<Nullable<number>, number>;
|
|
86
|
-
digitalFixed: IChartConfigState<Nullable<number>, number>;
|
|
87
|
-
}
|
|
88
|
-
export type ChartConfigStateKey = keyof IChartConfigStateMap;
|
|
89
|
-
export type ChartConfigStateValue = InferChartConfigStateValue<ChartConfigStateKey>;
|
|
90
|
-
export type InferChartConfigStateValue<T extends ChartConfigStateKey, M = IChartConfigStateMap[T]> = M extends IChartConfigState<infer V> ? V : never;
|
|
91
|
-
export type IChartConfigState<GetValue, SetValue = GetValue> = {
|
|
92
|
-
set?(value: SetValue): void;
|
|
93
|
-
get(): Observable<GetValue> | undefined;
|
|
94
|
-
} | Observable<GetValue>;
|
|
95
|
-
export interface ISheetsChartUIService {
|
|
96
|
-
readonly activeChartModel: Nullable<SheetChartModel>;
|
|
97
|
-
readonly activeChartModel$: Observable<Nullable<SheetChartModel>>;
|
|
98
|
-
readonly activeEditChart: string | null;
|
|
99
|
-
readonly activeEditChart$: Observable<string | null>;
|
|
100
|
-
readonly direction$: LocaleService['direction$'];
|
|
101
|
-
readonly panelRoute$: Observable<IChartPanelRouteState | null>;
|
|
102
|
-
readonly rangeSelectMode: boolean;
|
|
103
|
-
readonly selectedElement$: Observable<IChartSelectedElementState | null>;
|
|
104
|
-
setActiveEditChart(chartId: string | null): void;
|
|
105
|
-
setRangeSelectMode(on: boolean): void;
|
|
106
|
-
isElementEditModeActive(chartId: string): boolean;
|
|
107
|
-
setSelectedElement(state: IChartSelectedElementState | null): void;
|
|
108
|
-
setPanelRoute(chartId: string, route: IChartEditPanelRoute | null): void;
|
|
109
|
-
clearPanelRoute(): void;
|
|
110
|
-
getDataSource(id: string): ReturnType<SheetsChartService['getChartDataSource']>;
|
|
111
|
-
registerViewState<T extends ChartConfigStateKey = ChartConfigStateKey>(id: T, state: (chartModel: ChartModel) => IChartConfigStateMap[T]): void;
|
|
112
|
-
getViewState<V extends ChartConfigStateValue = ChartConfigStateValue>(id: ChartConfigStateKey, activeChartModel?: Nullable<SheetChartModel>): IChartConfigState<V> | undefined;
|
|
113
|
-
executeChartUpdateConfig(params: Omit<IChartUpdateConfigCommandParams, 'unitId'>): void;
|
|
114
|
-
executeChartUpdateSourceConfig(params: Omit<IChartUpdateSourceCommandParams, 'unitId'>): void;
|
|
115
|
-
removeViewState(id: ChartConfigStateKey): void;
|
|
116
|
-
setBorder(id: string, color: string): void;
|
|
117
|
-
t(...args: Parameters<LocaleService['t']>): string;
|
|
118
|
-
}
|
|
119
|
-
export declare const ISheetsChartUIService: import("@wendellhu/redi").IdentifierDecorator<ISheetsChartUIService>;
|
|
120
|
-
export declare class SheetsChartUIService extends Disposable implements ISheetsChartUIService {
|
|
7
|
+
import { ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
8
|
+
type SheetsChartUpdateConfigParams = Omit<IChartUpdateConfigCommandParams, 'unitId'>;
|
|
9
|
+
export type ISheetsChartUIService = SheetsChartUIService;
|
|
10
|
+
export declare const ISheetsChartUIService: import("@wendellhu/redi").IdentifierDecorator<SheetsChartUIService>;
|
|
11
|
+
export declare class SheetsChartUIService extends ChartUIService<ChartModel<ISheetChartDataSource>, SheetsChartUpdateConfigParams> {
|
|
121
12
|
private readonly _chartModelService;
|
|
122
13
|
private readonly _sheetsChartService;
|
|
123
14
|
private readonly _commandService;
|
|
124
15
|
private readonly _localeService;
|
|
125
|
-
private readonly
|
|
126
|
-
private _univerInstanceService;
|
|
127
|
-
private _viewState;
|
|
16
|
+
private readonly _univerInstanceService;
|
|
128
17
|
private _rangeSelectMode;
|
|
129
18
|
private readonly _activeEditChart$;
|
|
130
19
|
private readonly _selectedElement$;
|
|
131
20
|
private readonly _panelRoute$;
|
|
132
|
-
readonly activeEditChart$: Observable<string | null>;
|
|
133
|
-
readonly selectedElement$: Observable<IChartSelectedElementState | null>;
|
|
134
|
-
readonly panelRoute$: Observable<IChartPanelRouteState | null>;
|
|
135
|
-
constructor(_chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _commandService: ICommandService, _localeService: LocaleService,
|
|
136
|
-
get
|
|
137
|
-
get activeChartModel
|
|
138
|
-
get
|
|
21
|
+
readonly activeEditChart$: import("rxjs").Observable<string | null>;
|
|
22
|
+
readonly selectedElement$: import("rxjs").Observable<IChartSelectedElementState | null>;
|
|
23
|
+
readonly panelRoute$: import("rxjs").Observable<IChartPanelRouteState | null>;
|
|
24
|
+
constructor(_chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _commandService: ICommandService, _localeService: LocaleService, _univerInstanceService: IUniverInstanceService, viewStates: ChartViewStateRegistry);
|
|
25
|
+
get activeRuntimeModel(): ChartModel<ISheetChartDataSource> | null;
|
|
26
|
+
get activeChartModel(): import("@univerjs/core").Nullable<ChartModel<ISheetChartDataSource>>;
|
|
27
|
+
get activeChartModel$(): import("rxjs").Observable<import("@univerjs/core").Nullable<ChartModel<ISheetChartDataSource>>>;
|
|
139
28
|
get activeEditChart(): string | null;
|
|
140
|
-
get direction$(): Observable<"ltr" | "rtl">;
|
|
29
|
+
get direction$(): import("rxjs").Observable<"ltr" | "rtl">;
|
|
30
|
+
get rangeSelectMode(): boolean;
|
|
141
31
|
setRangeSelectMode(on: boolean): void;
|
|
142
32
|
setActiveEditChart(chartId: string | null): void;
|
|
143
33
|
isElementEditModeActive(chartId: string): boolean;
|
|
144
34
|
setSelectedElement(state: IChartSelectedElementState | null): void;
|
|
145
35
|
setPanelRoute(chartId: string, route: IChartEditPanelRoute | null): void;
|
|
146
36
|
clearPanelRoute(): void;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
executeChartUpdateSourceConfig(params: Omit<IChartUpdateSourceCommandParams, 'unitId'>): void;
|
|
152
|
-
removeViewState(id: ChartConfigStateKey): void;
|
|
153
|
-
setBorder(id: string, color: string): void;
|
|
154
|
-
t(...args: Parameters<LocaleService['t']>): string;
|
|
37
|
+
setDataRange(range: ISheetChartSourceSingleRange | IChartSourceMultiRangeItem[]): void;
|
|
38
|
+
setOrientation(orientation: DataOrientation): void;
|
|
39
|
+
executeChartUpdateConfig(params: SheetsChartUpdateConfigParams): void;
|
|
40
|
+
private _executeChartUpdateSourceConfig;
|
|
155
41
|
dispose(): void;
|
|
156
42
|
}
|
|
43
|
+
export {};
|
package/lib/types/util.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import type { ChartTypeBits, PieSecondaryPlotType } from '@univerjs-pro/engine-chart';
|
|
1
2
|
import type { IChartSourceMultiRangeItem, ISheetChartSourceSingleRange } from '@univerjs-pro/sheets-chart';
|
|
2
3
|
import type { IUniverInstanceService, Nullable } from '@univerjs/core';
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
4
|
+
import type { IValueOption } from '@univerjs/ui';
|
|
5
|
+
import { CHART_TYPE_CATALOG } from '@univerjs-pro/chart-ui';
|
|
5
6
|
export declare function serializeChartDataRange(rangeInfo: Nullable<ISheetChartSourceSingleRange | IChartSourceMultiRangeItem[]>, univerInstanceService: IUniverInstanceService): string;
|
|
6
7
|
export interface IChartTypeOption {
|
|
7
|
-
|
|
8
|
+
id?: string;
|
|
9
|
+
labelId: Exclude<typeof CHART_TYPE_CATALOG[number]['labelId'], 'columnStacked' | 'columnPercentStacked'>;
|
|
10
|
+
pieSecondaryPlotType?: PieSecondaryPlotType;
|
|
8
11
|
value: ChartTypeBits;
|
|
9
12
|
icon: string;
|
|
10
13
|
}
|
|
11
14
|
export declare const chartTypeOptions: IChartTypeOption[];
|
|
12
|
-
export declare function getChartMenuSelection(
|
|
15
|
+
export declare function getChartMenuSelection(options?: readonly IChartTypeOption[]): Array<IValueOption<string>>;
|
|
13
16
|
export declare const getOptionsList: (optionsList: IChartTypeOption[], allowTypes: ChartTypeBits[] | [string]) => IChartTypeOption[];
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export declare const SHEET_CHART_EDITOR_DEFAULT_VALUES: {
|
|
2
|
+
readonly axis: {
|
|
3
|
+
readonly primaryGridLineVisible: false;
|
|
4
|
+
readonly secondaryGridLineVisible: true;
|
|
5
|
+
readonly color: string;
|
|
6
|
+
readonly dateAxisRotation: number;
|
|
7
|
+
readonly gridlineWidth: number;
|
|
8
|
+
readonly labelFontSize: number;
|
|
9
|
+
readonly labelRotation: number;
|
|
10
|
+
readonly labelVisible: boolean;
|
|
11
|
+
readonly reverse: boolean;
|
|
12
|
+
readonly tickLength: string;
|
|
13
|
+
readonly tickPosition: import("@univerjs-pro/engine-chart").ChartAxisTickPosition;
|
|
14
|
+
readonly tickVisible: boolean;
|
|
15
|
+
readonly tickWidth: string;
|
|
16
|
+
};
|
|
17
|
+
readonly funnel: import("@univerjs-pro/chart-ui").IChartFunnelDefaultValues;
|
|
18
|
+
readonly heatmap: import("@univerjs-pro/chart-ui").IChartHeatmapDefaultValues;
|
|
19
|
+
readonly indicatorLine: import("@univerjs-pro/chart-ui").IChartIndicatorLineDefaultValues;
|
|
20
|
+
readonly legend: import("@univerjs-pro/chart-ui").IChartLegendDefaultValues;
|
|
21
|
+
readonly lineAndArea: import("@univerjs-pro/chart-ui").IChartLineAndAreaDefaultValues;
|
|
22
|
+
readonly pareto: import("@univerjs-pro/chart-ui").IChartParetoDefaultValues;
|
|
23
|
+
readonly pie: {
|
|
24
|
+
readonly doughnutHole: 0.5;
|
|
25
|
+
readonly pieHole: 0;
|
|
26
|
+
readonly borderColor: string;
|
|
27
|
+
readonly hasPaddingAngle: boolean;
|
|
28
|
+
readonly isHalfPie: boolean;
|
|
29
|
+
readonly labelContentType: import("@univerjs-pro/engine-chart").LabelContentType;
|
|
30
|
+
readonly labelPosition: import("@univerjs-pro/engine-chart").PieLabelPosition;
|
|
31
|
+
readonly labelVisible: boolean;
|
|
32
|
+
readonly rosePie: boolean;
|
|
33
|
+
readonly showLabelLine: boolean;
|
|
34
|
+
readonly textColor: string;
|
|
35
|
+
readonly valueScale: number;
|
|
36
|
+
};
|
|
37
|
+
readonly relation: {
|
|
38
|
+
readonly useValueAsSymbolSize: true;
|
|
39
|
+
readonly circularLabelRotation: boolean;
|
|
40
|
+
readonly emphasisEnabled: boolean;
|
|
41
|
+
readonly force: {
|
|
42
|
+
gravity: number;
|
|
43
|
+
repulsion: number;
|
|
44
|
+
};
|
|
45
|
+
readonly layout: import("@univerjs-pro/engine-chart").RelationChartLayoutEnum;
|
|
46
|
+
readonly nodeShape: import("@univerjs-pro/engine-chart").LinePointShape;
|
|
47
|
+
};
|
|
48
|
+
readonly radar: import("@univerjs-pro/chart-ui").IChartRadarDefaultValues;
|
|
49
|
+
readonly series: {
|
|
50
|
+
readonly radarFillOpacity: 0.2;
|
|
51
|
+
readonly rightAxis: {
|
|
52
|
+
readonly ltr: false;
|
|
53
|
+
readonly rtl: boolean;
|
|
54
|
+
};
|
|
55
|
+
readonly borderDashType: import("@univerjs-pro/engine-chart").ChartBorderDashType;
|
|
56
|
+
readonly borderOpacity: number;
|
|
57
|
+
readonly borderWidth: number;
|
|
58
|
+
readonly color: string;
|
|
59
|
+
readonly labelContentType: import("@univerjs-pro/engine-chart").LabelContentType;
|
|
60
|
+
readonly labelFontSize: number;
|
|
61
|
+
readonly labelPosition: import("@univerjs-pro/engine-chart").SeriesLabelPosition;
|
|
62
|
+
readonly labelVisible: boolean;
|
|
63
|
+
readonly lineOrAreaBorderWidth: number;
|
|
64
|
+
readonly pointShape: import("@univerjs-pro/engine-chart").LinePointShape;
|
|
65
|
+
readonly pointSize: number;
|
|
66
|
+
readonly radarBorderWidth: number;
|
|
67
|
+
readonly scatterPointSize: number;
|
|
68
|
+
readonly seriesFillOpacity: number;
|
|
69
|
+
};
|
|
70
|
+
readonly style: import("@univerjs-pro/chart-ui").IChartStyleDefaultValues;
|
|
71
|
+
readonly titles: import("@univerjs-pro/chart-ui").IChartTitleDefaultValues;
|
|
72
|
+
readonly trendline: import("@univerjs-pro/chart-ui").IChartTrendlineDefaultValues;
|
|
73
|
+
readonly waterfall: {
|
|
74
|
+
readonly useSubtotal: true;
|
|
75
|
+
readonly stackType: import("@univerjs-pro/engine-chart").WaterfallStackTypeEnum;
|
|
76
|
+
};
|
|
77
|
+
readonly waterfallStyle: import("@univerjs-pro/chart-ui").IChartWaterfallStyleDefaultValues;
|
|
78
|
+
readonly wordCloud: import("@univerjs-pro/chart-ui").IChartWordCloudDefaultValues;
|
|
79
|
+
};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SHEET_CHART_EDITOR_DEFAULT_VALUES } from '../chart-editor-default-values';
|
|
2
|
+
export declare const DataTabPanel: (props: {
|
|
3
|
+
defaultValues: typeof SHEET_CHART_EDITOR_DEFAULT_VALUES;
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare const StyleTabPanel: () => import("react").JSX.Element;
|
|
1
|
+
import type { SHEET_CHART_EDITOR_DEFAULT_VALUES } from '../chart-editor-default-values';
|
|
2
|
+
export declare const StyleTabPanel: (props: {
|
|
3
|
+
defaultValues: typeof SHEET_CHART_EDITOR_DEFAULT_VALUES;
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { IAccessor } from '@univerjs/core';
|
|
2
2
|
import type { IMenuSelectorItem } from '@univerjs/ui';
|
|
3
|
-
|
|
4
|
-
export declare function ChartMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
|
|
3
|
+
export declare function ChartMenuItemFactory(accessor: IAccessor): IMenuSelectorItem;
|