@univerjs-pro/engine-chart 1.0.0-rc.0 → 1.0.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.
Files changed (203) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/chart-builder/chart-types.d.ts +10 -1
  65. package/lib/types/chart-builder/configuration/chart-config-group.d.ts +1 -0
  66. package/lib/types/chart-builder/conversion/chart-context-patch.d.ts +5 -2
  67. package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +5 -0
  68. package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +1030 -16
  69. package/lib/types/chart-text-measure-canvas.d.ts +1 -0
  70. package/lib/types/enum.d.ts +11 -1
  71. package/lib/types/facade/builders/f-scatter-chart-builder.d.ts +24 -0
  72. package/lib/types/facade/f-chart-builder-base.d.ts +22 -0
  73. package/lib/types/facade/f-chart.d.ts +22 -0
  74. package/lib/types/index.d.ts +3 -3
  75. package/lib/types/model/chart-data-operators/build-chart-data.d.ts +4 -0
  76. package/lib/types/model/chart-data-operators/index.d.ts +2 -0
  77. package/lib/types/model/chart-data-operators/operators.d.ts +25 -0
  78. package/lib/types/model/chart-locale-texts.d.ts +22 -0
  79. package/lib/types/model/chart-model.d.ts +3424 -0
  80. package/lib/types/model/chart-theme.service.d.ts +40 -0
  81. package/lib/types/model/constants/build-in-theme/default.d.ts +2 -0
  82. package/lib/types/model/constants/build-in-theme/index.d.ts +15 -0
  83. package/lib/types/model/constants/build-in-theme/theme-util.d.ts +5 -0
  84. package/lib/types/model/constants/build-in-theme/types.d.ts +76 -0
  85. package/lib/types/model/constants/build-in-theme/univer-gradient1.d.ts +2 -0
  86. package/lib/types/model/constants/build-in-theme/univer-gradient2.d.ts +2 -0
  87. package/lib/types/model/constants/build-in-theme/univer-gradient3.d.ts +2 -0
  88. package/lib/types/model/constants/build-in-theme/univer-gradient4.d.ts +2 -0
  89. package/lib/types/model/constants/build-in-theme/univer-gradient5.d.ts +2 -0
  90. package/lib/types/model/constants/build-in-theme/univer-gradient6.d.ts +2 -0
  91. package/lib/types/model/constants/build-in-theme/univer1.d.ts +2 -0
  92. package/lib/types/model/constants/build-in-theme/univer2.d.ts +2 -0
  93. package/lib/types/model/constants/build-in-theme/univer3.d.ts +2 -0
  94. package/lib/types/model/constants/build-in-theme/univer4.d.ts +2 -0
  95. package/lib/types/model/constants/build-in-theme/univer5.d.ts +2 -0
  96. package/lib/types/model/constants/build-in-theme/univer6.d.ts +2 -0
  97. package/lib/types/model/constants/default-chart-style.d.ts +114 -0
  98. package/lib/types/model/constants/default.d.ts +11 -0
  99. package/lib/types/model/data-context-transformers/bar-data-context-transformer.d.ts +3 -0
  100. package/lib/types/model/data-context-transformers/box-plot-data-context-transformer.d.ts +3 -0
  101. package/lib/types/model/data-context-transformers/line-like-context-transformer.d.ts +3 -0
  102. package/lib/types/model/data-context-transformers/pareto-data-context-transformer.d.ts +3 -0
  103. package/lib/types/model/data-context-transformers/percent-data-context-transformer.d.ts +3 -0
  104. package/lib/types/model/data-context-transformers/pie-data-context-transformer.d.ts +3 -0
  105. package/lib/types/model/data-context-transformers/word-cloud-data-context-transform.d.ts +3 -0
  106. package/lib/types/model/echart-render-model.d.ts +32 -0
  107. package/lib/types/model/echart-to-chart-model-init.d.ts +3 -0
  108. package/lib/types/model/mode-converter/converters/boxplot-chart-converter.d.ts +2 -0
  109. package/lib/types/model/mode-converter/converters/bubble-chart-converter.d.ts +2 -0
  110. package/lib/types/model/mode-converter/converters/combination-chart-converter.d.ts +2 -0
  111. package/lib/types/model/mode-converter/converters/constants.d.ts +7 -0
  112. package/lib/types/model/mode-converter/converters/funnel-chart-converter.d.ts +2 -0
  113. package/lib/types/model/mode-converter/converters/heatmap-chart-convert.d.ts +2 -0
  114. package/lib/types/model/mode-converter/converters/pareto-chart-converter.d.ts +2 -0
  115. package/lib/types/model/mode-converter/converters/pie-chart-converter.d.ts +2 -0
  116. package/lib/types/model/mode-converter/converters/radar-chart-converter.d.ts +2 -0
  117. package/lib/types/model/mode-converter/converters/relation-chart-converter.d.ts +2 -0
  118. package/lib/types/model/mode-converter/converters/sankey-chart-converter.d.ts +2 -0
  119. package/lib/types/model/mode-converter/converters/scatter-chart-converter.d.ts +2 -0
  120. package/lib/types/model/mode-converter/converters/tools.d.ts +15 -0
  121. package/lib/types/model/mode-converter/converters/waterfall-chart-converter.d.ts +2 -0
  122. package/lib/types/model/mode-converter/converters/word-cloud-converter.d.ts +76 -0
  123. package/lib/types/model/mode-converter/mode-converter.d.ts +96 -0
  124. package/lib/types/model/mode-converter/render-spec-operators/axis-title.operator.d.ts +2 -0
  125. package/lib/types/model/mode-converter/render-spec-operators/bubble-style.operator.d.ts +2 -0
  126. package/lib/types/model/mode-converter/render-spec-operators/chart-axes.operator.d.ts +2 -0
  127. package/lib/types/model/mode-converter/render-spec-operators/chart-box-style.operator.d.ts +2 -0
  128. package/lib/types/model/mode-converter/render-spec-operators/empty-style-operator.d.ts +2 -0
  129. package/lib/types/model/mode-converter/render-spec-operators/font-size.operator.d.ts +2 -0
  130. package/lib/types/model/mode-converter/render-spec-operators/grid-operator.d.ts +2 -0
  131. package/lib/types/model/mode-converter/render-spec-operators/heatmap-chart-operator.d.ts +2 -0
  132. package/lib/types/model/mode-converter/render-spec-operators/hover-mark-style.operator.d.ts +2 -0
  133. package/lib/types/model/mode-converter/render-spec-operators/index.d.ts +13 -0
  134. package/lib/types/model/mode-converter/render-spec-operators/invalid-value-style.operator.d.ts +2 -0
  135. package/lib/types/model/mode-converter/render-spec-operators/legend-style.operator.d.ts +2 -0
  136. package/lib/types/model/mode-converter/render-spec-operators/line-like-style.operator.d.ts +2 -0
  137. package/lib/types/model/mode-converter/render-spec-operators/operator-types.d.ts +7 -0
  138. package/lib/types/model/mode-converter/render-spec-operators/pie-style.operator.d.ts +2 -0
  139. package/lib/types/model/mode-converter/render-spec-operators/radar-style.operator.d.ts +2 -0
  140. package/lib/types/model/mode-converter/render-spec-operators/relation-chart-operator/relation-chart-operator.d.ts +2 -0
  141. package/lib/types/model/mode-converter/render-spec-operators/relation-chart-operator/relation-force-directed-layout.d.ts +28 -0
  142. package/lib/types/model/mode-converter/render-spec-operators/sankey-chart-operator.d.ts +2 -0
  143. package/lib/types/model/mode-converter/render-spec-operators/scatter-style.operator.d.ts +2 -0
  144. package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/pareto-series-style.handler.d.ts +2 -0
  145. package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-chart-style.handler.d.ts +2 -0
  146. package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-data-label.handler.d.ts +2 -0
  147. package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/series-style-operator.d.ts +11 -0
  148. package/lib/types/model/mode-converter/render-spec-operators/series-style-operator/waterfall-series-style-operator.d.ts +3 -0
  149. package/lib/types/model/mode-converter/render-spec-operators/stack.operator.d.ts +2 -0
  150. package/lib/types/model/mode-converter/render-spec-operators/theme.operator.d.ts +2 -0
  151. package/lib/types/model/mode-converter/render-spec-operators/title-style.operator.d.ts +2 -0
  152. package/lib/types/model/mode-converter/render-spec-operators/tool-tip-operator.d.ts +3 -0
  153. package/lib/types/model/mode-converter/render-spec-operators/tools.d.ts +26 -0
  154. package/lib/types/model/mode-converter/render-spec-operators/trend-line/trend-line.operator.d.ts +2 -0
  155. package/lib/types/model/mode-converter/render-spec-operators/trend-line/trendline-util.d.ts +13 -0
  156. package/lib/types/model/mode-converter/render-spec-operators/visual-map-operator.d.ts +2 -0
  157. package/lib/types/model/mode-converter/render-spec-operators/watermark.operator.d.ts +2 -0
  158. package/lib/types/model/spec-converter/spec-converter.d.ts +1 -0
  159. package/lib/types/model/word-cloud-musk-image.service.d.ts +17 -0
  160. package/lib/types/models/chart-context/chart-field-selection.d.ts +3 -7
  161. package/lib/types/models/chart-data/build-chart-data.d.ts +1 -1
  162. package/lib/types/models/chart-host/chart-license.d.ts +5 -0
  163. package/lib/types/models/chart-model/chart-model.d.ts +3093 -48
  164. package/lib/types/models/chart-render/axes/axis-placement.d.ts +19 -0
  165. package/lib/types/models/chart-render/chart-field-button-layout.d.ts +51 -0
  166. package/lib/types/models/chart-render/converter/calendar-date-axis.d.ts +7 -0
  167. package/lib/types/models/chart-render/converter/render-spec-operators/date-axis-label-layout.d.ts +5 -0
  168. package/lib/types/models/chart-render/converter/render-spec-operators/error-bars.operator.d.ts +3 -0
  169. package/lib/types/models/chart-render/converter/render-spec-operators/grid-operator.d.ts +3 -0
  170. package/lib/types/models/chart-render/converter/render-spec-operators/legend-size.d.ts +24 -1
  171. package/lib/types/models/chart-render/converter/render-spec-operators/multi-level-category-axis-layout.d.ts +2 -1
  172. package/lib/types/models/chart-render/converter/render-spec-operators/pie-auto-label-layout.d.ts +4 -0
  173. package/lib/types/models/chart-render/converter/render-spec-operators/title-size.d.ts +10 -0
  174. package/lib/types/models/chart-render/converter/render-spec-operators/tool-tip-operator.d.ts +2 -0
  175. package/lib/types/models/chart-render/converter/render-spec-operators/tools.d.ts +6 -3
  176. package/lib/types/models/chart-render/converter/render-spec-operators/value-axis-scale.d.ts +9 -0
  177. package/lib/types/models/chart-render/echart-render-model/echart-render-engine.d.ts +1 -0
  178. package/lib/types/models/chart-render/format/pie-data-label.d.ts +9 -0
  179. package/lib/types/models/chart-render/style/chart-runtime-style.d.ts +2 -1
  180. package/lib/types/models/common/constants/default-chart-style.d.ts +2 -1
  181. package/lib/types/types.d.ts +142 -11
  182. package/lib/umd/facade.js +1 -1
  183. package/lib/umd/index.js +1 -1
  184. package/lib/umd/locale/ar-SA.js +1 -1
  185. package/lib/umd/locale/ca-ES.js +1 -1
  186. package/lib/umd/locale/de-DE.js +1 -1
  187. package/lib/umd/locale/en-US.js +1 -1
  188. package/lib/umd/locale/es-ES.js +1 -1
  189. package/lib/umd/locale/fa-IR.js +1 -1
  190. package/lib/umd/locale/fr-FR.js +1 -1
  191. package/lib/umd/locale/id-ID.js +1 -1
  192. package/lib/umd/locale/it-IT.js +1 -1
  193. package/lib/umd/locale/ja-JP.js +1 -1
  194. package/lib/umd/locale/ko-KR.js +1 -1
  195. package/lib/umd/locale/pl-PL.js +1 -1
  196. package/lib/umd/locale/pt-BR.js +1 -1
  197. package/lib/umd/locale/ru-RU.js +1 -1
  198. package/lib/umd/locale/sk-SK.js +1 -1
  199. package/lib/umd/locale/vi-VN.js +1 -1
  200. package/lib/umd/locale/zh-CN.js +1 -1
  201. package/lib/umd/locale/zh-HK.js +1 -1
  202. package/lib/umd/locale/zh-TW.js +1 -1
  203. package/package.json +7 -7
@@ -0,0 +1,19 @@
1
+ import type { registerLayout, registerPostUpdate } from 'echarts';
2
+ import type { IAxisOptions } from '../../../types';
3
+ declare const AXIS_PLACEMENT_META = "__univerAxisPlacement";
4
+ interface IAxisPlacement {
5
+ crossing?: IAxisOptions['crossing'];
6
+ tickLabelPosition?: IAxisOptions['tickLabelPosition'];
7
+ position: string;
8
+ }
9
+ interface IAxisOption {
10
+ position?: string;
11
+ [AXIS_PLACEMENT_META]?: IAxisPlacement;
12
+ }
13
+ /** Transient renderer metadata. The snapshot retains only the standard OOXML axis properties. */
14
+ export declare function setAxisPlacement(axis: IAxisOption, style: Pick<IAxisOptions, 'crossing' | 'tickLabelPosition'>, perpendicularInverse?: boolean): void;
15
+ export declare function getAxisOriginalPosition(axis: IAxisOption): string | undefined;
16
+ export declare function resolveAxisLabelPosition(position: string, labelPosition: IAxisOptions['tickLabelPosition'], perpendicularInverse?: boolean): string;
17
+ /** Run after scale/grid resolution so resizing and legend filtering use the actual Cartesian geometry. */
18
+ export declare function installAxisPlacementLayout(register: typeof registerLayout, afterUpdate: typeof registerPostUpdate): void;
19
+ export {};
@@ -0,0 +1,51 @@
1
+ import type { ECharts, graphic } from 'echarts';
2
+ import type { ChartRuntimeStyle, EChartSpec, IChartElementHit, IChartFieldButton } from '../../types';
3
+ export declare const CHART_FIELD_BUTTON_GROUP_NAME = "__chart_field_button__";
4
+ interface IFieldButtonLayout {
5
+ gap: number;
6
+ inset: number;
7
+ isRtl: boolean;
8
+ }
9
+ interface IFieldButtonOption {
10
+ id: string;
11
+ type?: string;
12
+ info?: {
13
+ chartElementHit?: IChartElementHit;
14
+ fieldButtonLayout?: IFieldButtonLayout;
15
+ };
16
+ }
17
+ interface IChartLayoutComponent {
18
+ option: {
19
+ elements?: IFieldButtonOption[];
20
+ };
21
+ get(path: string): unknown;
22
+ coordinateSystem?: {
23
+ getRect(): {
24
+ x: number;
25
+ y: number;
26
+ width: number;
27
+ height: number;
28
+ };
29
+ };
30
+ }
31
+ export interface IChartLayoutInstance {
32
+ getModel?(): {
33
+ getComponent(mainType: string): IChartLayoutComponent | undefined;
34
+ };
35
+ getViewOfComponentModel(model: IChartLayoutComponent): {
36
+ group: graphic.Group;
37
+ };
38
+ getWidth(): number;
39
+ getHeight(): number;
40
+ }
41
+ export declare function getChartFieldButtonSize(style: ChartRuntimeStyle): {
42
+ height: number;
43
+ gap: number;
44
+ };
45
+ export declare function getChartFieldButtonWidth(button: IChartFieldButton, style: ChartRuntimeStyle): number;
46
+ /** Reserve UI bands before ECharts lays out its axes and legend; ordinary charts are unchanged. */
47
+ export declare function reserveChartFieldButtonSpace(spec: EChartSpec, style: ChartRuntimeStyle): void;
48
+ export declare function resolveChartFieldButtonVisibleCount(widths: number[], availableWidth: number, overflowWidth: number, gap: number): number;
49
+ /** Graphic anchors use final component bounds, including containLabel, wrapping, and RTL axis layout. */
50
+ export declare function layoutChartFieldButtons(chart: ECharts): void;
51
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { IAxisOptions, IChartConfig } from '../../../types';
2
+ interface ICalendarDateAxis {
3
+ data: string[];
4
+ key: (timestamp: number) => string;
5
+ }
6
+ export declare function resolveCalendarDateAxis(category: IChartConfig['category'], axis: Pick<IAxisOptions, 'baseTimeUnit' | 'min' | 'max'> | undefined): ICalendarDateAxis | undefined;
7
+ export {};
@@ -1,8 +1,13 @@
1
1
  interface IDateAxisLabelSize {
2
2
  height: number;
3
3
  width: number;
4
+ fontHeight?: number;
4
5
  }
5
6
  type DateAxisLabelMeasurer = (text: string, font: string) => IDateAxisLabelSize;
7
+ export declare function calculateCalendarAxisInterval(labels: readonly string[], font: string, fontSize: number, rotate: number, axisWidth: number, measureText: DateAxisLabelMeasurer): number | undefined;
8
+ export declare function calculateCalendarYearTicks(dates: readonly number[], maxLabels: number, fixedMin?: number, fixedMax?: number, fixedRotation?: boolean): number[] | undefined;
6
9
  export declare function formatDateAxisLabel(value: number, pattern?: string): string;
10
+ export declare function calculateDateAxisMajorTicks(dates: readonly number[], step: number | undefined, unit?: 'days' | 'months' | 'years', fixedMin?: number, fixedMax?: number): number[] | undefined;
7
11
  export declare function calculateDateAxisLabelRotate(labels: readonly string[], font: string, labelSlotWidth: number, measureText: DateAxisLabelMeasurer): number;
12
+ export declare function calculateDateAxisSplitNumber(labels: readonly string[], font: string, rotate: number, axisWidth: number, measureText: DateAxisLabelMeasurer): number | undefined;
8
13
  export {};
@@ -0,0 +1,3 @@
1
+ import type { EChartRenderSpecOperator } from '../../../../types';
2
+ /** OOXML error amounts use the same series/data fields in every document host. */
3
+ export declare const errorBarsOperator: EChartRenderSpecOperator;
@@ -1,4 +1,5 @@
1
1
  import type { ChartRuntimeStyle, ChartStyle, EChartRenderSpecOperator, IChartConfig, IChartPlotArea } from '../../../../types';
2
+ import type { IChartRuntimeAdaptiveSize } from '../../../common/adaptive-size/chart-runtime-adaptive-size';
2
3
  export interface IResolvedCartesianGrid {
3
4
  left: number;
4
5
  right: number;
@@ -7,6 +8,8 @@ export interface IResolvedCartesianGrid {
7
8
  containLabel: boolean;
8
9
  }
9
10
  export declare function resolveAutomaticCartesianGrid(style: ChartRuntimeStyle, config: IChartConfig): IResolvedCartesianGrid;
11
+ /** Best-fit labels need the available plot rectangle, not the historical canvas-centered 55% pie. */
12
+ export declare function resolveBestFitPiePlotArea(style: ChartStyle, config: IChartConfig, chartLayoutPadding?: number, adaptiveSize?: IChartRuntimeAdaptiveSize): IChartPlotArea | undefined;
10
13
  /** Returns authored automatic geometry as a stable manual-editing seed. */
11
14
  export declare function resolveChartPlotAreaForEditing(style: ChartStyle, config: IChartConfig): IChartPlotArea;
12
15
  export declare const gridStyleOperator: EChartRenderSpecOperator;
@@ -1,4 +1,27 @@
1
+ import type { ChartStyle, IChartDataSeries, ILegendStyle } from '../../../../types';
1
2
  import type { IChartRuntimeAdaptiveSize } from '../../../common/adaptive-size/chart-runtime-adaptive-size';
2
3
  export declare const LEGEND_ICON_WIDTH: number;
4
+ export declare const LEGEND_ITEM_HEIGHT: number;
5
+ export declare const LEGEND_ITEM_GAP = 12;
6
+ export declare const LEGEND_COMPONENT_PADDING = 4;
7
+ export declare const LEGEND_ICON_TEXT_GAP = 5;
3
8
  export declare const MinLegendTextWidth = 48;
4
- export declare function getLegendTextWidthLimit(width?: number, layoutPadding?: number, adaptiveSize?: IChartRuntimeAdaptiveSize): number;
9
+ export declare function resolveLegendKeySize(size?: number): number | undefined;
10
+ export declare function resolveLegendItemMetrics(legend?: Pick<ILegendStyle, 'layout' | 'keyWidth' | 'keySize'>, adaptiveSize?: IChartRuntimeAdaptiveSize): {
11
+ itemWidth: number;
12
+ itemHeight: number;
13
+ itemGap: number;
14
+ };
15
+ export declare function getUniformLegendLayout(itemWidths: readonly number[], availableWidth: number, gap: number): {
16
+ itemWidth: number;
17
+ columns: number;
18
+ rows: number;
19
+ };
20
+ export declare function resolveHorizontalLegendLayout(textWidths: readonly number[], style: ChartStyle, layoutPadding: number, adaptiveSize?: IChartRuntimeAdaptiveSize): {
21
+ itemWidth: number;
22
+ columns: number;
23
+ rows: number;
24
+ };
25
+ export declare function getLegendSeries(series: IChartDataSeries[], order?: readonly number[]): IChartDataSeries[];
26
+ export declare function getLegendRowCount(itemWidths: readonly number[], availableWidth: number, gap: number): number;
27
+ export declare function getLegendTextWidthLimit(width?: number, layoutPadding?: number, adaptiveSize?: IChartRuntimeAdaptiveSize, isHorizontal?: boolean, keySize?: number): number;
@@ -1,5 +1,5 @@
1
1
  import type { ChartRuntimeStyle, EChartSpec, IChartConfig } from '../../../../types';
2
- export type MultiLevelCategoryAxisSide = 'bottom' | 'left' | 'right';
2
+ export type MultiLevelCategoryAxisSide = 'bottom' | 'top' | 'left' | 'right';
3
3
  export interface IMultiLevelCategoryAxis {
4
4
  type?: string;
5
5
  position?: string;
@@ -16,6 +16,7 @@ export interface IMultiLevelCategoryAxis {
16
16
  }
17
17
  export interface IMultiLevelCategoryAxisLayout {
18
18
  axis: IMultiLevelCategoryAxis;
19
+ axisStyle?: ChartRuntimeStyle['xAxis'];
19
20
  levelInnerDepths: number[];
20
21
  levelSizes: number[];
21
22
  side: MultiLevelCategoryAxisSide;
@@ -0,0 +1,4 @@
1
+ import type { PieSeriesOption } from 'echarts';
2
+ import type { ChartRuntimeStyle } from '../../../../types';
3
+ /** Office bestFit: keep a complete label inside only when its rectangle fits the sector. */
4
+ export declare function applyAutoPieLabelLayout(series: PieSeriesOption, style: ChartRuntimeStyle): void;
@@ -0,0 +1,10 @@
1
+ import type { ChartStyle } from '../../../../types';
2
+ interface ITitleTextLayout {
3
+ font: string;
4
+ width: number;
5
+ height: number;
6
+ lineHeight: number;
7
+ wrapWidth?: number;
8
+ }
9
+ export declare function getHorizontalTitleLayout(style: ChartStyle, fontSize: number, layoutPadding: number, kind?: 'title' | 'subtitle'): ITitleTextLayout;
10
+ export {};
@@ -13,12 +13,14 @@ interface ITooltipFormatterDataContext {
13
13
  invalidValueType: InvalidValueType;
14
14
  localeText: IChartLocaleTexts;
15
15
  isDateAxis: boolean | undefined;
16
+ isCalendarDateAxis: boolean;
16
17
  allSeriesStyle: ChartStyle['allSeriesStyle'];
17
18
  seriesStyleMap: ChartStyle['seriesStyleMap'];
18
19
  runtimeThemeColors: string[];
19
20
  relationNodeMap: Map<string, string>;
20
21
  negativeMap: Map<string, boolean>;
21
22
  sourceLabelMap: Map<string | number, string[]>;
23
+ categoryLabelMap: Map<string, string> | undefined;
22
24
  getRenderColor: (color: string) => string;
23
25
  }
24
26
  interface ITooltipFormatters {
@@ -1,11 +1,14 @@
1
1
  import type { ChartRuntimeStyle, EChartSeriesItem, EChartSpec, ILabelStyle } from '../../../../types';
2
2
  import type { ISpecGrid } from './operator-types';
3
- type PartialLabelStyle = Partial<Pick<ILabelStyle, 'visible' | 'color' | 'fontSize' | 'family' | 'italic' | 'bold' | 'underline' | 'strikethrough' | 'showMaxLabel' | 'showMinLabel'>>;
4
- export declare function applyLabelStyle(spec: Record<string, any>, path: string, labelStyle: PartialLabelStyle): void;
3
+ type PartialLabelStyle = Partial<Pick<ILabelStyle, 'visible' | 'color' | 'backgroundColor' | 'fontSize' | 'family' | 'italic' | 'bold' | 'underline' | 'strikethrough' | 'showMaxLabel' | 'showMinLabel'>>;
4
+ export declare function applyLabelStyle(spec: Record<string, any>, path: string, labelStyle: PartialLabelStyle, runtimeStyle?: ChartRuntimeStyle): void;
5
+ export declare function resolveLabelBackground(background: ILabelStyle['backgroundColor'], style?: ChartRuntimeStyle): import("./chart-color").ChartRenderColor | undefined;
5
6
  export declare function applyLineStyle(spec: Record<string, any>, path: string, labelStyle: PartialLabelStyle): void;
7
+ export declare function getDataLabelOffset(offset: ReadonlyArray<number | undefined> | undefined, style: ChartRuntimeStyle): [number, number] | undefined;
8
+ export declare function applyDataLabelOffsets(series: EChartSeriesItem): void;
6
9
  export declare function toArray<T = unknown>(value: T | T[]): T[];
7
10
  export declare function seriesForEach(series: EChartSpec['series'], func: (item: EChartSeriesItem, index: number) => void): void;
8
- export declare const getCategoryLabelVertical: (gridInfo: ISpecGrid, style: ChartRuntimeStyle) => number;
11
+ export declare const getCategoryLabelVertical: (gridInfo: ISpecGrid, style: ChartRuntimeStyle, fontSize: number) => number;
9
12
  export declare const getCategoryLabelHorizontal: (gridInfo: ISpecGrid, style: ChartRuntimeStyle, seriesCount: number, axisLabelMaxWidth?: number) => number;
10
13
  export declare const getIntegerValue: (value: number, digit?: number) => number;
11
14
  export declare const getGradientColor: (color: string, gradientFill: boolean) => string | {
@@ -0,0 +1,9 @@
1
+ import type { EChartSpec } from '../../../../types';
2
+ interface IValueAxisScale {
3
+ min: number;
4
+ max: number;
5
+ interval: number;
6
+ }
7
+ export declare function calculateValueAxisScale(dataMin: number, dataMax: number, fixedMin?: number, fixedMax?: number, fixedInterval?: number): IValueAxisScale | undefined;
8
+ export declare function getValueAxisExtent(spec: EChartSpec, dimension: 'x' | 'y', axisIndex: number): [number, number];
9
+ export {};
@@ -21,6 +21,7 @@ export declare class EChartRenderEngine extends Disposable implements EChartInst
21
21
  private _editOverlay;
22
22
  private readonly _emittedElementEventKeys;
23
23
  private _emittedElementEventKeysClearQueued;
24
+ private readonly _fieldButtonLayoutHandler;
24
25
  constructor();
25
26
  mount(id: string | HTMLElement): void;
26
27
  resize(echartsProviderOrOptions?: any | IChartRenderRuntimeOptions): void;
@@ -0,0 +1,9 @@
1
+ export interface IPieDataLabelParams {
2
+ name?: string;
3
+ value: number;
4
+ percent: number;
5
+ data?: {
6
+ formattedValue?: string;
7
+ };
8
+ }
9
+ export declare function formatPieDataLabel(params: IPieDataLabelParams, contentType: number, valueScale: number, valueFormat?: string): string;
@@ -1,7 +1,8 @@
1
- import type { ChartRuntimeStyle, ChartStyle } from '../../../types';
1
+ import type { ChartRuntimeStyle, ChartStyle, ILabelStyle } from '../../../types';
2
2
  import { ChartTypeBits } from '../../../enum';
3
3
  export declare const MIN_CHART_RUNTIME_FONT_SIZE = 10;
4
4
  export declare const MIN_CHART_RUNTIME_LINE_WIDTH = 1;
5
+ export declare function resolveChartFontFamily(style: Pick<ChartStyle, 'fontFamily' | 'eastAsiaFontFamily'>, label?: Partial<Pick<ILabelStyle, 'family' | 'eastAsiaFontFamily'>>): string;
5
6
  /**
6
7
  * Converts persisted semantic chart style buckets into transient render buckets.
7
8
  *
@@ -1,5 +1,6 @@
1
1
  import type { ChartStyle, IChartGaugeSpec } from '../../../types';
2
- import { AreaLineStyle, AxisAlignEnum, BarShape, ChartBorderDashType, ChartTypeBits, InvalidValueType, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, SelectModeEnum, SeriesLabelPosition, TextAlign, TitlePositionEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from '../../../enum';
2
+ import { AreaLineStyle, AxisAlignEnum, BarShape, ChartBorderDashType, ChartTypeBits, InvalidValueType, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, ScatterLineType, SelectModeEnum, SeriesLabelPosition, TextAlign, TitlePositionEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from '../../../enum';
3
+ export declare const DEFAULT_SCATTER_LINE_TYPE = ScatterLineType.None;
3
4
  export declare const MODERN_GAUGE_STYLE: {
4
5
  readonly mode: "modern";
5
6
  readonly scale: {
@@ -4,13 +4,13 @@ import type { Observable } from 'rxjs';
4
4
  import type { ChartColor, IChartLinearGradient } from './chart-builder/chart-color';
5
5
  import type { IChartPieCompositeSpec, PieCompositeMarkRole, PieCompositePlot } from './chart-builder/chart-types';
6
6
  import type { IChartDataAggregation } from './chart-data-aggregation';
7
- import type { AreaLineStyle, AxisAlignEnum, AxisValueType, BarShape, CategoryType, ChartAxisDimension, ChartBorderDashType, ChartChordFocusMode, ChartChordLabelPosition, ChartChordRibbonColorMode, ChartGaugeMode, ChartGaugePointerShape, ChartHistogramBinKind, ChartMarkLineLabelPosition, ChartSemanticAxis, ChartSourceDataTypeEnum, ChartSunburstLabelPosition, ChartTrendlineType, ChartTypeBits, ChartWaterfallPointRole, DataOrientation, HistogramBinningMode, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, RelationChartLayoutEnum, SelectModeEnum, SeriesLabelPosition, TitlePositionEnum, TreemapParentLabelLayout, WaterfallSeriesTypeEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from './enum';
7
+ import type { AreaLineStyle, AxisAlignEnum, AxisValueType, BarShape, CategoryType, ChartAxisDimension, ChartBorderDashType, ChartChordFocusMode, ChartChordLabelPosition, ChartChordRibbonColorMode, ChartGaugeMode, ChartGaugePointerShape, ChartHistogramBinKind, ChartMarkLineLabelPosition, ChartSemanticAxis, ChartSourceDataTypeEnum, ChartSunburstLabelPosition, ChartTrendlineType, ChartTypeBits, ChartWaterfallPointRole, DataOrientation, HistogramBinningMode, InvalidValueType, IRuntimeAxisPosition, IRuntimeAxisPriority, LabelAlignEnum, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, RelationChartLayoutEnum, ScatterLineType, SelectModeEnum, SeriesLabelPosition, TitlePositionEnum, TreemapParentLabelLayout, WaterfallSeriesTypeEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from './enum';
8
8
  import type { ICartesianPointData } from './models/chart-data/internal/cartesian-point-data';
9
9
  import type { IChartRuntimeAdaptiveSize } from './models/common/adaptive-size/chart-runtime-adaptive-size';
10
10
  import type { IChartLocaleTexts } from './models/common/chart-locale-texts';
11
11
  import type { IEchartTheme } from './models/common/theme/build-in-theme/types';
12
12
  import type { IWordCloudRenderConfig } from './wordcloud-chart/word-cloud-render-config';
13
- export type DeepPartial<T> = T extends IChartLinearGradient ? T : T extends Record<string, any> ? T extends any[] ? T : {
13
+ export type DeepPartial<T> = T extends IChartLinearGradient | IChartLabelPattern ? T : T extends Record<string, any> ? T extends any[] ? T : {
14
14
  [key in keyof T]+?: DeepPartial<T[key]>;
15
15
  } : T;
16
16
  /** Recursive patch shape that permits `null` at every field and treats arrays as atomic values. */
@@ -53,6 +53,8 @@ export interface IUniverDataSet {
53
53
  sourceLabels?: string[][];
54
54
  /** Runtime indexes of hidden `source` fields; omission means every field is visible. */
55
55
  hiddenFieldIndexes?: number[];
56
+ /** Runtime item offsets hidden by the worksheet, indexed by physical source field. Not persisted. */
57
+ hiddenItemIndexes?: number[][];
56
58
  /**
57
59
  * Explicit category grouping topology. Absence enables adjacent path-prefix inference;
58
60
  * an empty array explicitly keeps repeated adjacent values as separate groups.
@@ -128,6 +130,7 @@ export interface IChartValueLabelSpec {
128
130
  }
129
131
  /** Persisted leaf-label style supported by Treemap charts. */
130
132
  export interface IChartTreemapLabelSpec extends IChartValueLabelSpec {
133
+ backgroundColor?: ILabelStyle['backgroundColor'];
131
134
  visible?: boolean;
132
135
  contentType?: LabelContentType;
133
136
  color?: string;
@@ -143,6 +146,7 @@ export interface IChartTreemapSpec {
143
146
  }
144
147
  /** Persisted semantic label style supported by Sunburst charts. */
145
148
  export interface IChartSunburstLabelSpec extends IChartValueLabelSpec {
149
+ backgroundColor?: ILabelStyle['backgroundColor'];
146
150
  visible?: boolean;
147
151
  contentType?: LabelContentType;
148
152
  position?: ChartSunburstLabelPosition;
@@ -378,11 +382,21 @@ export interface IChartSunburstData {
378
382
  * Consumers derive labels from the current dataset, so title updates do not require a context rebuild.
379
383
  */
380
384
  export interface IChartContext {
385
+ /** Plot only visible worksheet data. Absence preserves the historical true default. */
386
+ plotVisibleOnly?: boolean;
381
387
  categoryType?: CategoryType;
382
388
  /** Ordered selected Label field indexes. */
383
389
  categoryIndexes?: number[];
390
+ /** Ordered category fields per series value-field index; omitted series inherit the shared category. */
391
+ seriesToCategory?: Record<number, number[]>;
384
392
  /** Whether ordered category indexes should render as one root-to-leaf category axis. */
385
393
  multiLevelCategoryAxis?: boolean;
394
+ /** Runtime-only opt-in for category hierarchy hit targets and expand/collapse controls. */
395
+ categoryHierarchyInteraction?: boolean;
396
+ /** Runtime-only visibility of the global category hierarchy expand/collapse controls. */
397
+ categoryHierarchyControls?: boolean;
398
+ /** Runtime-only interactive field buttons supplied by a host integration. */
399
+ fieldButtons?: IChartFieldButton[];
386
400
  /**
387
401
  * the flag to indicate whether the chart use date axis, only all category data is date type, the chart will use date axis, if there are some string type data, the chart will use category axis even the flag is true.
388
402
  */
@@ -523,9 +537,12 @@ export interface IChartDataCategorySegment {
523
537
  endIndex: number;
524
538
  }
525
539
  export interface IChartDataSeries {
540
+ /** Stable identity derived from the source dimension when one is available. */
541
+ id?: string;
526
542
  index: number;
527
543
  name: string;
528
544
  items: IChartDataItem[];
545
+ category?: IChartDataCategory;
529
546
  }
530
547
  export interface IChartDataItem {
531
548
  value: OptionDataValue;
@@ -548,6 +565,12 @@ export interface IChartRuntimeContext {
548
565
  addWatermark?: boolean;
549
566
  /** Runtime-only extra inset reserved by host adapters around chart content. */
550
567
  layoutInset?: number;
568
+ /** Runtime-only opt-in for category hierarchy hit targets and expand/collapse controls. */
569
+ categoryHierarchyInteraction?: boolean;
570
+ /** Runtime-only visibility of the global category hierarchy expand/collapse controls. */
571
+ categoryHierarchyControls?: boolean;
572
+ /** Runtime-only interactive field buttons supplied by a host integration. */
573
+ fieldButtons?: IChartFieldButton[];
551
574
  /**
552
575
  * The function to transform the color to the render color with considering the system theme is dark mode or not.
553
576
  * @param {string} color - The color to be rendered.
@@ -562,14 +585,25 @@ export interface IChartRuntimeContext {
562
585
  localeTexts: IChartLocaleTexts;
563
586
  updateAdaptiveSizeFromDomRender?(chartWidth: number): void;
564
587
  }
588
+ export interface IChartLabelPattern {
589
+ type: 'pattern';
590
+ /** OOXML ST_PresetPatternVal token. */
591
+ preset: string;
592
+ foregroundColor: string;
593
+ backgroundColor: string;
594
+ }
565
595
  export interface ILabelStyle {
566
596
  visible: boolean;
567
597
  content: string;
568
598
  fontSize: number;
569
599
  color: string;
600
+ /** DrawingML label shape fill, independent of the text color. Absent keeps the host default. */
601
+ backgroundColor?: ChartColor | IChartLabelPattern;
570
602
  align: LabelAlignEnum;
571
603
  bold: boolean;
572
604
  family: string;
605
+ /** Explicit East Asian fallback, separate from the Latin font family. */
606
+ eastAsiaFontFamily?: string;
573
607
  strikethrough: boolean;
574
608
  italic: boolean;
575
609
  underline: boolean;
@@ -578,9 +612,11 @@ export interface ILabelStyle {
578
612
  showMaxLabel?: boolean;
579
613
  showMinLabel?: boolean;
580
614
  rotate?: number;
615
+ /** Fit category-axis labels by rotating before reducing their display frequency. */
616
+ autoRotate?: boolean;
581
617
  }
582
618
  export interface IChartTitleStyle extends Omit<ILabelStyle, 'visible'> {
583
- /** PowerPoint manual title anchor, as chart-relative edge coordinates. */
619
+ /** Authored title anchor, as chart-relative edge coordinates. */
584
620
  manualLayout?: {
585
621
  left: number;
586
622
  top: number;
@@ -590,8 +626,22 @@ export interface ILegendStyle {
590
626
  position?: LegendPositionEnum;
591
627
  label?: Omit<ILabelStyle, 'visible' | 'align' | 'content'>;
592
628
  selectMode?: SelectModeEnum;
593
- /** Allow a horizontal legend to flow onto multiple rows instead of using pagination. */
629
+ /** Allow a horizontal legend to wrap into column-aligned rows instead of using pagination. */
594
630
  wrap?: boolean;
631
+ /** Authored legend-key height and default width in CSS pixels; absent keeps native dimensions. */
632
+ keySize?: number;
633
+ /** Explicit key width for rectangular or line keys; absent keeps square authored keys. */
634
+ keyWidth?: number;
635
+ /** Combination legend-only series indexes; unlisted series retain their relative order after these entries. */
636
+ seriesOrder?: number[];
637
+ /** Authored legend metrics; omitted values retain the adaptive defaults. */
638
+ layout?: {
639
+ itemWidth?: number;
640
+ itemHeight?: number;
641
+ itemGap?: number;
642
+ /** Align multi-row horizontal entries in equally sized columns; single rows keep natural spacing. */
643
+ uniformColumns?: boolean;
644
+ };
595
645
  }
596
646
  export interface IGridLineStyle {
597
647
  visible: boolean;
@@ -600,6 +650,15 @@ export interface IGridLineStyle {
600
650
  dashType?: ChartBorderDashType;
601
651
  }
602
652
  export interface IAxisOptions {
653
+ /** Axis visibility (inverse of OOXML c:delete); authored gridlines and titles remain independent. */
654
+ visible?: boolean;
655
+ /**
656
+ * Where this axis crosses the perpendicular axis (OOXML crosses / crossesAt).
657
+ * Numbers use the crossed axis's value units, date serial days, or one-based categories (MS-OI29500).
658
+ */
659
+ crossing?: 'autoZero' | 'min' | 'max' | number;
660
+ /** OOXML tickLblPos; independent of axis-line visibility and crossing. */
661
+ tickLabelPosition?: 'nextTo' | 'low' | 'high' | 'none';
603
662
  lineVisible: boolean;
604
663
  label: Omit<ILabelStyle, 'align' | 'content'>;
605
664
  lineStyle: IGridLineStyle;
@@ -614,38 +673,67 @@ export interface IAxisOptions {
614
673
  reverse?: boolean;
615
674
  min?: number | null;
616
675
  max?: number | null;
676
+ /** Positive interval between major ticks on a numeric value axis; absent means automatic. */
677
+ majorUnit?: number;
678
+ /** Office-imported value-axis bounds; omitted keeps the native range-focused defaults. */
679
+ autoScale?: 'office';
680
+ /** Calendar granularity of an imported date axis; absent retains elapsed-time behavior. */
681
+ baseTimeUnit?: 'days' | 'months' | 'years';
682
+ /** OOXML majorTimeUnit; distinct from the date axis's base granularity. */
683
+ majorTimeUnit?: 'days' | 'months' | 'years';
617
684
  format?: string;
618
685
  }
619
686
  export interface ISeriesLabelStyle extends ILabelStyle {
620
687
  contentType: number;
621
688
  position: SeriesLabelPosition;
622
689
  format?: string;
690
+ /** Numeric format overrides keyed by zero-based category index. */
691
+ pointFormats?: Record<number, string>;
623
692
  /** Per-category text imported from OOXML data-label ranges. */
624
693
  customValues?: Record<number, string>;
694
+ /** Allow a leader line when a point label has been moved from its default position. */
695
+ showLabelLine?: boolean;
696
+ labelLineStyle?: Partial<Pick<ISeriesStyle['border'], 'color' | 'width' | 'opacity'>>;
625
697
  }
626
698
  export interface IPieLabelStyle extends Omit<ILabelStyle, 'align' | 'content'> {
627
699
  contentType: number;
628
700
  position: PieLabelPosition;
629
701
  format?: string;
702
+ /** Numeric format overrides keyed by zero-based source category index. */
703
+ pointFormats?: Record<number, string>;
630
704
  }
631
705
  export interface IPointStyle {
706
+ /** Hide an unpainted imported marker without discarding its shape or size. */
707
+ visible?: boolean;
632
708
  shape: LinePointShape;
633
709
  size: number;
634
710
  color: Nullable<string>;
635
711
  }
636
712
  export interface IDataPointStyle extends Omit<IPointStyle, 'color'> {
713
+ /** Per-point stroke overrides; absent properties inherit the series border. */
714
+ border?: Partial<ISeriesStyle['border']>;
715
+ /** Per-point label overrides; omitted fields inherit the series or chart label. */
716
+ label?: Partial<ISeriesLabelStyle> & {
717
+ /** Displacement from the default label position, as chart width/height fractions. */
718
+ offset?: [number, number];
719
+ };
637
720
  color: Nullable<ChartColor>;
638
721
  /** Fill opacity for this data point, from 0 (transparent) to 1 (opaque). */
639
722
  fillOpacity?: number;
640
723
  }
641
724
  export interface ISeriesStyle {
642
- chartType?: ChartTypeBits.Line | ChartTypeBits.Column | ChartTypeBits.ColumnStacked | ChartTypeBits.Area | ChartTypeBits.AreaStacked;
725
+ scatterLine?: ScatterLineType;
726
+ chartType?: ChartTypeBits.Line | ChartTypeBits.Scatter | ChartTypeBits.Bar | ChartTypeBits.BarStacked | ChartTypeBits.Column | ChartTypeBits.ColumnStacked | ChartTypeBits.Area | ChartTypeBits.AreaStacked;
643
727
  /** Compatibility switch for placing this series on the secondary vertical axis. It does not change the yAxis/rightYAxis option bucket semantics. */
644
728
  rightYAxis?: boolean;
729
+ /** Explicit line-series smoothing; overrides chart-level smoothing when present. */
730
+ smooth?: boolean;
645
731
  color: Nullable<ChartColor>;
646
732
  /** Fill opacity for this series, from 0 (transparent) to 1 (opaque). */
647
733
  fillOpacity: number;
648
734
  border: {
735
+ /** Hides the series stroke without discarding its authored width or color. */
736
+ visible?: boolean;
649
737
  opacity: number;
650
738
  color: Nullable<string>;
651
739
  width: number;
@@ -669,9 +757,11 @@ export interface ISeriesStyle {
669
757
  };
670
758
  }
671
759
  export type RightYAxisOptions = Omit<IAxisOptions, 'reverse'>;
672
- export interface IAllSeriesStyle extends Pick<ISeriesStyle, 'border' | 'label' | 'rightYAxis' | 'point' | 'color' | 'fillOpacity' | 'waterfall'> {
760
+ export interface IAllSeriesStyle extends Pick<ISeriesStyle, 'border' | 'label' | 'rightYAxis' | 'point' | 'color' | 'fillOpacity' | 'waterfall' | 'scatterLine'> {
673
761
  }
674
762
  export interface ITrendLine {
763
+ /** Stable source identity. `seriesIndex` remains the fallback for legacy snapshots. */
764
+ seriesId?: string;
675
765
  seriesIndex: number;
676
766
  type: ChartTrendlineType;
677
767
  name: string;
@@ -748,6 +838,25 @@ export interface IChartPlotArea {
748
838
  width: number;
749
839
  height: number;
750
840
  }
841
+ export interface IChartErrorBars {
842
+ /** Data-source field index of the owning value series, not its display order. */
843
+ seriesIndex: number;
844
+ direction: 'x' | 'y';
845
+ type: 'both' | 'plus' | 'minus';
846
+ valueType: 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr' | 'cust';
847
+ value?: number;
848
+ noEndCap?: boolean;
849
+ /** Custom error amounts remain editable data-source fields. */
850
+ plusIndex?: number;
851
+ minusIndex?: number;
852
+ line?: {
853
+ color?: string;
854
+ width?: number;
855
+ opacity?: number;
856
+ visible?: boolean;
857
+ dashType?: ChartBorderDashType;
858
+ };
859
+ }
751
860
  export interface IChartStyle {
752
861
  width: number;
753
862
  height: number;
@@ -761,18 +870,21 @@ export interface IChartStyle {
761
870
  fontSize: number;
762
871
  fontColor: string;
763
872
  fontFamily: string;
873
+ eastAsiaFontFamily?: string;
764
874
  borderColor: Nullable<string>;
765
875
  borderWidth: number;
766
876
  /** Omission keeps renderer-owned automatic layout. */
767
877
  plotArea?: IChartPlotArea;
878
+ /** Imported PowerPoint Cartesian edge/label spacing; the inner plot remains automatic. */
879
+ automaticLayout?: 'powerpoint';
768
880
  titles: {
769
881
  title: IChartTitleStyle;
770
882
  subtitle: IChartTitleStyle;
771
- xAxisTitle: Omit<ILabelStyle, 'visible'>;
883
+ xAxisTitle: IChartTitleStyle;
772
884
  /** Primary vertical axis title. RTL may render it on the physical right, but it is still persisted here. */
773
- yAxisTitle: Omit<ILabelStyle, 'visible'>;
885
+ yAxisTitle: IChartTitleStyle;
774
886
  /** Secondary vertical axis title. */
775
- rightYAxisTitle: Omit<ILabelStyle, 'visible'>;
887
+ rightYAxisTitle: IChartTitleStyle;
776
888
  titlePosition: TitlePositionEnum;
777
889
  };
778
890
  legend: ILegendStyle;
@@ -788,6 +900,7 @@ export interface IChartStyle {
788
900
  bar: IBarStyle;
789
901
  bubble: IChartBubbleStyle;
790
902
  trendlines: ITrendLine[];
903
+ errorBars?: IChartErrorBars[];
791
904
  pie: {
792
905
  composite?: IChartPieCompositeSpec;
793
906
  /** Clockwise degrees from 12 o'clock, matching the authored chart semantic. */
@@ -803,6 +916,8 @@ export interface IChartStyle {
803
916
  isHalfPie: boolean;
804
917
  rosePie: boolean;
805
918
  showLabelLine: boolean;
919
+ /** Authored leader-line appearance; visibility remains owned by showLabelLine. */
920
+ labelLineStyle?: Partial<Pick<ISeriesStyle['border'], 'color' | 'width' | 'opacity'>>;
806
921
  valueScale: number;
807
922
  /** Persisted sparse slice overrides. Slice data remains owned by the chart data source. */
808
923
  sliceStyles: {
@@ -893,7 +1008,9 @@ export interface IChartSnapshot {
893
1008
  dataAggregation?: IChartDataAggregation;
894
1009
  }
895
1010
  /** Persisted chart field selection accepted by the snapshot reader. */
896
- export interface IChartSnapshotContext extends Pick<IChartContext, 'categoryIndexes' | 'multiLevelCategoryAxis' | 'seriesIndexes' | 'useDateAxis' | 'histogram'> {
1011
+ export interface IChartSnapshotContext extends Pick<IChartContext, 'categoryIndexes' | 'seriesToCategory' | 'multiLevelCategoryAxis' | 'seriesIndexes' | 'useDateAxis' | 'histogram' | 'plotVisibleOnly'> {
1012
+ /** Historical binding name accepted only at the context compatibility boundary. */
1013
+ seriesCategoryIndexes?: Record<number, number[]>;
897
1014
  /** Historical snapshot field decoded only when `categoryIndexes` is absent. */
898
1015
  categoryIndex?: number;
899
1016
  }
@@ -1052,7 +1169,14 @@ export interface IChartRenderRuntimeOptions {
1052
1169
  width?: number;
1053
1170
  height?: number;
1054
1171
  }
1055
- export type ChartElementKind = 'blank' | 'chartArea' | 'title' | 'subtitle' | 'xAxisTitle' | 'yAxisTitle' | 'rightYAxisTitle' | 'xAxisLabel' | 'yAxisLabel' | 'rightYAxisLabel' | 'xAxisLine' | 'yAxisLine' | 'rightYAxisLine' | 'gridLine' | 'tick' | 'legend' | 'legendItem' | 'mark' | 'series' | 'dataPoint' | 'dataLabel';
1172
+ export type ChartElementKind = 'blank' | 'chartArea' | 'title' | 'subtitle' | 'xAxisTitle' | 'yAxisTitle' | 'rightYAxisTitle' | 'xAxisLabel' | 'yAxisLabel' | 'rightYAxisLabel' | 'xAxisLine' | 'yAxisLine' | 'rightYAxisLine' | 'gridLine' | 'tick' | 'legend' | 'legendItem' | 'mark' | 'series' | 'dataPoint' | 'dataLabel' | 'categoryHierarchyExpandControl' | 'categoryHierarchyCollapseControl' | 'fieldButton' | 'fieldButtonOverflow';
1173
+ export type ChartFieldButtonRole = 'filter' | 'series' | 'category';
1174
+ export interface IChartFieldButton {
1175
+ fieldId: string;
1176
+ label: string;
1177
+ role: ChartFieldButtonRole;
1178
+ filtered?: boolean;
1179
+ }
1056
1180
  export interface IChartElementBounds {
1057
1181
  left: number;
1058
1182
  top: number;
@@ -1079,6 +1203,11 @@ export interface IChartElementHit {
1079
1203
  seriesId?: string;
1080
1204
  seriesName?: string;
1081
1205
  dataIndex?: number;
1206
+ categoryLevel?: number;
1207
+ categoryStartIndex?: number;
1208
+ categoryEndIndex?: number;
1209
+ fieldId?: string;
1210
+ fieldRole?: ChartFieldButtonRole;
1082
1211
  /** Stable runtime identity for an aggregated semantic mark. Renderer indexes are intentionally omitted. */
1083
1212
  semanticId?: string;
1084
1213
  semanticKind?: 'node' | 'link';
@@ -1126,6 +1255,8 @@ export type EChartSpec = EChartsOption;
1126
1255
  export type EChartSeriesItem = ExtractArrayItem<EChartSpec['series']> & {
1127
1256
  formattedData?: string[];
1128
1257
  rawData?: number[];
1258
+ /** Source indexes after date-axis filtering and sorting, for point-level styles and labels. */
1259
+ sourceDataIndices?: number[];
1129
1260
  seriesId: string;
1130
1261
  };
1131
1262
  export type EChartInstance = IChartInstance<EChartSpec>;