Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vchart",
"comment": "refactor: brush interactive. close#3765 & #3262 & #2802 & #3885",
"type": "none"
}
],
"packageName": "@visactor/vchart"
}
234 changes: 117 additions & 117 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion docs/assets/option/en/component/brush.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ The size threshold of the brush selection box. Supported since version `1.2.0`.

Whether to turn on the brush to remove the drill. Effective from version 0.10.0.

## zoomWhenEmpty(boolean) = false
### zoomWhenEmpty(boolean) = false

Whether to drill down when empty data is retrieved. Effective from version 1.12.2.

Expand All @@ -123,6 +123,19 @@ When updating the dataZoom range, expand the range, expand the range by percenta
2. When scaling the continuous axis: The scatter plot is positioned according to the scatter point center. If updated strictly according to the center range, the scatter points will exceed the canvas.
3. When scaling discrete axes: You do not want to strictly follow the filtered data range, but you want to still have space at both ends after scaling.

### markTypeFilter(string[])

Mark types that do not need to be operated by brush. (For example, for line charts, if you only want to select point elements but not line elements, you can configure `markTypeFilter: ['line']`)
Effective since version 1.13.9.

### onBrushEnd(Function)

Custom brush event, trigger time: selection ends.
Return true to clear the brush.
Effective since version 1.13.9.

`onBrushEnd: (e: any) => boolean;`

### style(Object)

Selection box style configuration.
Expand Down
15 changes: 14 additions & 1 deletion docs/assets/option/zh/component/brush.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ brush 选框的大小阈值。自 `1.2.0` 版本开始支持。

是否开启刷取下钻。自 0.10.0 版本生效。

## zoomWhenEmpty(boolean) = false
### zoomWhenEmpty(boolean) = false

刷取到空数据时, 是否下钻。自 1.12.2 版本生效。

Expand All @@ -124,6 +124,19 @@ brush 选框的大小阈值。自 `1.2.0` 版本开始支持。
2. 缩放连续轴时: 散点图按照散点中心定位, 如果严格按照中心范围更新,会出现散点超出画布的现象
3. 缩放离散轴时: 不希望严格按照筛选的数据范围缩放, 而是希望缩放后两端仍有空间

### markTypeFilter(string[])

不需要被brush操作的mark类型。(比如对于折线图而言,只想框选点图元,而不想框选线图元,则可以配置`markTypeFilter: ['line']`)
自 1.13.9 版本生效。

### onBrushEnd(Function)

自定义brush事件, 触发时机: 框选结束。
返回true, 则清空brush。
自 1.13.9 版本生效。

`onBrushEnd: (e: any) => boolean;`

### style(Object)

选框样式配置。
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"@visactor/vchart-theme": "~1.6.6",
"@visactor/vmind": "1.2.4-alpha.5",
"@visactor/vutils": "~0.19.5",
"@visactor/vrender": "0.22.8",
"@visactor/vrender-kits": "0.22.8",
"@visactor/vgrammar": "0.16.4",
"@visactor/vrender": "0.22.10",
"@visactor/vrender-kits": "0.22.10",
"@visactor/vgrammar": "0.16.6",
"@visactor/vtable": "1.12.0",
"@visactor/vtable-editors": "1.12.0",
"@visactor/vtable-gantt": "1.12.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/openinula-vchart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"dependencies": {
"@visactor/vchart": "workspace:1.13.8",
"@visactor/vutils": "~0.19.5",
"@visactor/vrender-core": "0.22.8",
"@visactor/vrender-kits": "0.22.8",
"@visactor/vgrammar-core": "0.16.4",
"@visactor/vrender-core": "0.22.10",
"@visactor/vrender-kits": "0.22.10",
"@visactor/vgrammar-core": "0.16.6",
"react-is": "^18.2.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/react-vchart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"dependencies": {
"@visactor/vchart": "workspace:1.13.8",
"@visactor/vutils": "~0.19.5",
"@visactor/vrender-core": "0.22.8",
"@visactor/vrender-kits": "0.22.8",
"@visactor/vgrammar-core": "0.16.4",
"@visactor/vrender-core": "0.22.10",
"@visactor/vrender-kits": "0.22.10",
"@visactor/vgrammar-core": "0.16.6",
"react-is": "^18.2.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/vchart-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"start": "ts-node __tests__/runtime/browser/scripts/initVite.ts && vite serve __tests__/runtime/browser"
},
"dependencies": {
"@visactor/vrender-core": "0.22.8",
"@visactor/vrender-kits": "0.22.8",
"@visactor/vrender-components": "0.22.8",
"@visactor/vgrammar-core": "0.16.4",
"@visactor/vrender-core": "0.22.10",
"@visactor/vrender-kits": "0.22.10",
"@visactor/vrender-components": "0.22.10",
"@visactor/vgrammar-core": "0.16.6",
"@visactor/vutils": "~0.19.5",
"@visactor/vdataset": "~0.19.5",
"@visactor/vchart": "workspace:1.13.8"
Expand Down
2 changes: 1 addition & 1 deletion packages/vchart/__tests__/runtime/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</head>

<body style="margin: 0">
<div id="chartContainer" style="width: 100vw; height: 100vh">
<div id="chartContainer">
<div id="mainLog"></div>
<div id="chart" style="outline: solid red 1px; width: 100%; height: 100%"></div>
<!-- <canvas id="canvas" width="500" height="500"></canvas> -->
Expand Down
Loading
Loading