@univerjs-pro/sheets-chart 0.6.4 → 0.6.5
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/en-US.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/ru-RU.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-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/lib/types/chart-source/chart-source.d.ts +5 -21
- package/lib/types/commands/commands/sheets-chart-update-config.command.d.ts +1 -3
- package/lib/types/commands/mutations/sheets-chart-update-config.mutation.d.ts +1 -3
- package/lib/types/commands/mutations/sheets-chart.mutation.d.ts +1 -1
- package/lib/types/extra/func.d.ts +1 -1
- package/lib/types/extra/reverse.d.ts +37 -37
- package/lib/types/index.d.ts +2 -11
- package/lib/types/models/chart-model.d.ts +18 -0
- package/lib/types/models/types.d.ts +3 -62
- package/lib/types/services/chart-model.service.d.ts +9 -9
- package/lib/types/services/sheets-chart.service.d.ts +9 -9
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/package.json +7 -6
- package/lib/types/models/chart-data-operators/build-chart-data.d.ts +0 -3
- package/lib/types/models/chart-data-operators/index.d.ts +0 -2
- package/lib/types/models/chart-data-operators/operators.d.ts +0 -26
- package/lib/types/models/constants/build-in-theme/default.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/index.d.ts +0 -15
- package/lib/types/models/constants/build-in-theme/types.d.ts +0 -77
- package/lib/types/models/constants/build-in-theme/univer-gradient1.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer-gradient2.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer-gradient3.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer-gradient4.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer-gradient5.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer-gradient6.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer1.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer2.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer3.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer4.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer5.d.ts +0 -2
- package/lib/types/models/constants/build-in-theme/univer6.d.ts +0 -2
- package/lib/types/models/constants/default-chart-style.d.ts +0 -70
- package/lib/types/models/constants.d.ts +0 -78
- package/lib/types/models/data-context-transformers/bar-data-context-transformer.d.ts +0 -3
- package/lib/types/models/data-context-transformers/line-like-context-transformer.d.ts +0 -3
- package/lib/types/models/data-context-transformers/percent-data-context-transformer.d.ts +0 -3
- package/lib/types/models/data-context-transformers/pie-data-context-transformer.d.ts +0 -3
- package/lib/types/models/runtime-context.types.d.ts +0 -29
- package/lib/types/models/style.types.d.ts +0 -354
- package/lib/types/services/chart-theme.service.d.ts +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/sheets-chart",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Chart library for Univer.",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -53,17 +53,18 @@
|
|
|
53
53
|
"rxjs": ">=7.0.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@univerjs/
|
|
57
|
-
"@univerjs
|
|
58
|
-
"@univerjs/sheets": "0.6.
|
|
56
|
+
"@univerjs-pro/engine-chart": "0.6.5",
|
|
57
|
+
"@univerjs/core": "0.6.5",
|
|
58
|
+
"@univerjs/sheets": "0.6.5",
|
|
59
|
+
"@univerjs-pro/license": "0.6.5"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"echarts": "^5.6.0",
|
|
62
63
|
"rxjs": "^7.8.1",
|
|
63
64
|
"typescript": "^5.8.2",
|
|
64
65
|
"vite": "^6.2.0",
|
|
65
|
-
"vitest": "^3.0.
|
|
66
|
-
"@univerjs-infra/shared": "0.6.
|
|
66
|
+
"vitest": "^3.0.8",
|
|
67
|
+
"@univerjs-infra/shared": "0.6.5"
|
|
67
68
|
},
|
|
68
69
|
"scripts": {
|
|
69
70
|
"test": "vitest run",
|
|
@@ -1,3 +0,0 @@
|
|
|
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;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ChartModel } from '../chart-model';
|
|
2
|
-
import { ChartDataSourceValue, ChartDataSourceValues, IChartContext, IChartDataAggregation, IChartDataSource, OptionDataValue } from '../types';
|
|
3
|
-
export type IChartContextOperator = (dataSource: IChartDataSource, context: IChartContext, model: ChartModel) => IChartContext;
|
|
4
|
-
export type IChartDataAggregateOperator = (dataSource: ChartDataSourceValues, context: IChartContext, dataAggregation: IChartDataAggregation) => ChartDataSourceValues | void;
|
|
5
|
-
type Nil = null | undefined;
|
|
6
|
-
export declare function isNil(value: any): value is Nil;
|
|
7
|
-
export declare function countTypesFromArray(arrayData: OptionDataValue[]): {
|
|
8
|
-
numbers: number;
|
|
9
|
-
strings: number;
|
|
10
|
-
};
|
|
11
|
-
export declare function toString(value: ChartDataSourceValue): string;
|
|
12
|
-
export declare function toNumber(value: ChartDataSourceValue): number;
|
|
13
|
-
export declare function toColumnOrient<T = any>(dataSource: T[][]): T[][];
|
|
14
|
-
export declare function findCategoryIndexes(dataSource: IChartDataSource): number[];
|
|
15
|
-
export declare function groupByToArray<T = any>(ary: T[], selector: (item: T, index: number) => string): {
|
|
16
|
-
name: string;
|
|
17
|
-
values: T[];
|
|
18
|
-
}[];
|
|
19
|
-
export declare function sumArray(ary: ChartDataSourceValue[]): number;
|
|
20
|
-
export declare const findHeaderOperator: IChartContextOperator;
|
|
21
|
-
export declare const findCategoryOperator: IChartContextOperator;
|
|
22
|
-
export declare const findSeriesOperator: IChartContextOperator;
|
|
23
|
-
export declare const pieSeriesFilterOperator: IChartContextOperator;
|
|
24
|
-
export declare const aggregateOperator: IChartDataAggregateOperator;
|
|
25
|
-
export declare const topNOperator: IChartDataAggregateOperator;
|
|
26
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { themeDefault } from './default';
|
|
2
|
-
export { getThemeAxesByType, getThemeProps } from './theme-util';
|
|
3
|
-
export type { IEchartTheme } from './types';
|
|
4
|
-
export { univer1 as UniverTheme1 } from './univer1';
|
|
5
|
-
export { univer2 as UniverTheme2 } from './univer2';
|
|
6
|
-
export { univer3 as UniverTheme3 } from './univer3';
|
|
7
|
-
export { univer4 as UniverTheme4 } from './univer4';
|
|
8
|
-
export { univer5 as UniverTheme5 } from './univer5';
|
|
9
|
-
export { univer6 as UniverTheme6 } from './univer6';
|
|
10
|
-
export { univerGradient1 as UniverThemeGradient1 } from './univer-gradient1';
|
|
11
|
-
export { univerGradient2 as UniverThemeGradient2 } from './univer-gradient2';
|
|
12
|
-
export { univerGradient3 as UniverThemeGradient3 } from './univer-gradient3';
|
|
13
|
-
export { univerGradient4 as UniverThemeGradient4 } from './univer-gradient4';
|
|
14
|
-
export { univerGradient5 as UniverThemeGradient5 } from './univer-gradient5';
|
|
15
|
-
export { univerGradient6 as UniverThemeGradient6 } from './univer-gradient6';
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
export 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 {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { ChartTypeBits } from '../constants';
|
|
2
|
-
import { AreaLineStyle, AxisAlignEnum, ChartBorderDashType, InvalidValueType, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, SelectModeEnum, 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
|
-
scatterSymbolSize: number;
|
|
11
|
-
};
|
|
12
|
-
backgroundColor: string;
|
|
13
|
-
axis: {
|
|
14
|
-
labelVisible: boolean;
|
|
15
|
-
reverse: boolean;
|
|
16
|
-
titleAlign: AxisAlignEnum;
|
|
17
|
-
};
|
|
18
|
-
legend: {
|
|
19
|
-
position: LegendPositionEnum;
|
|
20
|
-
selectMode: SelectModeEnum;
|
|
21
|
-
};
|
|
22
|
-
borderStyle: {
|
|
23
|
-
opacity: number;
|
|
24
|
-
width: number;
|
|
25
|
-
specialChartWidthMap: {
|
|
26
|
-
lineOrArea: number;
|
|
27
|
-
radar: number;
|
|
28
|
-
};
|
|
29
|
-
dashType: ChartBorderDashType;
|
|
30
|
-
};
|
|
31
|
-
textStyle: {
|
|
32
|
-
fontSize: number;
|
|
33
|
-
subTitleFontSize: number;
|
|
34
|
-
titleFontSize: number;
|
|
35
|
-
color: string;
|
|
36
|
-
align: string;
|
|
37
|
-
position: SeriesLabelPosition;
|
|
38
|
-
bold: boolean;
|
|
39
|
-
family: string;
|
|
40
|
-
italic: boolean;
|
|
41
|
-
};
|
|
42
|
-
titlePosition: TitlePositionEnum;
|
|
43
|
-
titlePositionAlign: TextAlign;
|
|
44
|
-
titleFontSize: number;
|
|
45
|
-
area: {
|
|
46
|
-
lineStyle: AreaLineStyle;
|
|
47
|
-
};
|
|
48
|
-
labelContentType: LabelContentType;
|
|
49
|
-
pie: {
|
|
50
|
-
labelContentType: number;
|
|
51
|
-
radius: number;
|
|
52
|
-
doughnutHole: number;
|
|
53
|
-
borderColor: string;
|
|
54
|
-
labelPosition: PieLabelPosition;
|
|
55
|
-
hasPaddingAngle: boolean;
|
|
56
|
-
};
|
|
57
|
-
combination: {
|
|
58
|
-
firstChartType: ChartTypeBits;
|
|
59
|
-
otherChartType: ChartTypeBits;
|
|
60
|
-
};
|
|
61
|
-
radar: {
|
|
62
|
-
shape: RadarShape;
|
|
63
|
-
symbolSize: number;
|
|
64
|
-
symbolType: LinePointShape;
|
|
65
|
-
areaOpacity: number;
|
|
66
|
-
};
|
|
67
|
-
tooltipAxisLabelBackground: string;
|
|
68
|
-
tooltipAxisLabelColor: string;
|
|
69
|
-
indicatorLineType: ChartBorderDashType;
|
|
70
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
export declare enum ChartAttributeBits {
|
|
2
|
-
Stack = 1073741824,
|
|
3
|
-
PercentStack = 1610612736,
|
|
4
|
-
Horizontal = 268435456
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* The chart types.
|
|
8
|
-
*/
|
|
9
|
-
export declare enum ChartTypeBits {
|
|
10
|
-
/**
|
|
11
|
-
* No chart type
|
|
12
|
-
*/
|
|
13
|
-
None = 0,
|
|
14
|
-
/**
|
|
15
|
-
* Line chart
|
|
16
|
-
*/
|
|
17
|
-
Line = 2,
|
|
18
|
-
/**
|
|
19
|
-
* column chart
|
|
20
|
-
*/
|
|
21
|
-
Column = 4,
|
|
22
|
-
/**
|
|
23
|
-
* Stacked column chart
|
|
24
|
-
*/
|
|
25
|
-
ColumnStacked = 1073741828,
|
|
26
|
-
/**
|
|
27
|
-
* Percent stacked column chart
|
|
28
|
-
*/
|
|
29
|
-
ColumnPercentStacked = 1610612740,
|
|
30
|
-
/**
|
|
31
|
-
* Bar chart
|
|
32
|
-
*/
|
|
33
|
-
Bar = 268435460,
|
|
34
|
-
/**
|
|
35
|
-
* Stacked bar chart
|
|
36
|
-
*/
|
|
37
|
-
BarStacked = 1342177284,
|
|
38
|
-
/**
|
|
39
|
-
* Percent stacked bar chart
|
|
40
|
-
*/
|
|
41
|
-
BarPercentStacked = 1879048196,
|
|
42
|
-
/** Pie chart */
|
|
43
|
-
Pie = 8,
|
|
44
|
-
/**
|
|
45
|
-
* Doughnut chart
|
|
46
|
-
*/
|
|
47
|
-
Doughnut = 264,
|
|
48
|
-
/** Area chart */
|
|
49
|
-
Area = 16,
|
|
50
|
-
/**
|
|
51
|
-
* Stacked area chart
|
|
52
|
-
*/
|
|
53
|
-
AreaStacked = 1073741840,
|
|
54
|
-
/**
|
|
55
|
-
* Percent stacked area chart
|
|
56
|
-
*/
|
|
57
|
-
AreaPercentStacked = 1610612752,
|
|
58
|
-
/** Radar chart */
|
|
59
|
-
Radar = 32,
|
|
60
|
-
/** Scatter chart */
|
|
61
|
-
Scatter = 64,
|
|
62
|
-
/** Combination chart */
|
|
63
|
-
Combination = 128
|
|
64
|
-
}
|
|
65
|
-
export declare const chartBitsUtils: {
|
|
66
|
-
has(bit: number, attribute: number): boolean;
|
|
67
|
-
baseOn(bit: number, base: number): boolean;
|
|
68
|
-
remove(bit: number, attribute: number): number;
|
|
69
|
-
chartBitToString(bit: ChartTypeBits): "" | "line" | "pie" | "bar" | "radar" | "scatter" | "combination";
|
|
70
|
-
};
|
|
71
|
-
export declare enum DataOrientation {
|
|
72
|
-
Row = "Row",
|
|
73
|
-
Column = "Column"
|
|
74
|
-
}
|
|
75
|
-
export declare enum CategoryType {
|
|
76
|
-
Linear = "Linear",
|
|
77
|
-
Text = "Text"
|
|
78
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
emptyTips: string;
|
|
29
|
-
}
|