@univerjs-pro/sheets-chart-ui 0.5.4 → 0.5.5-experimental.20250123-34738ff

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 (57) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/fa-IR.js +1 -1
  5. package/lib/cjs/locale/fr-FR.js +1 -1
  6. package/lib/cjs/locale/ru-RU.js +1 -1
  7. package/lib/cjs/locale/vi-VN.js +1 -1
  8. package/lib/cjs/locale/zh-CN.js +1 -1
  9. package/lib/cjs/locale/zh-TW.js +1 -1
  10. package/lib/es/facade.js +1 -1
  11. package/lib/es/index.js +1 -1
  12. package/lib/es/locale/en-US.js +1 -1
  13. package/lib/es/locale/fa-IR.js +1 -1
  14. package/lib/es/locale/fr-FR.js +1 -1
  15. package/lib/es/locale/ru-RU.js +1 -1
  16. package/lib/es/locale/vi-VN.js +1 -1
  17. package/lib/es/locale/zh-CN.js +1 -1
  18. package/lib/es/locale/zh-TW.js +1 -1
  19. package/lib/index.css +1 -1
  20. package/lib/types/facade/chart-builder/chart-builder-base.d.ts +287 -136
  21. package/lib/types/facade/chart-builder/line-chart-builder.d.ts +28 -8
  22. package/lib/types/facade/chart-builder/pie-chart-builder.d.ts +15 -7
  23. package/lib/types/facade/chart-builder/radar-chart-builder.d.ts +19 -3
  24. package/lib/types/facade/chart-builder/types.d.ts +9 -0
  25. package/lib/types/facade/f-chart.d.ts +34 -13
  26. package/lib/types/facade/f-enum.d.ts +135 -0
  27. package/lib/types/facade/f-worksheet.d.ts +13 -1
  28. package/lib/types/facade/index.d.ts +4 -0
  29. package/lib/types/views/chart-edit-panel/ChartEditPanel.d.ts +1 -2
  30. package/lib/types/views/chart-edit-panel/ChartSelect.d.ts +1 -2
  31. package/lib/types/views/chart-edit-panel/RadarChartOptionsEdit.d.ts +1 -2
  32. package/lib/types/views/chart-edit-panel/button-switch/ButtonSwitch.d.ts +1 -2
  33. package/lib/types/views/chart-edit-panel/color-picker-control/index.d.ts +1 -2
  34. package/lib/types/views/chart-edit-panel/data-tab-panel/DataTabPanel.d.ts +2 -3
  35. package/lib/types/views/chart-edit-panel/dropdown-menu/index.d.ts +1 -1
  36. package/lib/types/views/chart-edit-panel/font-format-bar/FontFormatBar.d.ts +1 -2
  37. package/lib/types/views/chart-edit-panel/style-tab-panel/AxisOptionsEdit.d.ts +1 -2
  38. package/lib/types/views/chart-edit-panel/style-tab-panel/DataLabelOptions.d.ts +1 -2
  39. package/lib/types/views/chart-edit-panel/style-tab-panel/IndicatorLine.d.ts +1 -2
  40. package/lib/types/views/chart-edit-panel/style-tab-panel/PieChartStyleEdit.d.ts +1 -2
  41. package/lib/types/views/chart-edit-panel/style-tab-panel/StyleTabPanel.d.ts +1 -2
  42. package/lib/types/views/chart-edit-panel/style-tab-panel/grid-line-and-tick-options/GridLineAndTickOptions.d.ts +1 -2
  43. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/CombinationChartTypeSelect.d.ts +1 -2
  44. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/DataPointsEdit.d.ts +1 -2
  45. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/RadarPoints.d.ts +1 -2
  46. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/SeriesStyleEdit.d.ts +1 -2
  47. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/widgets.d.ts +4 -5
  48. package/lib/umd/facade.js +1 -1
  49. package/lib/umd/index.js +1 -1
  50. package/lib/umd/locale/en-US.js +1 -1
  51. package/lib/umd/locale/fa-IR.js +1 -1
  52. package/lib/umd/locale/fr-FR.js +1 -1
  53. package/lib/umd/locale/ru-RU.js +1 -1
  54. package/lib/umd/locale/vi-VN.js +1 -1
  55. package/lib/umd/locale/zh-CN.js +1 -1
  56. package/lib/umd/locale/zh-TW.js +1 -1
  57. package/package.json +20 -20
@@ -1,40 +1,57 @@
1
1
  import { AreaLineStyle, LinePointShape } from '@univerjs-pro/sheets-chart';
2
2
  import { Injector, Workbook } from '@univerjs/core';
3
3
  import { IChartBuilderInfo, FChartBuilderBase } from './chart-builder-base';
4
+ /**
5
+ * The builder for creating a line chart.
6
+ * @hideconstructor
7
+ */
4
8
  export declare class LineChartBuilder extends FChartBuilderBase {
9
+ /**
10
+ * @property {AreaLineStyle} lineStyle The line style of the line chart.
11
+ */
5
12
  lineStyle: AreaLineStyle;
13
+ /**
14
+ * @property {LinePointShape} dataPointShape The shape of the data point in the line chart.
15
+ */
6
16
  dataPointShape: LinePointShape;
17
+ /**
18
+ * @property {string} dataPointColor The color of the data point in the line chart.
19
+ */
7
20
  dataPointColor: string;
21
+ /**
22
+ * @property {number} dataPointSize The size of the data point in the line chart.
23
+ */
8
24
  dataPointSize: number;
9
25
  constructor(unitId: string, subUnitId: string, workbook: Workbook, injector: Injector, chartId?: string);
10
26
  /**
11
27
  * The line style of the area chart.
12
- * @param lineStyle
13
- * @returns - The builder, for chaining.
28
+ * @param {AreaLineStyle} lineStyle The line style of the line chart.
29
+ * @returns {LineChartBuilder} - The builder, for chaining.
14
30
  */
15
31
  setLineStyle(lineStyle: AreaLineStyle): this;
16
32
  /**
17
33
  * The shape of the data point in the line chart.
18
- * @param dataPointShape
19
- * @returns - The builder, for chaining.
34
+ * @param {LinePointShape} dataPointShape The shape of the data point in the line chart.
35
+ * @returns {LineChartBuilder} - The builder, for chaining.
20
36
  */
21
37
  setDataPointShape(dataPointShape: LinePointShape): this;
22
38
  /**
23
39
  * The color of the data point in the line chart.
24
- * @param dataPointColor
25
- * @returns - The builder, for chaining.
40
+ * @param {string} dataPointColor The color of the data point in the line chart.
41
+ * @returns {LineChartBuilder} The builder, for chaining.
26
42
  */
27
43
  setDataPointColor(dataPointColor: string): this;
28
44
  /**
29
45
  * The size of the data point in the line chart.
30
- * @param dataPointSize
31
- * @returns - The builder, for chaining.
46
+ * @param {number} dataPointSize The size of the data point in the line chart.
47
+ * @returns {LineChartBuilder} The builder, for chaining.
32
48
  */
33
49
  setDataPointSize(dataPointSize: number): this;
34
50
  /**
35
51
  * Builds the chart to reflect all changes made to it.
36
52
  * @description This method does not automatically draw the chart on top of the spreadsheet. A new chart must be inserted via sheet.insertChart(chart), and an existing chart should be updated via sheet.updateChart(chart).
37
53
  * @returns {IChartBuilderInfo} The chart builder info.
54
+ *
38
55
  * @example
39
56
  * ```ts
40
57
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -50,6 +67,9 @@ export declare class LineChartBuilder extends FChartBuilderBase {
50
67
  */
51
68
  build(): IChartBuilderInfo;
52
69
  }
70
+ /**
71
+ * @ignore
72
+ */
53
73
  export declare class LineChartBuilderMixin extends FChartBuilderBase {
54
74
  asLineChart(): LineChartBuilder;
55
75
  }
@@ -1,5 +1,9 @@
1
1
  import { Injector, Workbook } from '@univerjs/core';
2
2
  import { IChartBuilderInfo, FChartBuilderBase } from './chart-builder-base';
3
+ /**
4
+ * The builder for creating a pie chart.
5
+ * @hideconstructor
6
+ */
3
7
  export declare class PieChartBuilder extends FChartBuilderBase {
4
8
  doughnutHole: number;
5
9
  borderColor: string;
@@ -11,50 +15,51 @@ export declare class PieChartBuilder extends FChartBuilderBase {
11
15
  /**
12
16
  * Sets the size of the hole in the center of the pie chart as a percentage of the chart size.The value should be in the range 0-1.
13
17
  * @param {number} doughnutHole The size of the hole in the center of the pie chart as a percentage of the chart size.
14
- * @returns this builder, for chaining.
18
+ * @returns {PieChartBuilder} this builder, for chaining.
15
19
  */
16
20
  setDoughnutHole(doughnutHole: number): this;
17
21
  /**
18
22
  * Sets the color of the border around the pie chart.
19
23
  * @param {string} borderColor The color of the border around the pie chart.
20
- * @returns this builder, for chaining.
24
+ * @returns {PieChartBuilder} this builder, for chaining.
21
25
  */
22
26
  setBorderColor(borderColor: string): this;
23
27
  /**
24
28
  * Sets whether the pie chart has a padding angle.
25
29
  * @param {boolean} hasPaddingAngle True if the pie chart has a padding angle; false otherwise.
26
- * @returns this builder, for chaining.
30
+ * @returns {PieChartBuilder} this builder, for chaining.
27
31
  */
28
32
  setHasPaddingAngle(hasPaddingAngle: boolean): this;
29
33
  /**
30
34
  * Sets whether the pie chart is a half pie chart.
31
35
  * @param {boolean} isHalfPie True if the pie chart is a half pie chart; false otherwise.
32
- * @returns this builder, for chaining.
36
+ * @returns {PieChartBuilder} this builder, for chaining.
33
37
  */
34
38
  setIsHalfPie(isHalfPie: boolean): this;
35
39
  /**
36
40
  * Sets whether the pie chart is a rose pie chart.
37
41
  * @param {boolean} rosePie True if the pie chart is a rose pie chart; false otherwise.
38
- * @returns this builder, for chaining.
42
+ * @returns {PieChartBuilder} this builder, for chaining.
39
43
  */
40
44
  setRosePie(rosePie: boolean): this;
41
45
  /**
42
46
  * Sets whether the pie chart shows label lines.
43
47
  * @param {boolean} showLabelLine True if the pie chart shows label lines; false otherwise.
44
- * @returns this builder, for chaining.
48
+ * @returns {PieChartBuilder} this builder, for chaining.
45
49
  */
46
50
  setShowLabelLine(showLabelLine: boolean): this;
47
51
  /**
48
52
  * Builds the chart to reflect all changes made to it.
49
53
  * @description This method does not automatically draw the chart on top of the spreadsheet. A new chart must be inserted via sheet.insertChart(chart), and an existing chart should be updated via sheet.updateChart(chart).
50
54
  * @returns {IChartBuilderInfo} The chart builder info.
55
+ *
51
56
  * @example
52
57
  * ```ts
53
58
  * const fWorkbook = univerAPI.getActiveWorkbook();
54
59
  * const fSheet = fWorkbook.getActiveSheet();
55
60
  * const chartBuilder = fSheet.newChart().asPieChart();
56
61
  * const chartInfo = chartBuilder.addRange('A1:B8')
57
- * .setChartType(ChartTypeBits.Pie)
62
+ * .setChartType(univerAPI.Enum.ChartType.Pie)
58
63
  * .setDoughnutHole(0.5)
59
64
  * .setBorderColor('#ff0000')
60
65
  * .setHasPaddingAngle(true)
@@ -65,6 +70,9 @@ export declare class PieChartBuilder extends FChartBuilderBase {
65
70
  */
66
71
  build(): IChartBuilderInfo;
67
72
  }
73
+ /**
74
+ * @ignore
75
+ */
68
76
  export declare class PieChartBuilderMixin extends FChartBuilderBase {
69
77
  asPieChart(): PieChartBuilder;
70
78
  }
@@ -1,14 +1,25 @@
1
1
  import { RadarShape } from '@univerjs-pro/sheets-chart';
2
2
  import { Injector, Workbook } from '@univerjs/core';
3
3
  import { IChartBuilderInfo, FChartBuilderBase } from './chart-builder-base';
4
+ /**
5
+ * The builder for creating a radar chart.
6
+ * @hideconstructor
7
+ */
4
8
  export declare class RadarChartBuilder extends FChartBuilderBase {
9
+ /**
10
+ * @property {RadarShape} shape The shape of the radar chart. The possible values are 'Polygon' and 'Circle'.
11
+ */
5
12
  shape: RadarShape;
13
+ /**
14
+ * @property {boolean} fill True if the radar chart is filled; false otherwise.
15
+ */
6
16
  fill: boolean;
7
17
  constructor(unitId: string, subUnitId: string, workbook: Workbook, injector: Injector, chartId?: string);
8
18
  /**
9
19
  * Sets the shape of the radar chart.
10
20
  * @param {RadarShape} shape The shape of the radar chart.
11
- * @returns this builder, for chaining.
21
+ * @returns {RadarChartBuilder} this builder, for chaining.
22
+ *
12
23
  * @example
13
24
  * ```ts
14
25
  * // import { ChartTypeBits, RadarShape } from '@univerjs-pro/sheets-chart';
@@ -25,7 +36,8 @@ export declare class RadarChartBuilder extends FChartBuilderBase {
25
36
  /**
26
37
  * Sets whether the radar chart is filled.
27
38
  * @param {boolean} fill True if the radar chart is filled; false otherwise.
28
- * @returns this builder, for chaining.
39
+ * @returns {RadarChartBuilder} this builder, for chaining.
40
+ *
29
41
  * @example
30
42
  * ```ts
31
43
  * // import { ChartTypeBits } from '@univerjs-pro/sheets-chart';
@@ -43,6 +55,7 @@ export declare class RadarChartBuilder extends FChartBuilderBase {
43
55
  * Builds the chart to reflect all changes made to it.
44
56
  * @description This method does not automatically draw the chart on top of the spreadsheet. A new chart must be inserted via sheet.insertChart(chart), and an existing chart should be updated via sheet.updateChart(chart).
45
57
  * @returns {IChartBuilderInfo} The chart builder info.
58
+ *
46
59
  * @example
47
60
  * ```ts
48
61
  * // import { ChartTypeBits } from '@univerjs-pro/sheets-chart';
@@ -50,7 +63,7 @@ export declare class RadarChartBuilder extends FChartBuilderBase {
50
63
  * const fSheet = fWorkbook.getActiveSheet();
51
64
  * const chartBuilder = fSheet.newChart().asRadarChart();
52
65
  * const chartInfo = chartBuilder.addRange('A1:B8')
53
- * .setChartType(ChartTypeBits.Radar)
66
+ * .setChartType(univerAPI.Enum.ChartType.Radar)
54
67
  * .setShape(RadarShape.Polygon)
55
68
  * .setFill(true)
56
69
  * .build();
@@ -59,6 +72,9 @@ export declare class RadarChartBuilder extends FChartBuilderBase {
59
72
  */
60
73
  build(): IChartBuilderInfo;
61
74
  }
75
+ /**
76
+ * @ignore
77
+ */
62
78
  export declare class RadarChartBuilderMixin extends FChartBuilderBase {
63
79
  asRadarChart(): RadarChartBuilder;
64
80
  }
@@ -1,12 +1,21 @@
1
1
  import { LineChartBuilder } from './line-chart-builder';
2
2
  import { PieChartBuilder } from './pie-chart-builder';
3
3
  import { RadarChartBuilder } from './radar-chart-builder';
4
+ /**
5
+ * @ignore
6
+ */
4
7
  export interface IPieChartBuilderMixin {
5
8
  asPieChart(): PieChartBuilder;
6
9
  }
10
+ /**
11
+ * @ignore
12
+ */
7
13
  export interface IRadarChartBuilderMixin {
8
14
  asRadarChart(): RadarChartBuilder;
9
15
  }
16
+ /**
17
+ * @ignore
18
+ */
10
19
  export interface ILineChartBuilderMixin {
11
20
  asLineChart(): LineChartBuilder;
12
21
  }
@@ -1,15 +1,33 @@
1
1
  import { IChartDataCategory, IChartDataSeries, ISheetChartSourceSingleRange } from '@univerjs-pro/sheets-chart';
2
2
  import { Injector } from '@univerjs/core';
3
3
  import { FChartBuilderBase } from './chart-builder/chart-builder-base';
4
+ /**
5
+ * The facade class for the chart.
6
+ * @hideconstructor
7
+ */
4
8
  export declare class FChart {
9
+ /**
10
+ * @ignore
11
+ */
5
12
  unitId: string;
13
+ /**
14
+ * @ignore
15
+ */
6
16
  subUnitId: string;
17
+ /**
18
+ * @ignore
19
+ */
7
20
  chartId: string;
8
21
  private _injector;
9
22
  constructor(unitId: string, subUnitId: string, chartId: string, injector: Injector);
23
+ /**
24
+ * Get the chart id.
25
+ * @returns {string} The chart id.
26
+ */
10
27
  getChartId(): string;
11
28
  /**
12
29
  * Get the range of the chart.
30
+ * @returns {ISheetChartSourceSingleRange|undefined} The range of the chart.
13
31
  */
14
32
  getRange(): ISheetChartSourceSingleRange | undefined;
15
33
  /**
@@ -20,29 +38,31 @@ export declare class FChart {
20
38
  * @param rangeInfo.range.unitId The new workbook id of the chart.
21
39
  * @param {boolean} [rangeInfo.isRowDirection] Is treat row as category.
22
40
  * @returns {Promise<boolean>} Whether the update is successful.
41
+ *
23
42
  * @example
24
43
  * ```ts
25
- * const fWorkbook = univerAPI.getActiveWorkbook();
26
- * const fSheet = fWorkbook.getActiveSheet();
27
- * const charts = fSheet.getCharts();
28
- * // switch chart row direction
29
- * if (charts.length > 0){
30
- * const rangeInfo = {...charts[0].getRange()}
31
- * rangeInfo.isRowDirection = !rangeInfo.isRowDirection;
44
+ * const fWorkbook = univerAPI.getActiveWorkbook();
45
+ * const fSheet = fWorkbook.getActiveSheet();
46
+ * const charts = fSheet.getCharts();
47
+ * // switch chart row direction
48
+ * if (charts.length > 0){
49
+ * const rangeInfo = {...charts[0].getRange()}
50
+ * rangeInfo.isRowDirection = !rangeInfo.isRowDirection;
32
51
  * charts[0].updateRange(rangeInfo);
33
- * }
52
+ * }
34
53
  * ```
35
54
  */
36
55
  updateRange(rangeInfo: ISheetChartSourceSingleRange): Promise<boolean>;
37
56
  /**
38
57
  * Get the series data list of the chart.
39
- * @type ChartSeriesData
58
+ * @typedef ChartSeriesData
40
59
  * @property {string} name The name of the series.
41
60
  * @property {number} index The index of the series.
42
61
  * @property {ChartSeriesItem[]} items The data of the series.
43
62
  * @property {number} items.value The value of the series.
44
63
  * @property {string} items.label The label of the series.
45
- * @returns The series data list of the chart.
64
+ * @returns {IChartDataSeries[]|undefined} The series data list of the chart.
65
+ *
46
66
  * @example
47
67
  * ```ts
48
68
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -50,7 +70,7 @@ export declare class FChart {
50
70
  * const charts = fSheet.getCharts();
51
71
  * if (charts.length > 0){
52
72
  * const seriesData = charts[0].getSeriesData();
53
- * console.log(seriesData);
73
+ * console.log(seriesData);
54
74
  * }
55
75
  * ```
56
76
  */
@@ -66,14 +86,15 @@ export declare class FChart {
66
86
  * @property {number} items.value The value of the category.
67
87
  * @property {string} items.label The label of the category.
68
88
  * @returns The category data of the chart.
89
+ *
69
90
  * @example
70
91
  * ```ts
71
92
  * const fWorkbook = univerAPI.getActiveWorkbook();
72
93
  * const fSheet = fWorkbook.getActiveSheet();
73
94
  * const charts = fSheet.getCharts();
74
95
  * if (charts.length > 0){
75
- * const categoryData = charts[0].getCategoryData();
76
- * console.log(categoryData);
96
+ * const categoryData = charts[0].getCategoryData();
97
+ * console.log(categoryData);
77
98
  * }
78
99
  * ```
79
100
  */
@@ -0,0 +1,135 @@
1
+ import { AxisAlignEnum, ChartBorderDashType, ChartTypeBits, LegendPositionEnum, LinePointShape, SelectModeEnum, TitlePositionEnum } from '@univerjs-pro/sheets-chart';
2
+ /**
3
+ * @ignore
4
+ */
5
+ export interface IChartEnumMixin {
6
+ /**
7
+ * Represents the type of the chart. {@link ChartTypeBits}
8
+ * @description This enum is used to specify the type of the chart. Which is binary-like value, each bit represents a type of the chart.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const fWorkbook = univerAPI.getActiveWorkbook();
13
+ * const fSheet = fWorkbook.getActiveSheet();
14
+ * const chartBuilder = fSheet.newChart().asRadarChart();
15
+ * const chartInfo = chartBuilder.addRange('A1:B8')
16
+ * .setChartType(univerAPI.Enum.ChartType.Radar)
17
+ * .setShape(univerAPI.Enum.RadarShape.Polygon)
18
+ * .setFill(true)
19
+ * .build();
20
+ * fSheet.insertChart(chartInfo);
21
+ * ```
22
+ */
23
+ ChartType: typeof ChartTypeBits;
24
+ /**
25
+ * Represents the position of the legend in the chart. {@link LegendPositionEnum}
26
+ * The possible values are: BOTTOM, TOP, LEFT, RIGHT, HIDE.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const fWorkbook = univerAPI.getActiveWorkbook();
31
+ * const fSheet = fWorkbook.getActiveSheet();
32
+ * const chartBuilder = fSheet.newChart();
33
+ * const chartInfo = chartBuilder.addRange('A1:B8')
34
+ * .setChartType(univerAPI.Enum.ChartType.Line)
35
+ * .setOptions('legend.position', univerAPI.Enum.LegendPositionEnum.TOP)
36
+ * .build();
37
+ * fSheet.insertChart(chartInfo);
38
+ * ```
39
+ */
40
+ LegendPositionEnum: typeof LegendPositionEnum;
41
+ /**
42
+ * Represents the selection mode of the chart. {@link SelectModeEnum}
43
+ * The possible values are: SINGLE, MULTIPLE, Close. It used to specify the selection mode of the chart legend.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const fWorkbook = univerAPI.getActiveWorkbook();
48
+ * const fSheet = fWorkbook.getActiveSheet();
49
+ * const chartBuilder = fSheet.newChart().asLineChart();
50
+ * const chartInfo = chartBuilder.addRange('A1:B8')
51
+ * .setChartType(univerAPI.Enum.ChartType.Line)
52
+ * .setOptions('legend.selectMode', univerAPI.Enum.SelectModeEnum.SINGLE)
53
+ * .build();
54
+ * fSheet.insertChart(chartInfo);
55
+ * ```
56
+ */
57
+ SelectModeEnum: typeof SelectModeEnum;
58
+ /**
59
+ * Represents the alignment of the axis. {@link AxisAlignEnum}
60
+ * The possible values are: START, CENTER, END.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const fWorkbook = univerAPI.getActiveWorkbook();
65
+ * const fSheet = fWorkbook.getActiveSheet();
66
+ * const chartBuilder = fSheet.newChart().asLineChart();
67
+ * const chartInfo = chartBuilder.addRange('A1:B8')
68
+ * .setChartType(univerAPI.Enum.ChartType.Line)
69
+ * .setAxisAlign(univerAPI.Enum.AxisAlignEnum.START)
70
+ * .build();
71
+ * fSheet.insertChart(chartInfo);
72
+ * ```
73
+ */
74
+ AxisAlignEnum: typeof AxisAlignEnum;
75
+ /**
76
+ * Represents the type of the border dash. {@link ChartBorderDashType}
77
+ * The possible values are: SOLID, DOTTED, DASHED.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const fWorkbook = univerAPI.getActiveWorkbook();
82
+ * const fSheet = fWorkbook.getActiveSheet();
83
+ * const chartBuilder = fSheet.newChart().asLineChart();
84
+ * const chartInfo = chartBuilder.addRange('A1:B8')
85
+ * .setChartType(univerAPI.Enum.ChartType.Line)
86
+ * .setAxisPointerStyle({
87
+ * indicatorLabelColor: '#ff0000',
88
+ * indicatorLineType: univerAPI.Enum.ChartBorderDashType.Solid,
89
+ * indicatorLineColor: '#00ff00',
90
+ * indicatorLabelTextColor: '#0000ff',
91
+ * })
92
+ * .build();
93
+ * fSheet.insertChart(chartInfo);
94
+ * ```
95
+ */
96
+ ChartBorderDashType: typeof ChartBorderDashType;
97
+ /**
98
+ * Represents the shape of the data point in the line chart. {@link LinePointShape}
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * const fWorkbook = univerAPI.getActiveWorkbook();
103
+ * const fSheet = fWorkbook.getActiveSheet();
104
+ * const chartBuilder = fSheet.newChart().asLineChart();
105
+ * const chartInfo = chartBuilder.addRange('A1:B8')
106
+ * .setChartType(univerAPI.Enum.ChartType.Line)
107
+ * .setDataPointShape(univerAPI.Enum.LinePointShape.CIRCLE)
108
+ * .build();
109
+ * fSheet.insertChart(chartInfo);
110
+ * ```
111
+ */
112
+ LinePointShape: typeof LinePointShape;
113
+ /**
114
+ * Represents the position of the title in the chart. {@link TitlePositionEnum}
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * const fWorkbook = univerAPI.getActiveWorkbook();
119
+ * const fSheet = fWorkbook.getActiveSheet();
120
+ * const chartBuilder = fSheet.newChart().asLineChart();
121
+ * const chartInfo = chartBuilder.addRange('A1:B8')
122
+ * .setOptions('title.position',univerAPI.Enum.TitlePositionEnum.TOP)
123
+ * .build();
124
+ * fSheet.insertChart(chartInfo);
125
+ * ```
126
+ */
127
+ TitlePositionEnum: typeof TitlePositionEnum;
128
+ }
129
+ /**
130
+ * @ignore
131
+ */
132
+ declare module '@univerjs/core' {
133
+ interface FEnum extends IChartEnumMixin {
134
+ }
135
+ }
@@ -2,11 +2,15 @@ import { IEchartTheme } from '@univerjs-pro/sheets-chart';
2
2
  import { IChartBuilderInfo, FChartBuilderBase } from './chart-builder/chart-builder-base';
3
3
  import { FWorksheet } from '@univerjs/sheets/facade';
4
4
  import { FChart } from './f-chart';
5
+ /**
6
+ * @ignore
7
+ */
5
8
  export interface IFWorksheetChartMixin {
6
9
  /**
7
10
  * Adds a new chart to this sheet.
8
11
  * @param {IChartBuilderInfo} chartBuildInfo - The chart builder info.
9
12
  * @returns {Promise<FChart>} - The new chart.
13
+ *
10
14
  * @example
11
15
  * ```ts
12
16
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -23,6 +27,7 @@ export interface IFWorksheetChartMixin {
23
27
  /**
24
28
  * Updates the chart on this sheet. This api can not update source range, please use FChart.updateRange.
25
29
  * @param {IChartBuilderInfo} chartBuildInfo - The chart builder info.
30
+ *
26
31
  * @example
27
32
  * ```ts
28
33
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -43,7 +48,8 @@ export interface IFWorksheetChartMixin {
43
48
  * Returns a builder to create a new chart for this sheet.The builder will not automatically create the chart. You must call build() on the returned builder to create the chart by calling insertChart(chartBuilder).
44
49
  * @description If the fChart is provided, the builder will be initialized with the existing chart's data.
45
50
  * @param {FChart} [fChart] - The chart to update.
46
- * @return {FChartBuilderBase} - a new chart builder
51
+ * @returns {FChartBuilderBase} - a new chart builder
52
+ *
47
53
  * @example
48
54
  * ```ts
49
55
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -62,6 +68,7 @@ export interface IFWorksheetChartMixin {
62
68
  /**
63
69
  * Returns an array of charts on this sheet.
64
70
  * @returns {FChart[]} - An array of charts on this sheet.
71
+ *
65
72
  * @example
66
73
  * ```ts
67
74
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -74,6 +81,7 @@ export interface IFWorksheetChartMixin {
74
81
  /**
75
82
  * Removes a chart from the parent sheet.
76
83
  * @param {FChart} chart - The chart to remove.
84
+ *
77
85
  * @example
78
86
  * ```ts
79
87
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -90,6 +98,7 @@ export interface IFWorksheetChartMixin {
90
98
  * @description The theme object should be a valid echarts theme object.The online builder is available at https://echarts.apache.org/zh/theme-builder.html
91
99
  * @param {string} themeName - The name of the theme.
92
100
  * @param {IEchartTheme} theme - The theme object.
101
+ *
93
102
  * @example
94
103
  * ```ts
95
104
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -114,6 +123,9 @@ export declare class FWorksheetChartMixin extends FWorksheet implements IFWorksh
114
123
  removeChart(chart: FChart): Promise<boolean>;
115
124
  registerChartTheme(themeName: string, theme: IEchartTheme): void;
116
125
  }
126
+ /**
127
+ * @ignore
128
+ */
117
129
  declare module '@univerjs/sheets/facade' {
118
130
  interface FWorksheet extends IFWorksheetChartMixin {
119
131
  }
@@ -1,5 +1,6 @@
1
1
  import { ILineChartBuilderMixin, IPieChartBuilderInfo, IPieChartBuilderMixin, IRadarChartBuilderMixin } from './chart-builder/types';
2
2
  import './f-worksheet';
3
+ import './f-enum';
3
4
  export { FChartBuilderBase } from './chart-builder/chart-builder-base';
4
5
  export type * from './chart-builder/chart-builder-base';
5
6
  export { LineChartBuilder } from './chart-builder/line-chart-builder';
@@ -8,6 +9,9 @@ export { RadarChartBuilder } from './chart-builder/radar-chart-builder';
8
9
  export { FChart } from './f-chart';
9
10
  export type * from './f-chart';
10
11
  export type * from './f-worksheet';
12
+ /**
13
+ * @ignore
14
+ */
11
15
  declare module '@univerjs-pro/sheets-chart-ui/facade' {
12
16
  interface FChartBuilderBase extends IPieChartBuilderMixin, IRadarChartBuilderMixin, ILineChartBuilderMixin {
13
17
  }
@@ -1,3 +1,2 @@
1
- import { default as React } from 'react';
2
1
  import 'rc-collapse/assets/index.css';
3
- export declare const ChartEditPanel: () => React.JSX.Element;
2
+ export declare const ChartEditPanel: () => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { ISelectProps } from '@univerjs/design';
2
- import { default as React } from 'react';
3
- export declare function ChartSelect(props: ISelectProps): React.JSX.Element;
2
+ export declare function ChartSelect(props: ISelectProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,7 @@
1
1
  import { LocaleService } from '@univerjs/core';
2
2
  import { SheetsChartUIService } from '../../services/sheets-chart-ui.service';
3
- import { default as React } from 'react';
4
3
  export declare const RadarChartOptionsEdit: (props: {
5
4
  service: SheetsChartUIService;
6
5
  localeService: LocaleService;
7
6
  className?: string;
8
- }) => React.JSX.Element;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,8 @@
1
1
  import { OptionType } from '../options';
2
- import { default as React } from 'react';
3
2
  export interface IButtonSwitchProps {
4
3
  className?: string;
5
4
  options: OptionType[];
6
5
  value?: string;
7
6
  onChange?: (value: string) => void;
8
7
  }
9
- export declare const ButtonSwitch: (props: IButtonSwitchProps) => React.JSX.Element;
8
+ export declare const ButtonSwitch: (props: IButtonSwitchProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,6 @@
1
1
  import { Nullable } from '@univerjs/core';
2
- import { default as React } from 'react';
3
2
  export interface IColorPickerControlProps {
4
3
  color: Nullable<string>;
5
4
  onChange?: (color: Nullable<string>) => void;
6
5
  }
7
- export declare const ColorPickerControl: (props: IColorPickerControlProps) => React.JSX.Element;
6
+ export declare const ColorPickerControl: (props: IColorPickerControlProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- import { default as React } from 'react';
2
1
  export declare const ChartEditBlockTitle: ({ title }: {
3
2
  title: string;
4
- }) => React.JSX.Element;
5
- export declare const DataTabPanel: () => React.JSX.Element;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const DataTabPanel: () => import("react/jsx-runtime").JSX.Element;
@@ -5,4 +5,4 @@ export interface IDropdownMenuProps {
5
5
  children: React.ReactElement | ((visible: boolean) => React.ReactElement);
6
6
  onSelect?: (menu: OptionType, index: number) => void;
7
7
  }
8
- export declare const DropdownMenu: (props: IDropdownMenuProps) => React.JSX.Element;
8
+ export declare const DropdownMenu: (props: IDropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { LocaleService } from '@univerjs/core';
2
- import { default as React } from 'react';
3
2
  export interface IFontFormatStyle {
4
3
  fontSize: number;
5
4
  color: string;
@@ -16,4 +15,4 @@ export interface IFontFormatBarProps extends Partial<IFontFormatStyle> {
16
15
  className?: string;
17
16
  onChange?: PropertyChangeFunction<Omit<IFontFormatStyle, 'controls'>>;
18
17
  }
19
- export declare const FontFormatBar: (props: IFontFormatBarProps) => React.JSX.Element;
18
+ export declare const FontFormatBar: (props: IFontFormatBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import { DeepPartial, IAxisOptions } from '@univerjs-pro/sheets-chart';
2
2
  import { LocaleService, Nullable } from '@univerjs/core';
3
- import { default as React } from 'react';
4
3
  export interface IAxisOptionsEditProps {
5
4
  localeService: LocaleService;
6
5
  valueAxis: boolean;
7
6
  axisOptions: Nullable<DeepPartial<IAxisOptions>>;
8
7
  onChange?: (axisOptions: DeepPartial<IAxisOptions>) => void;
9
8
  }
10
- export declare const AxisOptionsEdit: (props: IAxisOptionsEditProps) => React.JSX.Element;
9
+ export declare const AxisOptionsEdit: (props: IAxisOptionsEditProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,6 @@ import { ChartTypeBits, IPieLabelStyle, ISeriesLabelStyle } from '@univerjs-pro/
2
2
  import { LocaleService, Nullable } from '@univerjs/core';
3
3
  import { PropertyChangeFunction } from '../font-format-bar';
4
4
  import { OptionType } from '../options';
5
- import { default as React } from 'react';
6
5
  type UnionLabelStyle = ISeriesLabelStyle | IPieLabelStyle;
7
6
  export interface IDataLabelOptionsProps {
8
7
  localeService: LocaleService;
@@ -23,5 +22,5 @@ export interface IDataLabelOptionsProps {
23
22
  onShowLabelLineChange?: (showLabelLine: boolean) => void;
24
23
  showLabelLine?: Nullable<boolean>;
25
24
  }
26
- export declare const DataLabelOptions: (props: IDataLabelOptionsProps) => React.JSX.Element;
25
+ export declare const DataLabelOptions: (props: IDataLabelOptionsProps) => import("react/jsx-runtime").JSX.Element;
27
26
  export {};