@visactor/vtable 0.16.0 → 0.16.2-alpha.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.
- package/cjs/components/axis/axis.d.ts +1 -1
- package/cjs/components/axis/axis.js +2 -2
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
- package/cjs/layout/chart-helper/get-axis-config.js +25 -16
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +2 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +1 -1
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/ts-types/component/axis.d.ts +2 -0
- package/cjs/ts-types/component/axis.js.map +1 -1
- package/dist/vtable.js +34 -28
- package/dist/vtable.min.js +2 -2
- package/es/components/axis/axis.d.ts +1 -1
- package/es/components/axis/axis.js +2 -2
- package/es/components/axis/axis.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
- package/es/layout/chart-helper/get-axis-config.js +25 -16
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +2 -2
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +1 -1
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +1 -1
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/ts-types/component/axis.d.ts +2 -0
- package/es/ts-types/component/axis.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -48997,11 +48997,11 @@
|
|
|
48997
48997
|
tickData;
|
|
48998
48998
|
scale;
|
|
48999
48999
|
component;
|
|
49000
|
-
constructor(option, width, height, padding,
|
|
49000
|
+
constructor(option, width, height, padding, table) {
|
|
49001
49001
|
this.table = table;
|
|
49002
49002
|
this.orient = option.orient ?? 'left';
|
|
49003
49003
|
this.type = option.type ?? 'band';
|
|
49004
|
-
this.option = merge$1({}, getCommonAxis(
|
|
49004
|
+
this.option = merge$1({}, getCommonAxis(option.__vtableChartTheme), getTableAxisTheme(this.orient, table.theme), getChartSpecAxisTheme(this.orient, this.type, option.__vtableChartTheme), option);
|
|
49005
49005
|
if (this.orient === 'left' || this.orient === 'right') {
|
|
49006
49006
|
this.width = width;
|
|
49007
49007
|
this.height = height - padding[2];
|
|
@@ -53552,8 +53552,7 @@
|
|
|
53552
53552
|
cellGroup = createCellGroup(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme);
|
|
53553
53553
|
const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
|
|
53554
53554
|
if (axisConfig) {
|
|
53555
|
-
const
|
|
53556
|
-
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, spec?.theme, table);
|
|
53555
|
+
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, table);
|
|
53557
53556
|
cellGroup.clear();
|
|
53558
53557
|
cellGroup.appendChild(axis.component);
|
|
53559
53558
|
axis.overlap();
|
|
@@ -54222,7 +54221,7 @@
|
|
|
54222
54221
|
if (!axisRange) {
|
|
54223
54222
|
return;
|
|
54224
54223
|
}
|
|
54225
|
-
const { range, ticks, axisOption, isZeroAlign } = axisRange;
|
|
54224
|
+
const { range, ticks, axisOption, isZeroAlign, theme } = axisRange;
|
|
54226
54225
|
if (isZeroAlign) {
|
|
54227
54226
|
const subAxisRange = getRange$1('bottom', col, row + 1, col, layout.columnHeaderLevelCount - 1, col, row, 0, layout);
|
|
54228
54227
|
if (subAxisRange) {
|
|
@@ -54254,7 +54253,8 @@
|
|
|
54254
54253
|
label: {
|
|
54255
54254
|
flush: true
|
|
54256
54255
|
},
|
|
54257
|
-
__ticksForVTable: ticks
|
|
54256
|
+
__ticksForVTable: ticks,
|
|
54257
|
+
__vtableChartTheme: theme
|
|
54258
54258
|
});
|
|
54259
54259
|
}
|
|
54260
54260
|
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
@@ -54272,7 +54272,7 @@
|
|
|
54272
54272
|
if (!axisRange) {
|
|
54273
54273
|
return;
|
|
54274
54274
|
}
|
|
54275
|
-
const { range, ticks, axisOption, isZeroAlign } = axisRange;
|
|
54275
|
+
const { range, ticks, axisOption, isZeroAlign, theme } = axisRange;
|
|
54276
54276
|
if (isZeroAlign) {
|
|
54277
54277
|
const subAxisRange = getRange$1('top', col, row - 1, col, row, col, row, 1, layout);
|
|
54278
54278
|
if (subAxisRange) {
|
|
@@ -54308,7 +54308,8 @@
|
|
|
54308
54308
|
label: {
|
|
54309
54309
|
flush: true
|
|
54310
54310
|
},
|
|
54311
|
-
__ticksForVTable: ticks
|
|
54311
|
+
__ticksForVTable: ticks,
|
|
54312
|
+
__vtableChartTheme: theme
|
|
54312
54313
|
});
|
|
54313
54314
|
}
|
|
54314
54315
|
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
@@ -54321,7 +54322,7 @@
|
|
|
54321
54322
|
const data = layout.dataset.collectedValues[rowDimensionKey] ?? [];
|
|
54322
54323
|
const rowPath = layout.getRowKeysPath(col, row);
|
|
54323
54324
|
const domain = data[rowPath ?? ''] ?? [];
|
|
54324
|
-
const { axisOption, isPercent } = getAxisOption(col + 1, row, 'left', layout);
|
|
54325
|
+
const { axisOption, isPercent, theme } = getAxisOption(col + 1, row, 'left', layout);
|
|
54325
54326
|
if (axisOption?.visible === false) {
|
|
54326
54327
|
return;
|
|
54327
54328
|
}
|
|
@@ -54332,7 +54333,8 @@
|
|
|
54332
54333
|
}
|
|
54333
54334
|
}, axisOption, {
|
|
54334
54335
|
orient: 'left',
|
|
54335
|
-
type: 'band'
|
|
54336
|
+
type: 'band',
|
|
54337
|
+
__vtableChartTheme: theme
|
|
54336
54338
|
});
|
|
54337
54339
|
}
|
|
54338
54340
|
}
|
|
@@ -54352,7 +54354,7 @@
|
|
|
54352
54354
|
if (!axisRange) {
|
|
54353
54355
|
return;
|
|
54354
54356
|
}
|
|
54355
|
-
const { range, ticks, axisOption, isZeroAlign } = axisRange;
|
|
54357
|
+
const { range, ticks, axisOption, isZeroAlign, theme } = axisRange;
|
|
54356
54358
|
if (isZeroAlign) {
|
|
54357
54359
|
const subAxisRange = getRange$1('right', col + 1, row, col, row, col, row, 1, layout);
|
|
54358
54360
|
if (subAxisRange) {
|
|
@@ -54389,7 +54391,8 @@
|
|
|
54389
54391
|
label: {
|
|
54390
54392
|
flush: true
|
|
54391
54393
|
},
|
|
54392
|
-
__ticksForVTable: ticks
|
|
54394
|
+
__ticksForVTable: ticks,
|
|
54395
|
+
__vtableChartTheme: theme
|
|
54393
54396
|
});
|
|
54394
54397
|
}
|
|
54395
54398
|
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
@@ -54399,7 +54402,7 @@
|
|
|
54399
54402
|
if (!axisRange) {
|
|
54400
54403
|
return;
|
|
54401
54404
|
}
|
|
54402
|
-
const { range, ticks, axisOption, isZeroAlign } = axisRange;
|
|
54405
|
+
const { range, ticks, axisOption, isZeroAlign, theme } = axisRange;
|
|
54403
54406
|
if (isZeroAlign) {
|
|
54404
54407
|
const subAxisRange = getRange$1('left', col - 1, row, layout.rowHeaderLevelCount - 1, row, col, row, 0, layout);
|
|
54405
54408
|
if (subAxisRange) {
|
|
@@ -54434,7 +54437,8 @@
|
|
|
54434
54437
|
label: {
|
|
54435
54438
|
flush: true
|
|
54436
54439
|
},
|
|
54437
|
-
__ticksForVTable: ticks
|
|
54440
|
+
__ticksForVTable: ticks,
|
|
54441
|
+
__vtableChartTheme: theme
|
|
54438
54442
|
});
|
|
54439
54443
|
}
|
|
54440
54444
|
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
@@ -54447,7 +54451,7 @@
|
|
|
54447
54451
|
const data = layout.dataset.collectedValues[columnDimensionKey] ?? [];
|
|
54448
54452
|
const colPath = layout.getColKeysPath(col, row);
|
|
54449
54453
|
const domain = data?.[colPath ?? ''] ?? [];
|
|
54450
|
-
const { axisOption, isPercent } = getAxisOption(col, row - 1, 'bottom', layout);
|
|
54454
|
+
const { axisOption, isPercent, theme } = getAxisOption(col, row - 1, 'bottom', layout);
|
|
54451
54455
|
if (axisOption?.visible === false) {
|
|
54452
54456
|
return;
|
|
54453
54457
|
}
|
|
@@ -54455,7 +54459,8 @@
|
|
|
54455
54459
|
domain: Array.from(domain)
|
|
54456
54460
|
}, axisOption, {
|
|
54457
54461
|
orient: 'bottom',
|
|
54458
|
-
type: 'band'
|
|
54462
|
+
type: 'band',
|
|
54463
|
+
__vtableChartTheme: theme
|
|
54459
54464
|
});
|
|
54460
54465
|
}
|
|
54461
54466
|
}
|
|
@@ -54480,7 +54485,8 @@
|
|
|
54480
54485
|
axisOption,
|
|
54481
54486
|
isPercent: spec.percent,
|
|
54482
54487
|
isZeroAlign: checkZeroAlign(spec, orient, layout),
|
|
54483
|
-
seriesIndice
|
|
54488
|
+
seriesIndice,
|
|
54489
|
+
theme: spec.theme
|
|
54484
54490
|
};
|
|
54485
54491
|
}
|
|
54486
54492
|
}
|
|
@@ -54490,7 +54496,8 @@
|
|
|
54490
54496
|
return {
|
|
54491
54497
|
axisOption,
|
|
54492
54498
|
isPercent: false,
|
|
54493
|
-
isZeroAlign: checkZeroAlign(spec, orient, layout)
|
|
54499
|
+
isZeroAlign: checkZeroAlign(spec, orient, layout),
|
|
54500
|
+
theme: spec.theme
|
|
54494
54501
|
};
|
|
54495
54502
|
}
|
|
54496
54503
|
function checkZeroAlign(spec, orient, layout) {
|
|
@@ -54570,7 +54577,7 @@
|
|
|
54570
54577
|
return range;
|
|
54571
54578
|
}
|
|
54572
54579
|
function getRange$1(position, colForAxisOption, rowForAxisOption, colForIndicatorKey, rowForIndicatorKey, col, row, defaultSeriesIndice, layout) {
|
|
54573
|
-
const { axisOption, isPercent, isZeroAlign, seriesIndice } = getAxisOption(colForAxisOption, rowForAxisOption, position, layout);
|
|
54580
|
+
const { axisOption, isPercent, isZeroAlign, seriesIndice, theme } = getAxisOption(colForAxisOption, rowForAxisOption, position, layout);
|
|
54574
54581
|
if (axisOption?.visible === false) {
|
|
54575
54582
|
return undefined;
|
|
54576
54583
|
}
|
|
@@ -54609,7 +54616,8 @@
|
|
|
54609
54616
|
axisOption,
|
|
54610
54617
|
isZeroAlign,
|
|
54611
54618
|
range,
|
|
54612
|
-
ticks
|
|
54619
|
+
ticks,
|
|
54620
|
+
theme
|
|
54613
54621
|
};
|
|
54614
54622
|
}
|
|
54615
54623
|
function isTopOrBottomAxis(col, row, layout) {
|
|
@@ -55688,8 +55696,7 @@
|
|
|
55688
55696
|
const cellStyle = scene.table._getCellStyle(col, row);
|
|
55689
55697
|
const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));
|
|
55690
55698
|
if (axisConfig) {
|
|
55691
|
-
const
|
|
55692
|
-
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, spec?.theme, scene.table);
|
|
55699
|
+
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, scene.table);
|
|
55693
55700
|
cellGroup.clear();
|
|
55694
55701
|
cellGroup.appendChild(axis.component);
|
|
55695
55702
|
axis.overlap();
|
|
@@ -58766,7 +58773,7 @@
|
|
|
58766
58773
|
this.xLimitRight = totalWidth - totalBodyWidth / 2;
|
|
58767
58774
|
const widthLimit = this.table.tableNoFrameWidth * 5;
|
|
58768
58775
|
this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
|
|
58769
|
-
this.firstScreenColLimit = this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth));
|
|
58776
|
+
this.firstScreenColLimit = Math.max(15, this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth)));
|
|
58770
58777
|
this.colUpdatePos = this.bodyRightCol;
|
|
58771
58778
|
}
|
|
58772
58779
|
setParamsForRow() {
|
|
@@ -58784,7 +58791,7 @@
|
|
|
58784
58791
|
this.yLimitBottom = totalHeight - totalBodyHeight / 2;
|
|
58785
58792
|
const heightLimit = this.table.tableNoFrameHeight * 5;
|
|
58786
58793
|
this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
|
|
58787
|
-
this.firstScreenRowLimit = this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight));
|
|
58794
|
+
this.firstScreenRowLimit = Math.max(30, this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight)));
|
|
58788
58795
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
58789
58796
|
}
|
|
58790
58797
|
resize() {
|
|
@@ -60522,8 +60529,7 @@
|
|
|
60522
60529
|
const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(cell.col, cell.row);
|
|
60523
60530
|
const cellStyle = table._getCellStyle(cell.col, cell.row);
|
|
60524
60531
|
const padding = getQuadProps(getProp('padding', cellStyle, cell.col, cell.row, table));
|
|
60525
|
-
const
|
|
60526
|
-
const axis = new CartesianAxis(axisConfig, cell.attribute.width, cell.attribute.height, padding, spec?.theme, table);
|
|
60532
|
+
const axis = new CartesianAxis(axisConfig, cell.attribute.width, cell.attribute.height, padding, table);
|
|
60527
60533
|
cell.clear();
|
|
60528
60534
|
cell.appendChild(axis.component);
|
|
60529
60535
|
axis.overlap();
|
|
@@ -68420,7 +68426,7 @@
|
|
|
68420
68426
|
return TABLE_EVENT_TYPE;
|
|
68421
68427
|
}
|
|
68422
68428
|
options;
|
|
68423
|
-
version = "0.16.0";
|
|
68429
|
+
version = "0.16.2-alpha.0";
|
|
68424
68430
|
pagination;
|
|
68425
68431
|
id = `VTable${Date.now()}`;
|
|
68426
68432
|
headerStyleCache;
|
|
@@ -78841,7 +78847,7 @@
|
|
|
78841
78847
|
return new Tag$1(params ? params.attribute : {});
|
|
78842
78848
|
}
|
|
78843
78849
|
|
|
78844
|
-
const version = "0.16.0";
|
|
78850
|
+
const version = "0.16.2-alpha.0";
|
|
78845
78851
|
function getIcons() {
|
|
78846
78852
|
return get$2();
|
|
78847
78853
|
}
|