Skip to content

Commit 85c8ebd

Browse files
committed
docs: update gantt locate icon
1 parent 2538030 commit 85c8ebd

6 files changed

Lines changed: 30 additions & 36 deletions

File tree

docs/assets/demo/en/gantt/gantt-locate-taskbar.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
category: examples
33
group: gantt
44
title: Task Bar Locate (Offscreen Indicator)
5-
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/gantt/gantt-basic-preview.png
5+
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/gantt/gantt-locate-taskbar.gif
66
link: gantt/Getting_Started
77
option: Gantt#taskBar
88
---
@@ -20,7 +20,6 @@ When the timeline is long, task bars may be outside the current viewport. This d
2020
```javascript livedemo template=vtable
2121
// import * as VTableGantt from '@visactor/vtable-gantt';
2222
let ganttInstance;
23-
const CONTAINER_ID = 'vTable';
2423

2524
const records = [
2625
{ id: 1, title: 'Offscreen on the left', start: '2024-02-05', end: '2024-02-20', progress: 20 },

docs/assets/demo/zh/gantt/gantt-locate-taskbar.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
category: examples
33
group: gantt
44
title: 甘特图任务条定位(超出可视区提示)
5-
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/gantt/gantt-basic-preview.png
5+
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/gantt/gantt-locate-taskbar.gif
66
link: gantt/Getting_Started
77
option: Gantt#taskBar
88
---
@@ -20,7 +20,6 @@ option: Gantt#taskBar
2020
```javascript livedemo template=vtable
2121
// import * as VTableGantt from '@visactor/vtable-gantt';
2222
let ganttInstance;
23-
const CONTAINER_ID = 'vTable';
2423

2524
const records = [
2625
{ id: 1, title: '任务条在左侧不可见', start: '2024-02-05', end: '2024-02-20', progress: 20 },

docs/assets/guide/en/gantt/Getting_Started.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -351,20 +351,4 @@ At this point, you have successfully drawn a simple Gantt chart!
351351

352352
When the smallest time scale is `unit: 'day'` and `step: 1`, you can use `timelineHeader.weekendColWidth` to override weekend column width (or set `timelineHeader.hideWeekend` to hide weekend columns).
353353

354-
## Task Bar Locate (Optional)
355-
356-
When the timeline is long and the task bar is outside the current viewport, you can enable the “locate icon” feature: an icon is shown on the left/right edge of the gantt view, and clicking it scrolls the task bar into the viewport.
357-
358-
Key option:
359-
360-
```javascript
361-
const option = {
362-
taskBar: {
363-
locateIcon: true
364-
}
365-
};
366-
```
367-
368-
Demo: `gantt-locate-taskbar`.
369-
370354
I hope this tutorial helps you learn how to use Gantt. Next, you can delve into the various configuration options of vtable-gantt to customize more diverse table effects.

docs/assets/guide/en/gantt/introduction.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ You can set whether task bars are resizable through the `taskBar.resizable` conf
133133

134134
You can set whether task bars are adjustable through the `taskBar.progressAdjustable` configuration item.
135135

136+
#### Task Bar Locate
137+
138+
When the timeline is long and the task bar is outside the current viewport, you can enable the “locate icon” feature: an icon is shown on the left/right edge of the gantt view, and clicking it scrolls the task bar into the viewport.
139+
140+
Key option:
141+
142+
```javascript
143+
const option = {
144+
taskBar: {
145+
locateIcon: true
146+
}
147+
};
148+
```
149+
136150
#### Adjusting the Width of the Left Table
137151

138152
You can set the divider line to be draggable by configuring `frame.verticalSplitLineMoveable` to true.

docs/assets/guide/zh/gantt/Getting_Started.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -351,20 +351,4 @@ window['ganttInstance'] = ganttInstance;
351351

352352
当最小粒度为天且 `unit: 'day'``step: 1` 时,可以通过 `timelineHeader.weekendColWidth` 覆盖周末列宽度(或通过 `timelineHeader.hideWeekend` 隐藏周末列)。
353353

354-
## 任务条定位(可选)
355-
356-
当时间轴较长、任务条不在当前可视区域内时,可以开启“定位图标”能力:在甘特图左右边缘显示图标,点击后自动滚动到该任务条的可视区域。
357-
358-
关键配置:
359-
360-
```javascript
361-
const option = {
362-
taskBar: {
363-
locateIcon: true
364-
}
365-
};
366-
```
367-
368-
可参考示例:`gantt-locate-taskbar`
369-
370354
希望这篇教程对你学习如何使用 Gantt 有所帮助。接下来可以深入了解 vtable-gantt 的各种配置选项,定制出更加丰富多样的表格效果。

docs/assets/guide/zh/gantt/introduction.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ links:[
133133

134134
通过 `taskBar.progressAdjustable` 配置项,可以设置任务条是否可调整进度。
135135

136+
#### 任务条定位
137+
138+
当时间轴较长、任务条不在当前可视区域内时,可以开启“定位图标”能力:在甘特图左右边缘显示图标,点击后自动滚动到该任务条的可视区域。
139+
140+
关键配置:
141+
142+
```javascript
143+
const option = {
144+
taskBar: {
145+
locateIcon: true
146+
}
147+
};
148+
```
149+
136150
#### 调整左侧表格宽度
137151

138152
通过 `frame.verticalSplitLineMoveable` 配置为 true,可以设置分割线可拖拽。

0 commit comments

Comments
 (0)