@univerjs-pro/sheets-chart 0.5.0-alpha.0 → 0.5.0-beta.1

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.
Files changed (62) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/en-US.js +1 -1
  3. package/lib/cjs/locale/ru-RU.js +1 -1
  4. package/lib/cjs/locale/vi-VN.js +1 -1
  5. package/lib/cjs/locale/zh-CN.js +1 -1
  6. package/lib/cjs/locale/zh-TW.js +1 -1
  7. package/lib/es/index.js +1 -1
  8. package/lib/es/locale/en-US.js +1 -1
  9. package/lib/es/locale/ru-RU.js +1 -1
  10. package/lib/es/locale/vi-VN.js +1 -1
  11. package/lib/es/locale/zh-CN.js +1 -1
  12. package/lib/es/locale/zh-TW.js +1 -1
  13. package/lib/types/chart-source/chart-source.d.ts +59 -0
  14. package/lib/types/chart-source/source-util.d.ts +30 -0
  15. package/lib/types/commands/commands/sheets-chart-update-config.command.d.ts +14 -0
  16. package/lib/types/commands/commands/sheets-chart-update-source.command.d.ts +8 -0
  17. package/lib/types/commands/mutations/sheet-chart-update-source.mutation.d.ts +8 -0
  18. package/lib/types/commands/mutations/sheets-chart-update-config.mutation.d.ts +13 -0
  19. package/lib/types/commands/mutations/sheets-chart.mutation.d.ts +11 -0
  20. package/lib/types/common/util.d.ts +15 -0
  21. package/lib/types/index.d.ts +37 -814
  22. package/lib/types/locale/en-US.d.ts +3 -0
  23. package/lib/types/locale/ru-RU.d.ts +3 -0
  24. package/lib/types/locale/vi-VN.d.ts +3 -0
  25. package/lib/types/locale/zh-CN.d.ts +22 -0
  26. package/lib/types/locale/zh-TW.d.ts +3 -0
  27. package/lib/types/models/chart-data-operators/build-chart-data.d.ts +3 -0
  28. package/lib/types/models/chart-data-operators/index.d.ts +17 -0
  29. package/lib/types/models/chart-data-operators/operators.d.ts +24 -0
  30. package/lib/types/models/constants/build-in-theme/default.d.ts +2 -0
  31. package/lib/types/models/constants/build-in-theme/index.d.ts +15 -0
  32. package/lib/types/models/constants/build-in-theme/types.d.ts +77 -0
  33. package/lib/types/models/constants/build-in-theme/univer-gradient1.d.ts +2 -0
  34. package/lib/types/models/constants/build-in-theme/univer-gradient2.d.ts +2 -0
  35. package/lib/types/models/constants/build-in-theme/univer-gradient3.d.ts +2 -0
  36. package/lib/types/models/constants/build-in-theme/univer-gradient4.d.ts +2 -0
  37. package/lib/types/models/constants/build-in-theme/univer-gradient5.d.ts +2 -0
  38. package/lib/types/models/constants/build-in-theme/univer-gradient6.d.ts +2 -0
  39. package/lib/types/models/constants/build-in-theme/univer1.d.ts +2 -0
  40. package/lib/types/models/constants/build-in-theme/univer2.d.ts +2 -0
  41. package/lib/types/models/constants/build-in-theme/univer3.d.ts +2 -0
  42. package/lib/types/models/constants/build-in-theme/univer4.d.ts +2 -0
  43. package/lib/types/models/constants/build-in-theme/univer5.d.ts +2 -0
  44. package/lib/types/models/constants/build-in-theme/univer6.d.ts +2 -0
  45. package/lib/types/models/constants/default-chart-style.d.ts +63 -0
  46. package/lib/types/models/constants.d.ts +59 -0
  47. package/lib/types/models/data-context-transformers/bar-data-context-transformer.d.ts +3 -0
  48. package/lib/types/models/data-context-transformers/pie-data-context-transformer.d.ts +3 -0
  49. package/lib/types/models/runtime-context.types.d.ts +28 -0
  50. package/lib/types/models/style.types.d.ts +213 -0
  51. package/lib/types/models/types.d.ts +124 -0
  52. package/lib/types/plugins/univer-sheets-chart-plugin.d.ts +15 -0
  53. package/lib/types/services/chart-model.service.d.ts +23 -0
  54. package/lib/types/services/chart-theme.service.d.ts +17 -0
  55. package/lib/types/services/sheets-chart.service.d.ts +45 -0
  56. package/lib/umd/index.js +1 -1
  57. package/lib/umd/locale/en-US.js +1 -1
  58. package/lib/umd/locale/ru-RU.js +1 -1
  59. package/lib/umd/locale/vi-VN.js +1 -1
  60. package/lib/umd/locale/zh-CN.js +1 -1
  61. package/lib/umd/locale/zh-TW.js +1 -1
  62. package/package.json +10 -15
@@ -0,0 +1,3 @@
1
+ import { default as zhCN } from './zh-CN';
2
+ declare const locale: typeof zhCN;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import { default as zhCN } from './zh-CN';
2
+ declare const locale: typeof zhCN;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import { default as zhCN } from './zh-CN';
2
+ declare const locale: typeof zhCN;
3
+ export default locale;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ declare const locale: {
17
+ chart: {
18
+ category: string;
19
+ series: string;
20
+ };
21
+ };
22
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import { default as zhCN } from './zh-CN';
2
+ declare const locale: typeof zhCN;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import { LocaleService } from '@univerjs/core';
2
+ import { IChartContext, IChartData, IUniverDataSet } from '../types';
3
+ export declare function buildChartData(dataSource: IUniverDataSet, chartContext: IChartContext, isRowDirection: boolean, localeService: LocaleService): IChartData;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './build-chart-data';
17
+ export * from './operators';
@@ -0,0 +1,24 @@
1
+ import { ChartDataSourceValue, ChartDataSourceValues, IChartContext, IChartDataAggregation, IChartDataSource, OptionDataValue } from '../types';
2
+ export type IChartContextOperator = (dataSource: IChartDataSource, context: IChartContext) => IChartContext;
3
+ export type IChartDataAggregateOperator = (dataSource: ChartDataSourceValues, context: IChartContext, dataAggregation: IChartDataAggregation) => ChartDataSourceValues | void;
4
+ type Nil = null | undefined;
5
+ export declare function isNil(value: any): value is Nil;
6
+ export declare function countTypesFromArray(arrayData: OptionDataValue[]): {
7
+ numbers: number;
8
+ strings: number;
9
+ };
10
+ export declare function toString(value: ChartDataSourceValue): string;
11
+ export declare function toNumber(value: ChartDataSourceValue): number;
12
+ export declare function toColumnOrient<T = any>(dataSource: T[][]): T[][];
13
+ export declare function findCategoryIndexes(dataSource: IChartDataSource): number[];
14
+ export declare function groupBy<T = any>(ary: T[], selector: (item: T, index: number) => string): {
15
+ name: string;
16
+ values: T[];
17
+ }[];
18
+ export declare function sumArray(ary: ChartDataSourceValue[]): number;
19
+ export declare const findHeaderOperator: IChartContextOperator;
20
+ export declare const findCategoryOperator: IChartContextOperator;
21
+ export declare const findSeriesOperator: IChartContextOperator;
22
+ export declare const aggregateOperator: IChartDataAggregateOperator;
23
+ export declare const topNOperator: IChartDataAggregateOperator;
24
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const themeDefault: IEchartTheme;
@@ -0,0 +1,15 @@
1
+ export { themeDefault } from './default';
2
+ export { getThemeAxesByType, getThemeProps } from './theme-util';
3
+ export type { IEchartTheme } from './types';
4
+ export { univerGradient1 as UniverThemeGradient1 } from './univer-gradient1';
5
+ export { univerGradient2 as UniverThemeGradient2 } from './univer-gradient2';
6
+ export { univerGradient3 as UniverThemeGradient3 } from './univer-gradient3';
7
+ export { univerGradient4 as UniverThemeGradient4 } from './univer-gradient4';
8
+ export { univerGradient5 as UniverThemeGradient5 } from './univer-gradient5';
9
+ export { univerGradient6 as UniverThemeGradient6 } from './univer-gradient6';
10
+ export { univer1 as UniverTheme1 } from './univer1';
11
+ export { univer2 as UniverTheme2 } from './univer2';
12
+ export { univer3 as UniverTheme3 } from './univer3';
13
+ export { univer4 as UniverTheme4 } from './univer4';
14
+ export { univer5 as UniverTheme5 } from './univer5';
15
+ export { univer6 as UniverTheme6 } from './univer6';
@@ -0,0 +1,77 @@
1
+ interface IEchartThemeAxisConfig {
2
+ type: string;
3
+ name: string;
4
+ axisLineShow: boolean;
5
+ axisLineColor: string;
6
+ axisTickShow: boolean;
7
+ axisTickColor: string;
8
+ axisLabelShow: boolean;
9
+ axisLabelColor: string;
10
+ splitLineShow: boolean;
11
+ splitLineColor: string[];
12
+ splitAreaShow: boolean;
13
+ splitAreaColor: string[];
14
+ }
15
+ interface IEchartThemeContent {
16
+ seriesCnt: string;
17
+ backgroundColor: string;
18
+ titleColor: string;
19
+ subtitleColor: string;
20
+ textColorShow: boolean;
21
+ textColor: string;
22
+ markTextColor: string;
23
+ color: string[];
24
+ borderColor: string;
25
+ borderWidth: string | number;
26
+ visualMapColor: string[];
27
+ legendTextColor: string;
28
+ kColor: string;
29
+ kColor0: string;
30
+ kBorderColor: string;
31
+ kBorderColor0: string;
32
+ kBorderWidth: string | number;
33
+ lineWidth: string | number;
34
+ symbolSize: string | number;
35
+ symbol: string;
36
+ symbolBorderWidth: string | number;
37
+ lineSmooth: boolean;
38
+ graphLineWidth: string | number;
39
+ graphLineColor: string;
40
+ mapLabelColor: string;
41
+ mapLabelColorE: string;
42
+ mapBorderColor: string;
43
+ mapBorderColorE: string;
44
+ mapBorderWidth: string | number;
45
+ mapBorderWidthE: string | number;
46
+ mapAreaColor: string;
47
+ mapAreaColorE: string;
48
+ axes: IEchartThemeAxisConfig[];
49
+ axisSeperateSetting: boolean;
50
+ toolboxColor: string;
51
+ toolboxEmphasisColor: string;
52
+ tooltipAxisColor: string;
53
+ tooltipAxisWidth: string | number;
54
+ timelineLineColor: string;
55
+ timelineLineWidth: string | number;
56
+ timelineItemColor: string;
57
+ timelineItemColorE: string;
58
+ timelineCheckColor: string;
59
+ timelineCheckBorderColor: string;
60
+ timelineItemBorderWidth: string | number;
61
+ timelineControlColor: string;
62
+ timelineControlBorderColor: string;
63
+ timelineControlBorderWidth: string | number;
64
+ timelineLabelColor: string;
65
+ datazoomBackgroundColor: string;
66
+ datazoomDataColor: string;
67
+ datazoomFillColor: string;
68
+ datazoomHandleColor: string;
69
+ datazoomHandleWidth: string;
70
+ datazoomLabelColor: string;
71
+ }
72
+ export interface IEchartTheme {
73
+ version: number | string;
74
+ themeName: string;
75
+ theme: IEchartThemeContent;
76
+ }
77
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univerGradient1: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univerGradient2: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univerGradient3: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univerGradient4: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univerGradient5: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univerGradient6: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univer1: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univer2: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univer3: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univer4: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univer5: IEchartTheme;
@@ -0,0 +1,2 @@
1
+ import { IEchartTheme } from './types';
2
+ export declare const univer6: IEchartTheme;
@@ -0,0 +1,63 @@
1
+ import { ChartTypeBits } from '../constants';
2
+ import { AreaLineStyle, AxisAlignEnum, ChartBorderDashType, InvalidValueType, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, SeriesLabelPosition, TextAlign, TitlePositionEnum } from '../style.types';
3
+ export declare const themeColors: string[];
4
+ export declare const defaultChartConfig: {
5
+ allSeriesId: string;
6
+ invalidValueType: InvalidValueType;
7
+ point: {
8
+ shape: LinePointShape;
9
+ size: number;
10
+ };
11
+ backgroundColor: string;
12
+ axis: {
13
+ labelVisible: boolean;
14
+ reverse: boolean;
15
+ titleAlign: AxisAlignEnum;
16
+ };
17
+ legend: {
18
+ position: LegendPositionEnum;
19
+ };
20
+ borderStyle: {
21
+ opacity: number;
22
+ width: number;
23
+ specialChartWidthMap: {
24
+ 2: number;
25
+ 16: number;
26
+ 32: number;
27
+ };
28
+ dashType: ChartBorderDashType;
29
+ };
30
+ textStyle: {
31
+ fontSize: number;
32
+ subTitleFontSize: number;
33
+ titleFontSize: number;
34
+ color: string;
35
+ align: string;
36
+ position: SeriesLabelPosition;
37
+ bold: boolean;
38
+ family: string;
39
+ italic: boolean;
40
+ };
41
+ titlePosition: TitlePositionEnum;
42
+ titlePositionAlign: TextAlign;
43
+ titleFontSize: number;
44
+ area: {
45
+ lineStyle: AreaLineStyle;
46
+ };
47
+ labelContentType: LabelContentType;
48
+ pie: {
49
+ labelContentType: number;
50
+ radius: number;
51
+ doughnutHole: number;
52
+ borderColor: string;
53
+ labelPosition: PieLabelPosition;
54
+ hasPaddingAngle: boolean;
55
+ };
56
+ combination: {
57
+ firstChartType: ChartTypeBits;
58
+ otherChartType: ChartTypeBits;
59
+ };
60
+ radar: {
61
+ shape: RadarShape;
62
+ };
63
+ };
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare enum ChartAttributeBits {
17
+ Stack = 1073741824,
18
+ PercentStack = 1610612736,
19
+ Horizontal = 268435456
20
+ }
21
+ export declare enum ChartTypeBits {
22
+ None = 0,
23
+ /** Line chart */
24
+ Line = 2,
25
+ /** Bar chart */
26
+ Column = 4,
27
+ ColumnStacked = 1073741828,
28
+ ColumnPercentStacked = 1610612740,
29
+ Bar = 268435460,
30
+ BarStacked = 1342177284,
31
+ BarPercentStacked = 1879048196,
32
+ /** Pie chart */
33
+ Pie = 8,
34
+ Doughnut = 264,
35
+ /** Area chart */
36
+ Area = 16,
37
+ AreaStacked = 1073741840,
38
+ AreaPercentStacked = 1610612752,
39
+ /** Radar chart */
40
+ Radar = 32,
41
+ /** Scatter chart */
42
+ Scatter = 64,
43
+ /** Combination chart */
44
+ Combination = 128
45
+ }
46
+ export declare const chartBitsUtils: {
47
+ has(bit: number, attribute: number): boolean;
48
+ baseOn(bit: number, base: number): boolean;
49
+ remove(bit: number, attribute: number): number;
50
+ chartBitToString(bit: ChartTypeBits): "" | "line" | "pie" | "bar" | "radar" | "scatter" | "combination";
51
+ };
52
+ export declare enum DataOrientation {
53
+ Row = "Row",
54
+ Column = "Column"
55
+ }
56
+ export declare enum CategoryType {
57
+ Linear = "Linear",
58
+ Text = "Text"
59
+ }
@@ -0,0 +1,3 @@
1
+ import { ChartModel } from '../chart-model';
2
+ import { ChartTypeBits } from '../constants';
3
+ export declare const barDataContextTransformer: (fromType: ChartTypeBits, toType: ChartTypeBits, model: ChartModel) => void;
@@ -0,0 +1,3 @@
1
+ import { ChartModel } from '../chart-model';
2
+ import { ChartTypeBits } from '../constants';
3
+ export declare const pieDataContextTransformer: (fromType: ChartTypeBits, toType: ChartTypeBits, model: ChartModel) => void;
@@ -0,0 +1,28 @@
1
+ import { LocaleService } from '@univerjs/core';
2
+ import { IEchartTheme } from './constants/build-in-theme';
3
+ export declare enum AxisValueType {
4
+ Text = 1,
5
+ Numeric = 2
6
+ }
7
+ export declare enum IRuntimeAxisPosition {
8
+ Left = "left",
9
+ Right = "right",
10
+ Bottom = "bottom"
11
+ }
12
+ export declare enum IRuntimeAxisPriority {
13
+ Primary = 1,
14
+ Secondary = 2,
15
+ Tertiary = 3
16
+ }
17
+ export interface IRuntimeAxis {
18
+ priority: IRuntimeAxisPriority;
19
+ position: IRuntimeAxisPosition;
20
+ type: AxisValueType;
21
+ }
22
+ export interface IChartRuntimeContext {
23
+ themeColors?: string[];
24
+ axes: IRuntimeAxis[];
25
+ themeInfo: IEchartTheme;
26
+ hasSecondaryAxis: boolean;
27
+ localeService: LocaleService;
28
+ }
@@ -0,0 +1,213 @@
1
+ import { Nullable } from '@univerjs/core';
2
+ import { ChartTypeBits } from './constants';
3
+ import { IChartRuntimeContext } from './runtime-context.types';
4
+ export type DeepPartial<T> = T extends Record<string, any> ? T extends any[] ? T : {
5
+ [key in keyof T]+?: DeepPartial<T[key]>;
6
+ } : T;
7
+ export declare enum SeriesLabelPosition {
8
+ Auto = "auto",
9
+ Top = "top",
10
+ Bottom = "bottom",
11
+ Left = "left",
12
+ Inside = "inside",
13
+ Outside = "outside"
14
+ }
15
+ export declare enum PieLabelPosition {
16
+ Inside = "inside",
17
+ Outside = "outside"
18
+ }
19
+ export declare enum RadarShape {
20
+ Polygon = "polygon",
21
+ Circle = "circle"
22
+ }
23
+ export declare enum LabelContentType {
24
+ Empty = 0,
25
+ CategoryName = 2,
26
+ SeriesName = 4,
27
+ Value = 8,
28
+ Percentage = 16
29
+ }
30
+ export declare enum LabelAlignEnum {
31
+ Left = "left",
32
+ Right = "right",
33
+ Center = "center"
34
+ }
35
+ export interface ILabelStyle {
36
+ visible: boolean;
37
+ content: string;
38
+ fontSize: number;
39
+ color: string;
40
+ align: LabelAlignEnum;
41
+ bold: boolean;
42
+ family: string;
43
+ strikethrough: boolean;
44
+ italic: boolean;
45
+ underline: boolean;
46
+ padAngle: boolean;
47
+ axisTitleAlign?: AxisAlignEnum | undefined;
48
+ showMaxLabel?: boolean;
49
+ showMinLabel?: boolean;
50
+ }
51
+ export interface ISeriesLabelStyle extends ILabelStyle {
52
+ contentType: number;
53
+ position: SeriesLabelPosition;
54
+ }
55
+ export interface IPieLabelStyle extends Omit<ILabelStyle, 'align' | 'content'> {
56
+ contentType: number;
57
+ position: PieLabelPosition;
58
+ }
59
+ export declare enum LinePointShape {
60
+ Circle = "circle",
61
+ Square = "square",
62
+ Triangle = "triangle",
63
+ Diamond = "diamond"
64
+ }
65
+ export interface IPointStyle {
66
+ shape: LinePointShape;
67
+ size: number;
68
+ color: Nullable<string>;
69
+ }
70
+ export interface IDataPointStyle extends IPointStyle {
71
+ }
72
+ export declare enum ChartBorderDashType {
73
+ Solid = "solid",
74
+ Dashed = "dashed",
75
+ Dotted = "dotted"
76
+ }
77
+ export declare enum ChartCartesianAxisPosition {
78
+ Left = "left",
79
+ Right = "right"
80
+ }
81
+ export interface ISeriesStyle {
82
+ chartType?: ChartTypeBits.Line | ChartTypeBits.Column | ChartTypeBits.Area;
83
+ rightYAxis?: boolean;
84
+ color: Nullable<string>;
85
+ fillOpacity: number;
86
+ border: {
87
+ opacity: number;
88
+ color: Nullable<string>;
89
+ width: number;
90
+ dashType: ChartBorderDashType;
91
+ };
92
+ label: ISeriesLabelStyle;
93
+ point: IPointStyle;
94
+ dataPoints: {
95
+ [index: number]: IDataPointStyle;
96
+ };
97
+ }
98
+ export interface IAllSeriesStyle extends Pick<ISeriesStyle, 'border' | 'label' | 'rightYAxis' | 'point' | 'color'> {
99
+ }
100
+ export declare enum StackType {
101
+ Stacked = "0",
102
+ Percent = "1"
103
+ }
104
+ export declare enum TextVerticalAlign {
105
+ Top = "top",
106
+ Middle = "middle",
107
+ Bottom = "bottom"
108
+ }
109
+ export declare enum TextAlign {
110
+ Left = "left",
111
+ Center = "center",
112
+ Right = "right"
113
+ }
114
+ export declare enum LegendPositionEnum {
115
+ Top = "top",
116
+ Left = "left",
117
+ Right = "right",
118
+ Bottom = "bottom",
119
+ Hide = "hide"
120
+ }
121
+ export declare enum TitlePositionEnum {
122
+ Top = "top",
123
+ Left = "left",
124
+ Right = "right",
125
+ Bottom = "bottom",
126
+ Hide = "hide"
127
+ }
128
+ export declare enum AxisAlignEnum {
129
+ Start = "start",
130
+ Center = "center",
131
+ End = "end"
132
+ }
133
+ export interface ILegendStyle {
134
+ position?: LegendPositionEnum;
135
+ label?: Omit<ILabelStyle, 'visible' | 'align' | 'content'>;
136
+ }
137
+ export interface IGridLineStyle {
138
+ visible: boolean;
139
+ color: string;
140
+ width: number;
141
+ }
142
+ export interface IAxisOptions {
143
+ lineVisible: boolean;
144
+ label: Omit<ILabelStyle, 'align' | 'content'>;
145
+ gridLine: IGridLineStyle;
146
+ tick: {
147
+ visible: boolean;
148
+ lineWidth: number;
149
+ lineColor: string;
150
+ length: number;
151
+ position: PieLabelPosition;
152
+ };
153
+ reverse?: boolean;
154
+ min?: number | null;
155
+ max?: number | null;
156
+ }
157
+ export type RightYAxisOptions = Omit<IAxisOptions, 'reverse'>;
158
+ export declare enum AreaLineStyle {
159
+ Line = "line",
160
+ Smooth = "smooth",
161
+ Step = "step"
162
+ }
163
+ export declare enum InvalidValueType {
164
+ Zero = "zero",
165
+ Break = "break",
166
+ Link = "link"
167
+ }
168
+ export interface IChartStyle {
169
+ runtime: IChartRuntimeContext;
170
+ width: number;
171
+ height: number;
172
+ theme: string;
173
+ invalidValueType: InvalidValueType;
174
+ gradientFill: boolean;
175
+ backgroundColor: Nullable<string>;
176
+ titleFontSize: number;
177
+ fontSize: number;
178
+ fontColor: string;
179
+ borderColor: Nullable<string>;
180
+ titles: {
181
+ title: Omit<ILabelStyle, 'visible'>;
182
+ subtitle: Omit<ILabelStyle, 'visible'>;
183
+ xAxisTitle: Omit<ILabelStyle, 'visible'>;
184
+ yAxisTitle: Omit<ILabelStyle, 'visible'>;
185
+ rightYAxisTitle: Omit<ILabelStyle, 'visible'>;
186
+ titlePosition: TitlePositionEnum;
187
+ };
188
+ legend: ILegendStyle;
189
+ xAxis: IAxisOptions;
190
+ yAxis: IAxisOptions;
191
+ rightYAxis: RightYAxisOptions;
192
+ allSeriesStyle: IAllSeriesStyle;
193
+ seriesStyleMap: {
194
+ [id: string]: ISeriesStyle;
195
+ };
196
+ pie: {
197
+ doughnutHole: Nullable<number>;
198
+ labelStyle: IPieLabelStyle;
199
+ borderColor: string;
200
+ hasPaddingAngle: boolean;
201
+ isHalfPie: boolean;
202
+ rosePie: boolean;
203
+ showLabelLine: boolean;
204
+ };
205
+ area: {
206
+ lineStyle: AreaLineStyle;
207
+ };
208
+ radar: {
209
+ shape: RadarShape;
210
+ fill: boolean;
211
+ };
212
+ }
213
+ export type ChartStyle = DeepPartial<IChartStyle>;