Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2662a53
fix: when column has custom aggregation edit cell update #3333
fangsmile Feb 10, 2025
8cd63ce
docs: update changlog of rush
fangsmile Feb 10, 2025
05a4a60
feat: gantt barStyle support function #3364
fangsmile Feb 10, 2025
f7e2f8f
docs: update changlog of rush
fangsmile Feb 10, 2025
7b1fcc3
docs: supplement taskbar style function
fangsmile Feb 11, 2025
6837c85
refactor: supplement theme frozen frameStyle border create #3400
fangsmile Feb 11, 2025
3dcb376
docs: update changlog of rush
fangsmile Feb 11, 2025
2d6e0f9
fix: progress will only support number not decimals #3401
fangsmile Feb 11, 2025
a71ddba
docs: update changlog of rush
fangsmile Feb 11, 2025
e1e1a57
fix: when rowHierarchyType is tree total value show on top no work #3322
fangsmile Feb 12, 2025
28d6942
docs: update changlog of rush
fangsmile Feb 12, 2025
b0d1559
fix: when rowHierarchyType is tree total value show on top no work #3322
fangsmile Feb 12, 2025
110a51a
feat: add visibleOnHover setting for columnResize #3349
fangsmile Feb 12, 2025
6b2469f
docs: update changlog of rush
fangsmile Feb 12, 2025
4b047a3
refactor: progressbar type cell support customLayou #3295
fangsmile Feb 12, 2025
7fdacea
docs: update changlog of rush
fangsmile Feb 12, 2025
a51fddf
refactor: rowSeriesNumber setting add customlayout #3413
fangsmile Feb 13, 2025
ec9acef
fix: fix groupBy judgement in getHierarchyState() #3406
Rui-Sun Feb 13, 2025
f834fe3
Merge pull request #3397 from VisActor/3333-bug-edit-customAggragtion
fangsmile Feb 14, 2025
a73c8a0
Merge pull request #3402 from VisActor/3400-refactor-bottomFrozenStyle
fangsmile Feb 14, 2025
cf0dc9f
Merge pull request #3410 from VisActor/3349-feature-hoverShowResizeLine
fangsmile Feb 14, 2025
baef255
Merge pull request #3408 from VisActor/3322-bug-pivot-tree-showgrandt…
fangsmile Feb 14, 2025
b4e955c
Merge pull request #3399 from VisActor/3364-feature-vtable-gantt-styl…
fangsmile Feb 14, 2025
bc7a169
Merge pull request #3403 from VisActor/3401-bug-gantt-progress-oneValue
fangsmile Feb 14, 2025
37a930b
Merge pull request #3412 from VisActor/3295-bug-progressbar-customlayout
fangsmile Feb 14, 2025
b91f8e3
Merge pull request #3416 from VisActor/3413-bug-rowseriesnumber-custo…
fangsmile Feb 14, 2025
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,11 @@
{
"changes": [
{
"comment": "refactor: progressbar type cell support customLayou #3295\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: when rowHierarchyType is tree total value show on top no work #3322\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: when column has custom aggregation edit cell update #3333\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "feat: add visibleOnHover setting for columnResize #3349\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "feat: gantt barStyle support function #3364\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "refactor: supplement theme frozen frameStyle border create #3400\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: progress will only support number not decimals #3401\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix groupBy judgement in getHierarchyState() #3406",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
4 changes: 2 additions & 2 deletions docs/assets/api/en/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -871,11 +871,11 @@ The table will not be redrawn automatically after updating, and the interface re

## setDropDownMenuHighlight(Function)

Set the selected state of the drop-down menu
Set the selected state of the drop-down menu. The cell will also display the corresponding icon

```

setDropDownMenuHighlight(cells: DropDownMenuHighlightInfo[]): void
setDropDownMenuHighlight(dropDownMenuInfo: DropDownMenuHighlightInfo[]): void

```

Expand Down
4 changes: 2 additions & 2 deletions docs/assets/api/zh/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,10 @@ enum HierarchyState {

## setDropDownMenuHighlight(Function)

设置下拉菜单选中状态
设置下拉菜单选中状态, 同时单元格中也会显示对应的icon

```
setDropDownMenuHighlight(cells: DropDownMenuHighlightInfo[]): void
setDropDownMenuHighlight(dropDownMenuInfo: DropDownMenuHighlightInfo[]): void
```

## showTooltip(Function)
Expand Down
8 changes: 8 additions & 0 deletions docs/assets/option/en/common/column-resize-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,11 @@ The background color of the label
##${prefix} labelBackgroundCornerRadius(number)

The corner radius of the label background

##${prefix} visibleOnHover(boolean)

Whether to display when hovering, default is false

##${prefix} resizeHotSpotSize(number)

The size of the hot area for interactive behavior of adjusting row height and column width
21 changes: 18 additions & 3 deletions docs/assets/option/en/common/gantt/task-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,27 @@ The style of the text on the task bar.

Optional

${prefix} barStyle(ITaskBarStyle)

The style of the task bar.
${prefix} barStyle(ITaskBarStyle|Function)

Optional

The style of the task bar, you can configure the function to return different styles based on the situation.

```
barStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);

// TaskBarInteractionArgumentType definition:
export type TaskBarInteractionArgumentType = {
taskRecord: any;
index: number;
subIndex?: number;
startDate: Date;
endDate: Date;
ganttInstance: Gantt;
};
```


{{ use: common-gantt-task-bar-style }}

${prefix} milestoneStyle(ITaskBarStyle)
Expand Down
40 changes: 40 additions & 0 deletions docs/assets/option/en/common/theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,46 @@ Corner header cell style configuration
prefix = '#' + ${prefix},
) }}

#${prefix} cornerLeftBottomCellStyle(Object)

Corner left bottom cell style configuration

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} cornerRightBottomCellStyle(Object)

Corner right bottom cell style configuration

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} bottomFrozenStyle(Object)

Bottom frozen area style configuration

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} rightFrozenStyle(Object)

Right frozen area style configuration

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} cornerRightTopCellStyle(Object)

Corner right top cell style configuration

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} groupTitleStyle(Object)

Group title style configuration in grouping display mode
Expand Down
8 changes: 8 additions & 0 deletions docs/assets/option/zh/common/column-resize-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@

标签的背景圆角

##${prefix} visibleOnHover(boolean)

是否在hover时显示 默认为false

##${prefix} resizeHotSpotSize(number)

响应调整行高列宽交互行为热区的大小

19 changes: 17 additions & 2 deletions docs/assets/option/zh/common/gantt/task-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,27 @@ ${prefix} labelTextStyle(ITaskBarLabelTextStyle)

非必填

${prefix} barStyle(ITaskBarStyle)
${prefix} barStyle(ITaskBarStyle|Function)

任务条样式
任务条样式, 可以配置函数,根据情况返回不同的样式.

非必填

```
/** 任务条样式 */
barStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);

//其中 TaskBarInteractionArgumentType 的定义为:
export type TaskBarInteractionArgumentType = {
taskRecord: any;
index: number;
subIndex?: number;
startDate: Date;
endDate: Date;
ganttInstance: Gantt;
};
```

{{ use: common-gantt-task-bar-style }}

${prefix} milestoneStyle(ITaskBarStyle)
Expand Down
40 changes: 40 additions & 0 deletions docs/assets/option/zh/common/theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,46 @@ body 单元格的样式配置
prefix = '#' + ${prefix},
) }}

#${prefix} cornerLeftBottomCellStyle(Object)

左下角单元格的样式配置

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} cornerRightBottomCellStyle(Object)

右下角单元格的样式配置

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} bottomFrozenStyle(Object)

底部冻结区域的样式配置

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} rightFrozenStyle(Object)

右侧冻结区域的样式配置

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} cornerRightTopCellStyle(Object)

右上角单元格的样式配置

{{ use: common-theme-style(
prefix = '#' + ${prefix},
) }}

#${prefix} groupTitleStyle(Object)

分组展示时,分组标题的样式配置
Expand Down
30 changes: 22 additions & 8 deletions packages/vtable-gantt/examples/gantt/gantt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { GanttConstructorOptions, TYPES } from '../../src/index';
import * as VTableGantt from '../../src/index';
import { Gantt } from '../../src/index';
import { bindDebugTool } from '../../../vtable/src/scenegraph/debug-tool';
import { debug } from 'console';
const CONTAINER_ID = 'vTable';

export function createTable() {
Expand Down Expand Up @@ -913,14 +914,27 @@ export function createTable() {
fontSize: 16,
textAlign: 'left'
},
barStyle: {
width: 20,
/** 任务条的颜色 */
barColor: '#ee8800',
/** 已完成部分任务条的颜色 */
completedBarColor: '#91e8e0',
/** 任务条的圆角 */
cornerRadius: 10
barStyle(args) {
if (args.taskRecord.title === 'Scope') {
return {
width: 30,
/** 任务条的颜色 */
barColor: 'red',
/** 已完成部分任务条的颜色 */
completedBarColor: '#91e8e0',
/** 任务条的圆角 */
cornerRadius: 10
};
}
return {
width: 20,
/** 任务条的颜色 */
barColor: '#ee8800',
/** 已完成部分任务条的颜色 */
completedBarColor: '#91e8e0',
/** 任务条的圆角 */
cornerRadius: 10
};
},
selectedBarStyle: {
shadowBlur: 5, //阴影宽度
Expand Down
18 changes: 17 additions & 1 deletion packages/vtable-gantt/src/Gantt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class Gantt extends EventTarget {
reverseSortedTimelineScales: (ITimelineScale & { timelineDates?: ITimelineDateInfo[] })[];
timeScaleIncludeHour: boolean;
grid: IGrid;
taskBarStyle: ITaskBarStyle;
taskBarStyle: ITaskBarStyle | ((interactionArgs: TaskBarInteractionArgumentType) => ITaskBarStyle);
taskBarMilestoneStyle: IMilestoneStyle;
/** 里程碑是旋转后的矩形,所以需要计算里程碑的对角线长度 */
taskBarMilestoneHypotenuse: number;
Expand Down Expand Up @@ -1167,4 +1167,20 @@ export class Gantt extends EventTarget {
parseTimeFormat(date: string) {
return parseDateFormat(date);
}

getTaskBarStyle(task_index: number, sub_task_index?: number) {
if (typeof this.parsedOptions.taskBarStyle === 'function') {
const { startDate, endDate, taskRecord } = this.getTaskInfoByTaskListIndex(task_index, sub_task_index);

const args = {
index: task_index,
startDate,
endDate,
taskRecord,
ganttInstance: this
};
return this.parsedOptions.taskBarStyle(args);
}
return this.parsedOptions.taskBarStyle;
}
}
Loading