@visactor/vseed 0.0.40 → 0.1.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.
Files changed (131) hide show
  1. package/dist/builder/builder/builder.d.ts +61 -671
  2. package/dist/builder/register/chartType/index.d.ts +0 -1
  3. package/dist/dataReshape/constant.d.ts +17 -2
  4. package/dist/dataReshape/dataReshapeByEncoding.d.ts +11 -0
  5. package/dist/dataReshape/index.d.ts +3 -7
  6. package/dist/dataReshape/unfoldDimensions.d.ts +12 -14
  7. package/dist/index.cjs +1130 -1880
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +1076 -1835
  11. package/dist/index.js.map +1 -1
  12. package/dist/pipeline/advanced/chart/pipeline/index.d.ts +0 -1
  13. package/dist/pipeline/advanced/chart/pipes/analysis/index.d.ts +3 -1
  14. package/dist/pipeline/advanced/chart/pipes/analysis/sort.d.ts +0 -4
  15. package/dist/pipeline/advanced/chart/pipes/{encoding/encodingAR.d.ts → analysis/sortLegend.d.ts} +1 -1
  16. package/dist/pipeline/advanced/chart/pipes/analysis/sortXBand.d.ts +3 -0
  17. package/dist/pipeline/advanced/chart/pipes/{encoding/encodingPie.d.ts → analysis/sortYBand.d.ts} +1 -1
  18. package/dist/pipeline/advanced/chart/pipes/encoding/{encodingFunnel.d.ts → bar.d.ts} +1 -1
  19. package/dist/pipeline/advanced/chart/pipes/encoding/{encodingAreaRange.d.ts → column.d.ts} +1 -1
  20. package/dist/pipeline/advanced/chart/pipes/encoding/dualAxis.d.ts +2 -0
  21. package/dist/pipeline/advanced/chart/pipes/encoding/funnel.d.ts +2 -0
  22. package/dist/pipeline/advanced/chart/pipes/encoding/heatmap.d.ts +2 -0
  23. package/dist/pipeline/advanced/chart/pipes/encoding/index.d.ts +8 -9
  24. package/dist/pipeline/advanced/chart/pipes/encoding/{encodingMatrix.d.ts → pie.d.ts} +1 -1
  25. package/dist/pipeline/advanced/chart/pipes/encoding/radar.d.ts +2 -0
  26. package/dist/pipeline/advanced/chart/pipes/encoding/rose.d.ts +2 -0
  27. package/dist/pipeline/advanced/chart/pipes/encoding/scatter.d.ts +2 -0
  28. package/dist/pipeline/advanced/chart/pipes/init/autoScatterMeasures.d.ts +2 -0
  29. package/dist/pipeline/advanced/chart/pipes/init/index.d.ts +2 -1
  30. package/dist/pipeline/advanced/chart/pipes/reshape/index.d.ts +4 -12
  31. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.d.ts +2 -0
  32. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.d.ts +2 -0
  33. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.d.ts +2 -0
  34. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.d.ts +2 -0
  35. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.d.ts +2 -0
  36. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.d.ts +2 -0
  37. package/dist/pipeline/spec/chart/pipeline/index.d.ts +0 -1
  38. package/dist/pipeline/spec/chart/pipes/color/index.d.ts +0 -1
  39. package/dist/pipeline/spec/chart/pipes/{color/linearColor.d.ts → dataset/datasetScatter.d.ts} +1 -1
  40. package/dist/pipeline/spec/chart/pipes/dataset/index.d.ts +1 -0
  41. package/dist/pipeline/spec/chart/pipes/init/index.d.ts +1 -2
  42. package/dist/pipeline/spec/chart/pipes/legend/index.d.ts +0 -1
  43. package/dist/pipeline/spec/chart/pipes/tooltip/index.d.ts +0 -1
  44. package/dist/types/advancedVSeed.d.ts +26 -311
  45. package/dist/types/chartType/area/area.d.ts +10 -1
  46. package/dist/types/chartType/area/zArea.d.ts +14 -0
  47. package/dist/types/chartType/areaPercent/areaPercent.d.ts +10 -1
  48. package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +14 -0
  49. package/dist/types/chartType/bar/bar.d.ts +19 -30
  50. package/dist/types/chartType/bar/zBar.d.ts +14 -0
  51. package/dist/types/chartType/barParallel/barParallel.d.ts +18 -30
  52. package/dist/types/chartType/barParallel/zBarParallel.d.ts +14 -0
  53. package/dist/types/chartType/barPercent/barPercent.d.ts +16 -21
  54. package/dist/types/chartType/barPercent/zBarPercent.d.ts +14 -0
  55. package/dist/types/chartType/column/column.d.ts +16 -28
  56. package/dist/types/chartType/column/zColumn.d.ts +14 -0
  57. package/dist/types/chartType/columnParallel/columnParallel.d.ts +19 -27
  58. package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +14 -0
  59. package/dist/types/chartType/columnPercent/columnPercent.d.ts +16 -25
  60. package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +14 -0
  61. package/dist/types/chartType/donut/donut.d.ts +10 -1
  62. package/dist/types/chartType/donut/zDonut.d.ts +14 -0
  63. package/dist/types/chartType/dualAxis/dualAxis.d.ts +9 -1
  64. package/dist/types/chartType/funnel/funnel.d.ts +9 -1
  65. package/dist/types/chartType/funnel/zFunnel.d.ts +14 -0
  66. package/dist/types/chartType/heatmap/heatmap.d.ts +10 -1
  67. package/dist/types/chartType/index.d.ts +0 -1
  68. package/dist/types/chartType/line/line.d.ts +14 -10
  69. package/dist/types/chartType/line/zLine.d.ts +14 -0
  70. package/dist/types/chartType/pie/pie.d.ts +10 -1
  71. package/dist/types/chartType/pie/zPie.d.ts +14 -0
  72. package/dist/types/chartType/radar/radar.d.ts +10 -1
  73. package/dist/types/chartType/radar/zRadar.d.ts +14 -0
  74. package/dist/types/chartType/rose/rose.d.ts +10 -1
  75. package/dist/types/chartType/rose/zRose.d.ts +14 -0
  76. package/dist/types/chartType/roseParallel/roseParallel.d.ts +10 -1
  77. package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +14 -0
  78. package/dist/types/chartType/scatter/scatter.d.ts +88 -5
  79. package/dist/types/chartType/scatter/zScatter.d.ts +155 -0
  80. package/dist/types/index.d.ts +2 -1
  81. package/dist/types/properties/chartType/chartType.d.ts +1 -3
  82. package/dist/types/properties/config/config.d.ts +0 -307
  83. package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +13 -38
  84. package/dist/types/properties/datasetReshapeInfo/index.d.ts +1 -1
  85. package/dist/types/properties/datasetReshapeInfo/zDatasetReshapeInfo.d.ts +43 -0
  86. package/dist/types/properties/encoding/encoding.d.ts +49 -16
  87. package/dist/types/properties/encoding/index.d.ts +2 -2
  88. package/dist/types/properties/encoding/zEncoding.d.ts +29 -0
  89. package/dist/types/properties/measures/index.d.ts +4 -2
  90. package/dist/types/properties/measures/scatterMeasures.d.ts +6 -0
  91. package/dist/types/properties/measures/zScatterMeasures.d.ts +283 -0
  92. package/dist/types/properties/theme/customTheme.d.ts +0 -306
  93. package/dist/types/vseed.d.ts +2 -16816
  94. package/dist/types/zVseed.d.ts +15738 -0
  95. package/dist/umd/index.js +1104 -1860
  96. package/dist/umd/index.js.map +1 -1
  97. package/package.json +13 -5
  98. package/dist/builder/register/chartType/areaRange.d.ts +0 -1
  99. package/dist/dataReshape/dataReshapeFor1D.d.ts +0 -19
  100. package/dist/dataReshape/dataReshapeFor1D1M.d.ts +0 -19
  101. package/dist/dataReshape/dataReshapeFor1D2M.d.ts +0 -19
  102. package/dist/dataReshape/dataReshapeFor2D1M.d.ts +0 -19
  103. package/dist/dataReshape/dataReshapeFor2D1M0Name.d.ts +0 -19
  104. package/dist/dataReshape/unfoldZeroDimensions.d.ts +0 -10
  105. package/dist/pipeline/advanced/chart/pipeline/areaRange.d.ts +0 -2
  106. package/dist/pipeline/advanced/chart/pipes/encoding/encodingRose.d.ts +0 -2
  107. package/dist/pipeline/advanced/chart/pipes/encoding/encodingXY.d.ts +0 -2
  108. package/dist/pipeline/advanced/chart/pipes/encoding/encodingXYY.d.ts +0 -2
  109. package/dist/pipeline/advanced/chart/pipes/encoding/encodingYX.d.ts +0 -2
  110. package/dist/pipeline/advanced/chart/pipes/encoding/encodingYY.d.ts +0 -2
  111. package/dist/pipeline/advanced/chart/pipes/init/autoMeasuresBy2M1Group.d.ts +0 -8
  112. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo1D.d.ts +0 -8
  113. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo1D1M.d.ts +0 -8
  114. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo1D2M.d.ts +0 -8
  115. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo2D1M.d.ts +0 -8
  116. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo2D1M0Name.d.ts +0 -8
  117. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo2D2M.d.ts +0 -8
  118. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo1D.d.ts +0 -8
  119. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo1D1M.d.ts +0 -8
  120. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo1D2M.d.ts +0 -8
  121. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo2D1M.d.ts +0 -8
  122. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo2D1M0Name.d.ts +0 -8
  123. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo2D2M.d.ts +0 -8
  124. package/dist/pipeline/spec/chart/pipeline/areaRange.d.ts +0 -1
  125. package/dist/pipeline/spec/chart/pipes/init/areaRange.d.ts +0 -4
  126. package/dist/pipeline/spec/chart/pipes/legend/colorLegend.d.ts +0 -2
  127. package/dist/pipeline/spec/chart/pipes/tooltip/tooltipAreaRange.d.ts +0 -2
  128. package/dist/types/chartType/areaRange/areaRange.d.ts +0 -151
  129. package/dist/types/chartType/areaRange/index.d.ts +0 -2
  130. package/dist/types/chartType/areaRange/zAreaRange.d.ts +0 -1427
  131. /package/dist/pipeline/spec/chart/pipes/init/{initDualAxis.d.ts → dualAxis.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vseed",
3
- "version": "0.0.40",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -21,19 +21,25 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "devDependencies": {
24
- "@types/d3-color": "^3.1.0",
25
24
  "@eslint/js": "9.30.0",
26
25
  "@rsdoctor/rspack-plugin": "1.1.10",
27
26
  "@rslib/core": "0.12.0",
27
+ "@rstest/core": "^0.3.2",
28
+ "@types/d3-color": "^3.1.0",
28
29
  "@types/node": "^22.16.5",
29
30
  "@typescript-eslint/eslint-plugin": "8.38.0",
31
+ "@visactor/vchart": "1.13.19",
32
+ "@visactor/vtable": "1.19.8",
33
+ "@vitest/coverage-istanbul": "3.2.4",
34
+ "@vitest/coverage-v8": "3.2.4",
30
35
  "eslint": "9.30.0",
31
36
  "globals": "16.2.0",
37
+ "jsdom": "^26.1.0",
38
+ "rstest-canvas-mock": "^0.0.1",
32
39
  "typescript": "5.8.3",
33
40
  "typescript-eslint": "8.35.1",
34
41
  "vitest": "3.2.4",
35
- "@visactor/vtable": "latest",
36
- "@visactor/vchart": "latest"
42
+ "vitest-canvas-mock": "^0.3.3"
37
43
  },
38
44
  "scripts": {
39
45
  "dev": "rslib build --watch",
@@ -42,6 +48,8 @@
42
48
  "build:rsdoctor": "RSDOCTOR=true rsbuild build",
43
49
  "format": "prettier --write .",
44
50
  "lint": "eslint .",
45
- "test": "vitest run"
51
+ "test": "vitest run",
52
+ "rstest": "rstest",
53
+ "test:coverage": "vitest run --coverage"
46
54
  }
47
55
  }
@@ -1 +0,0 @@
1
- export declare const registerAreaRange: () => void;
@@ -1,19 +0,0 @@
1
- import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from '../types';
2
- /**
3
- * 仅数据重塑为1个维度,不处理指标
4
- * @param dataset
5
- * @param dimensions
6
- * @param measures
7
- * @returns
8
- */
9
- export declare const dataReshapeFor1D: (dataset: Dataset, dimensions: Dimension[], measures: Measure[], options?: {
10
- foldMeasureId?: string;
11
- foldMeasureName?: string;
12
- foldMeasureValue?: string;
13
- unfoldDimensionGroup?: string;
14
- unfoldDimensionGroupId?: string;
15
- }) => {
16
- dataset: Dataset;
17
- foldInfo: FoldInfo;
18
- unfoldInfo: UnfoldInfo;
19
- };
@@ -1,19 +0,0 @@
1
- import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from '../types';
2
- /**
3
- * 数据重塑为1个维度1个指标
4
- * @param dataset
5
- * @param dimensions
6
- * @param measures
7
- * @returns
8
- */
9
- export declare const dataReshapeFor1D1M: (dataset: Dataset, dimensions: Dimension[], measures: Measure[], options?: {
10
- foldMeasureId?: string;
11
- foldMeasureName?: string;
12
- foldMeasureValue?: string;
13
- unfoldDimensionGroup?: string;
14
- unfoldDimensionGroupId?: string;
15
- }) => {
16
- dataset: Dataset;
17
- foldInfo: FoldInfo;
18
- unfoldInfo: UnfoldInfo;
19
- };
@@ -1,19 +0,0 @@
1
- import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from '../types';
2
- /**
3
- * 数据重塑为1个维度1个指标
4
- * @param dataset
5
- * @param dimensions
6
- * @param measures
7
- * @returns
8
- */
9
- export declare const dataReshapeFor1D2M: (dataset: Dataset, dimensions: Dimension[], measures: Measure[], options?: {
10
- foldMeasureId?: string;
11
- foldMeasureName?: string;
12
- foldMeasureValue?: string;
13
- unfoldDimensionGroup?: string;
14
- unfoldDimensionGroupId?: string;
15
- }) => {
16
- dataset: Dataset;
17
- foldInfo: FoldInfo;
18
- unfoldInfo: UnfoldInfo;
19
- };
@@ -1,19 +0,0 @@
1
- import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from '../types';
2
- /**
3
- * 数据重塑为2个维度1个指标
4
- * @param dataset
5
- * @param dimensions
6
- * @param measures
7
- * @returns
8
- */
9
- export declare const dataReshapeFor2D1M: (dataset: Dataset, dimensions: Dimension[], measures: Measure[], options?: {
10
- foldMeasureId?: string;
11
- foldMeasureName?: string;
12
- foldMeasureValue?: string;
13
- unfoldDimensionGroup?: string;
14
- unfoldDimensionGroupId?: string;
15
- }) => {
16
- dataset: Dataset;
17
- foldInfo: FoldInfo;
18
- unfoldInfo: UnfoldInfo;
19
- };
@@ -1,19 +0,0 @@
1
- import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from '../types';
2
- /**
3
- * 数据重塑为2个维度1个指标, 并且不根据指标名称展开出一个新维度
4
- * @param dataset
5
- * @param dimensions
6
- * @param measures
7
- * @returns
8
- */
9
- export declare const dataReshapeFor2D1M0Name: (dataset: Dataset, dimensions: Dimension[], measures: Measure[], options?: {
10
- foldMeasureId?: string;
11
- foldMeasureName?: string;
12
- foldMeasureValue?: string;
13
- unfoldDimensionGroup?: string;
14
- unfoldDimensionGroupId?: string;
15
- }) => {
16
- dataset: Dataset;
17
- foldInfo: FoldInfo;
18
- unfoldInfo: UnfoldInfo;
19
- };
@@ -1,10 +0,0 @@
1
- import type { Dataset, Measure } from '../types';
2
- import type { UnfoldInfo } from '../types';
3
- /**
4
- * 展开0个维度的特殊情况, 折线图、面积图、雷达图只有指标没有维度的情况, 应该所有的指标应该作为一个维度
5
- * @description
6
- */
7
- export declare const unfoldZeroDimensions: (dataset: Dataset, measures: Measure[], measureName: string, unfoldGroupName?: string, unfoldGroupId?: string) => {
8
- dataset: Dataset;
9
- unfoldInfo: UnfoldInfo;
10
- };
@@ -1,2 +0,0 @@
1
- import type { AdvancedPipeline } from '../../../../types';
2
- export declare const areaRangeAdvancedPipeline: AdvancedPipeline;
@@ -1,2 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- export declare const encodingRose: AdvancedPipe;
@@ -1,2 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- export declare const encodingXY: AdvancedPipe;
@@ -1,2 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- export declare const encodingXYY: AdvancedPipe;
@@ -1,2 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- export declare const encodingYX: AdvancedPipe;
@@ -1,2 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- export declare const encodingYY: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 自动处理指标, 如果超出了2个指标, 则按每2个指标一个组的逻辑维护
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const autoMeasuresBy2M1Group: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑为透视结构, 如果存在指标分组, 则将数据按组划分
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const pivotReshapeTo1D: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑为透视结构, 如果存在指标分组, 则将数据按组划分. 如果存在行列维度, 则生成行列树结构.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const pivotReshapeTo1D1M: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑为透视结构, 如果存在指标分组, 则将数据按组划分. 如果存在行列维度, 则生成行列树结构.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const pivotReshapeTo1D2M: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑为透视结构, 如果存在指标分组, 则将数据按组划分. 如果存在行列维度, 则生成行列树结构.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const pivotReshapeTo2D1M: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * @description 数据重塑为透视结构, 如果存在指标分组, 则将数据按组划分. 如果存在行列维度, 则生成行列树结构. 并且在0维度时, 合并所有指标为一个维度. 兼容折线图、面积图、雷达图只有指标, 没有维度的场景
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const pivotReshapeTo2D1M0Name: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑, 将任意维度、任意指标, 重塑为2个维度2个指标.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const pivotReshapeTo2D2M: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑, 将任意维度、任意指标, 重塑为1个维度2个指标.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const reshapeTo1D: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑, 将任意维度、任意指标, 重塑为2个维度1个指标.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const reshapeTo1D1M: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑, 将任意维度、任意指标, 重塑为1个维度2个指标.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const reshapeTo1D2M: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑, 将任意维度、任意指标, 重塑为2个维度1个指标.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const reshapeTo2D1M: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * @description 数据重塑, 将任意维度、任意指标, 重塑为2个维度1个指标, 并且在0维度时, 合并所有指标为一个维度. 兼容折线图、面积图、雷达图只有指标, 没有维度的场景
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const reshapeTo2D1M0Name: AdvancedPipe;
@@ -1,8 +0,0 @@
1
- import type { AdvancedPipe } from '../../../../../types';
2
- /**
3
- * 数据重塑, 将任意维度、任意指标, 重塑为2个维度2个指标.
4
- * @param advancedVSeed
5
- * @param context
6
- * @returns
7
- */
8
- export declare const reshapeTo2D2M: AdvancedPipe;
@@ -1 +0,0 @@
1
- export declare const areaRangeSpecPipeline: import("../../../../types").SpecPipe[];
@@ -1,4 +0,0 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const initAreaRange: SpecPipe;
3
- export declare const initAreaRangeLine1: SpecPipe;
4
- export declare const initAreaRangeLine2: SpecPipe;
@@ -1,2 +0,0 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const colorLegend: SpecPipe;
@@ -1,2 +0,0 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const tooltipAreaRange: SpecPipe;
@@ -1,151 +0,0 @@
1
- import type { Locale } from '../../i18n';
2
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Dataset, Dimensions, Label, LineStyle, PointStyle, Theme, XBandAxis, YLinearAxis, CrosshairLine, Sort, MeasureTree } from '../../properties';
3
- /**
4
- * 区间面积图类型定义
5
- * @description 区间面积图与面积图的区别在于, 区间面积图的Y轴数据是一个区间, 而面积图的Y轴数据是一个数值. 区间面积图适用于展示数据的变化范围
6
- * 适用场景:
7
- * - 展示单一数据系列的趋势变化
8
- * - 强调总量随时间的累积效果
9
- * - 对比多个数据系列的总量差异
10
- * @warning
11
- * 数据要求:
12
- * - 至少1个指标字段(度量)
13
- * - 第一个维度字段映射到X轴,其余维度字段会与指标名称(存在多个指标时)合并, 作为图例项展示.
14
- * - 所有指标会自动合并为一个指标
15
- * 默认开启的功能:
16
- * - 模块开启堆叠
17
- * - 默认开启图例、坐标轴、区域填充、数据标签、提示信息
18
- * @recommend
19
- * - 推荐字段配置: `2`个指标, `1`个维度
20
- * - 不支持数据重塑: 至少`2`个指标, `1`个维度
21
- */
22
- export interface AreaRange {
23
- /**
24
- * 面积图
25
- * @description 面积图,展示数据趋势及累积关系的图表类型
26
- * @type {'area'}
27
- * @example 'area'
28
- */
29
- chartType: 'areaRange';
30
- /**
31
- * 数据集
32
- * @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, VSeed带有强大的数据重塑功能, 会自行进行数据重塑, 面积图的数据最终会被转换为2个维度, 1个指标.
33
- * @type {Array<Record<string|number, any>>}
34
- * @example [{month:'1月', value:100}, {month:'2月', value:150}, {month:'3月', value:120}]
35
- */
36
- dataset: Dataset;
37
- /**
38
- * 维度
39
- * @description 第一个维度被映射到X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
40
- * @type {Dimensions}
41
- * @example [{ id: 'month', alias: '月份' }, { id: 'year', alias: '年份' }]
42
- */
43
- dimensions?: Dimensions;
44
- /**
45
- * 指标
46
- * @description 区间面积图需要2个指标, 第一个指标映射到Y轴的下边界, 第二个指标映射到Y轴的上边界, 第二个之后的指标会被忽略.
47
- * @type {DimensionTree}
48
- * @example [{id: 'value', alias: '数值'}]
49
- */
50
- measures?: MeasureTree;
51
- /**
52
- * 图表的背景颜色
53
- * @default transparent 默认为透明背景
54
- * @description 背景颜色可以是颜色字符串, 例如'red', 'blue', 也可以是hex, rgb或rgba'#ff0000', 'rgba(255,0,0,0.5)'
55
- */
56
- backgroundColor?: BackgroundColor;
57
- /**
58
- * 标签
59
- * @description 标签配置, 用于定义图表的数据标签, 包括数据标签的位置, 格式, 样式等.
60
- */
61
- label?: Label;
62
- /**
63
- * x轴
64
- * @description 类目轴, x轴配置, 用于定义图表的x轴, 包括x轴的位置, 格式, 样式等.
65
- */
66
- xAxis?: XBandAxis;
67
- /**
68
- * y轴
69
- * @description 数值轴, y轴配置, 用于定义图表的y轴, 包括y轴的位置, 格式, 样式等.
70
- */
71
- yAxis?: YLinearAxis;
72
- /**
73
- * 垂直提示线
74
- * @description 鼠标移动到图表上时, 显示的垂直提示线
75
- */
76
- crosshairLine?: CrosshairLine;
77
- /**
78
- * @description X轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
79
- * @example
80
- * sort: {
81
- * orderBy: 'profit',
82
- * order: 'asc',
83
- * }
84
- * sort: {
85
- * customOrder:['2019', '2020', '2021']
86
- * }
87
- */
88
- sort?: Sort;
89
- /**
90
- * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
91
- * @default light 默认为亮色主题
92
- * @description 内置light与dark两种主题, 用户可以通过Builder自定义主题
93
- * @example 'dark'
94
- * @example 'light'
95
- * @example 'customThemeName'
96
- */
97
- theme?: Theme;
98
- /**
99
- * 点图元样式
100
- * @description 点图元样式配置, 用于定义图表的点图元样式, 包括点图元的颜色, 边框等.
101
- * 支持全局样式或条件样式配置
102
- * 数据筛选器
103
- * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
104
- * 若未配置selector, 则样式全局生效.
105
- */
106
- pointStyle?: PointStyle | PointStyle[];
107
- /**
108
- * 线图元样式
109
- * @description 线图元样式配置, 用于定义图表的线图元样式, 包括线图元的颜色, 透明度, 曲线等.
110
- * 支持全局样式或条件样式配置
111
- * 数据筛选器
112
- * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
113
- * 若未配置selector, 则样式全局生效.
114
- */
115
- lineStyle?: LineStyle | LineStyle[];
116
- /**
117
- * 面积图元样式
118
- * @description 面积图元样式配置, 用于定义图表的面积图元样式, 包括面积图元的颜色, 透明度, 边框等.
119
- * 支持全局样式或条件样式配置
120
- * 数据筛选器
121
- * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
122
- * 若未配置selector, 则样式全局生效.
123
- */
124
- areaStyle?: AreaStyle | AreaStyle[];
125
- /**
126
- * 标注点
127
- * @description 标注点配置, 根据选择的数据, 定义图表的标注点, 包括标注点的位置, 格式, 样式等.
128
- */
129
- annotationPoint?: AnnotationPoint | AnnotationPoint[];
130
- /**
131
- * 标注垂直线
132
- * @description 标注垂直线配置, 根据选择的数据, 定义图表的标注垂直线, 包括标注垂直线的位置, 样式等.
133
- */
134
- annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
135
- /**
136
- * 标注水平线
137
- * @description 标注水平线配置, 根据选择的数据, 定义图表的标注水平线, 包括标注水平线的位置, 样式等.
138
- */
139
- annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
140
- /**
141
- * 标注区域
142
- * @description 标注区域配置, 根据选择的数据, 定义图表的标注区域, 包括标注区域的位置, 样式等.
143
- */
144
- annotationArea?: AnnotationArea | AnnotationArea[];
145
- /**
146
- * 语言
147
- * @description 图表语言配置, 支持'zh-CN'与'en-US'两种语言, 另外可以调用 intl.setLocale('zh-CN') 方法设置语言
148
- * @default 'zh-CN'
149
- */
150
- locale?: Locale;
151
- }
@@ -1,2 +0,0 @@
1
- export type * from './areaRange';
2
- export { zAreaRange } from './zAreaRange';