Skip to content

Commit 2e4b66a

Browse files
committed
docs: update pivotchart api
1 parent 1b6c315 commit 2e4b66a

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

docs/assets/option/en/table/pivotChart.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ export interface PivotChartConstructorOptions {
205205
right?: LineAxisAttributes['labelHoverOnAxis'];
206206
top?: LineAxisAttributes['labelHoverOnAxis'];
207207
};
208+
selectedStateFilter?: (datum: any) => boolean;
209+
selectedReverseStateFilter?: (datum: any) => boolean;
210+
inBrushStateFilter?: (datum: any) => boolean;
211+
outOfBrushStateFilter?: (datum: any) => boolean;
212+
listenBrushChange?: boolean;
213+
brushChangeDelay?: number;
214+
clearChartState?: () => void;
208215
};
209216
}
210217
```
@@ -213,6 +220,13 @@ export interface PivotChartConstructorOptions {
213220
- heightLimitToShowTooltipForEdgeRow: for bar chart, line chart, etc., when displaying tooltip for an entire column, it is detected that the first row and the last row may be occluded by scrolling and only a part of it is displayed. The minimum height allowed to display the tooltip is detected.
214221
- widthLimitToShowTooltipForEdgeColumn: for horizontal bar chart, when displaying tooltip for an entire row, it is detected that the first column and the last column may be occluded by scrolling and only a part of it is displayed. The minimum width allowed to display the tooltip is detected.
215222
- labelHoverOnAxis: the related configuration of the floating label label on the axis when the mouse hovers over the perspective chart. Supports configuration for the left, right, top, and bottom four directions.
223+
- selectedStateFilter: the filter function for the high-light state of the clicked element in the associated chart
224+
- selectedReverseStateFilter: the filter function for the reverse high-light state of the clicked element in the associated chart
225+
- inBrushStateFilter: the filter function for the brush high-light state of the element in the associated chart
226+
- outOfBrushStateFilter: the filter function for the out of brush high-light state of the element in the associated chart
227+
- listenBrushChange: whether to listen to the brushChange event, default is false
228+
- brushChangeDelay: the delay time for the brushChange event. The throttle is used to prevent frequent triggering of the chart, default is 100 milliseconds
229+
- clearChartState: the function to clear the chart state
216230

217231
Example configuration:
218232
```

docs/assets/option/zh/table/pivotChart.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ columnWidthConfigForRowHeader": [
194194

195195
```
196196
export interface PivotChartConstructorOptions {
197+
...other options,
197198
chartDimensionLinkage?: {
198199
showTooltip?: boolean;
199200
heightLimitToShowTooltipForEdgeRow?: number;
@@ -204,6 +205,20 @@ export interface PivotChartConstructorOptions {
204205
right?: LineAxisAttributes['labelHoverOnAxis'];
205206
top?: LineAxisAttributes['labelHoverOnAxis'];
206207
};
208+
/** 关联图表中点击图元的高亮状态的过滤函数 */
209+
selectedStateFilter?: (datum: any) => boolean;
210+
/** 关联图表中点击图元反选的高亮状态的过滤函数 */
211+
selectedReverseStateFilter?: (datum: any) => boolean;
212+
/** 关联图表中brush框选中状态的过滤函数 默认是严格框选的图元有inBrush的高亮状态 */
213+
inBrushStateFilter?: (datum: any) => boolean;
214+
/** 对应上面inBrushStateFilter,框选范围外的图元状态的过滤函数 */
215+
outOfBrushStateFilter?: (datum: any) => boolean;
216+
/** 是否监听brushChange事件,默认false 不监听 */
217+
listenBrushChange?: boolean;
218+
/** brushChange事件处理的延迟时间。节流防止频繁触发卡顿,默认100毫秒 */
219+
brushChangeDelay?: number;
220+
/** 清除图表状态的函数 */
221+
clearChartState?: () => void;
207222
};
208223
}
209224
```
@@ -212,6 +227,13 @@ export interface PivotChartConstructorOptions {
212227
- heightLimitToShowTooltipForEdgeRow: 针对条形图折线图等, 整列显示tooltip时,第一行及最后一行可能被滚动遮挡只显示一部分的情况下,检测该图表显示出来至少多高 可允许显示tooltip。
213228
- widthLimitToShowTooltipForEdgeColumn: 针对横向条形图,整行显示tooltip时,第一列及最后一列可能被滚动遮挡只显示一部分的情况下,检测该图表显示出来至少多宽 可允许显示tooltip。
214229
- labelHoverOnAxis: 鼠标hover到透视图上时,轴上悬浮label标签的相关配置。支持left、right、top、bottom四个方向的配置。
230+
- selectedStateFilter: 关联图表中点击图元的高亮状态的过滤函数
231+
- selectedReverseStateFilter: 关联图表中点击图元反选的高亮状态的过滤函数
232+
- inBrushStateFilter: 关联图表中brush框选中状态的过滤函数 默认是严格框选的图元有inBrush的高亮状态
233+
- outOfBrushStateFilter: 对应上面inBrushStateFilter,框选范围外的图元状态的过滤函数
234+
- listenBrushChange: 是否监听brushChange事件,默认false 不监听
235+
- brushChangeDelay: brushChange事件处理的延迟时间。节流防止频繁触发卡顿,默认100毫秒
236+
- clearChartState: 清除图表状态的函数
215237

216238
举例配置:
217239
```

0 commit comments

Comments
 (0)