@visactor/vseed 0.1.7 → 0.1.8

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 (44) hide show
  1. package/dist/dataReshape/constant.d.ts +2 -0
  2. package/dist/index.cjs +740 -288
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +733 -286
  5. package/dist/index.js.map +1 -1
  6. package/dist/pipeline/advanced/chart/pipes/encoding/bar.d.ts +1 -19
  7. package/dist/pipeline/advanced/chart/pipes/encoding/column.d.ts +1 -19
  8. package/dist/pipeline/advanced/chart/pipes/encoding/dualAxis.d.ts +1 -19
  9. package/dist/pipeline/advanced/chart/pipes/encoding/encodingAdapter.d.ts +2 -0
  10. package/dist/pipeline/advanced/chart/pipes/encoding/funnel.d.ts +1 -17
  11. package/dist/pipeline/advanced/chart/pipes/encoding/heatmap.d.ts +1 -19
  12. package/dist/pipeline/advanced/chart/pipes/encoding/index.d.ts +11 -9
  13. package/dist/pipeline/advanced/chart/pipes/encoding/line.d.ts +1 -18
  14. package/dist/pipeline/advanced/chart/pipes/encoding/pie.d.ts +1 -18
  15. package/dist/pipeline/advanced/chart/pipes/encoding/radar.d.ts +1 -19
  16. package/dist/pipeline/advanced/chart/pipes/encoding/rose.d.ts +1 -19
  17. package/dist/pipeline/advanced/chart/pipes/encoding/scatter.d.ts +1 -18
  18. package/dist/pipeline/advanced/chart/pipes/measures/utils.d.ts +7 -1
  19. package/dist/pipeline/spec/chart/pipes/tooltip/index.d.ts +2 -0
  20. package/dist/pipeline/spec/chart/pipes/tooltip/tooltip.d.ts +21 -1
  21. package/dist/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.d.ts +15 -0
  22. package/dist/pipeline/spec/chart/pipes/tooltip/tooltipScatter.d.ts +15 -0
  23. package/dist/types/chartType/area/area.d.ts +7 -27
  24. package/dist/types/chartType/areaPercent/areaPercent.d.ts +7 -27
  25. package/dist/types/chartType/bar/bar.d.ts +8 -29
  26. package/dist/types/chartType/barParallel/barParallel.d.ts +8 -29
  27. package/dist/types/chartType/barPercent/barPercent.d.ts +8 -29
  28. package/dist/types/chartType/column/column.d.ts +8 -29
  29. package/dist/types/chartType/columnParallel/columnParallel.d.ts +9 -30
  30. package/dist/types/chartType/columnPercent/columnPercent.d.ts +8 -29
  31. package/dist/types/chartType/donut/donut.d.ts +7 -27
  32. package/dist/types/chartType/dualAxis/dualAxis.d.ts +9 -29
  33. package/dist/types/chartType/funnel/funnel.d.ts +7 -26
  34. package/dist/types/chartType/heatmap/heatmap.d.ts +8 -29
  35. package/dist/types/chartType/line/line.d.ts +7 -27
  36. package/dist/types/chartType/pie/pie.d.ts +7 -27
  37. package/dist/types/chartType/pivotTable/pivotTable.d.ts +4 -7
  38. package/dist/types/chartType/radar/radar.d.ts +7 -29
  39. package/dist/types/chartType/rose/rose.d.ts +8 -29
  40. package/dist/types/chartType/roseParallel/roseParallel.d.ts +8 -29
  41. package/dist/types/chartType/scatter/scatter.d.ts +7 -28
  42. package/dist/umd/index.js +736 -288
  43. package/dist/umd/index.js.map +1 -1
  44. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import { type Locale } from '../../i18n';
2
- import type { Encoding, MeasureTree } from '../../properties';
2
+ import type { MeasureTree } from '../../properties';
3
3
  import { type BackgroundColor, type Color, type Dataset, type Dimensions, type Label, type Legend, type Theme, type Tooltip } from '../../properties';
4
4
  /**
5
5
  * @description 堆叠玫瑰图,适用于多维度数据对比场景,通过极坐标系下的扇形弧度和半径展示数据大小
@@ -8,22 +8,13 @@ import { type BackgroundColor, type Color, type Dataset, type Dimensions, type L
8
8
  * - 周期性数据的强弱比较
9
9
  * - 分类数据的数值与占比同时展示
10
10
  * @encoding
11
- * 维度未包含任何`encoding`, 则使用默认映射规则:
12
- * 1. angle: 第一个维度映射至angle轴
13
- * 2. color: 非`angle`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
14
- * 3. detail: 非`angle`轴所有维度与指标名称, 映射至Detail通道
15
- * 指标未包含任何`encoding`, 则使用默认映射规则:
16
- * 1. radius: 全部指标映射至radius轴
17
- * 2. tooltip: 全部指标映射至Tooltip
18
- *
19
- * 维度映射规则:
20
- * 1. 用户指定的`angle`维度映射至angle轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至angle轴
21
- * 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
22
- * 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
23
- * 指标映射规则:
24
- * 1. 指标未配置`encoding`, 则默认映射至Y轴;
25
- * 2. 用户指定的`radius`指标映射至radius轴, 支持多个指标;
26
- * 3. 所有指标均映射到Tooltip
11
+ * 堆叠玫瑰图支持以下视觉通道:
12
+ * `angle` : 角度通道, 支持`多个维度`, 按维度值映射至角度轴
13
+ * `radius` : 半径通道, 支持`多个指标`, 按指标值映射至半径轴
14
+ * `detail` : 细分通道, 支持`多个维度`, 在同一个颜色系列下展示更细粒度的数据时使用
15
+ * `color` : 颜色通道, 支持`多个维度`或 `一个指标`, 维度颜色用于区分不同的数据系列, 指标颜色用于线性映射指标值到图形颜色
16
+ * `tooltip`: 提示通道, 支持`多个维度`与 `多个指标`, 会在鼠标悬停在数据点上时展示
17
+ * `label` : 标签通道, 支持`多个维度`与 `多个指标`, 会在数据点上展示数据标签
27
18
  * @warning
28
19
  * 数据要求:
29
20
  * - 至少1个数值字段(度量)
@@ -50,18 +41,6 @@ export interface Rose {
50
41
  * @example [{month:'1月', value:100}, {month:'2月', value:150}, {month:'3月', value:120}]
51
42
  */
52
43
  dataset: Dataset;
53
- /**
54
- * @description 编码配置, 堆叠玫瑰图的视觉通道, 包括: angle通道, color通道, detail通道, label通道, tooltip通道
55
- * - angle: 映射到角度的字段, 支持放入多个维度
56
- * - detail: 细分映射通道, 支持放入多个维度
57
- * - tooltip: 提示映射通道, 支持放入多个维度 和 多个指标
58
- * - color: 颜色映射通道, 支持放入多个维度 或 1个 指标
59
- * - label: 标签映射通道, 支持放入 多个维度 或 多个指标
60
- *
61
- * @tip 特殊的:
62
- * - radius: measures会直接映射到半径通道
63
- */
64
- encoding?: Pick<Encoding, 'angle' | 'color' | 'detail' | 'label' | 'tooltip'>;
65
44
  /**
66
45
  * 维度
67
46
  * @description 玫瑰图的第一个维度被映射到角度轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
@@ -1,5 +1,5 @@
1
1
  import { type Locale } from '../../i18n';
2
- import type { Encoding, MeasureTree } from '../../properties';
2
+ import type { MeasureTree } from '../../properties';
3
3
  import { type BackgroundColor, type Color, type Dataset, type Dimensions, type Label, type Legend, type Theme, type Tooltip } from '../../properties';
4
4
  /**
5
5
  * @description 分组玫瑰图,适用于多维度数据对比场景,通过极坐标系下的扇形弧度和半径展示数据大小
@@ -8,22 +8,13 @@ import { type BackgroundColor, type Color, type Dataset, type Dimensions, type L
8
8
  * - 周期性数据的强弱比较
9
9
  * - 分类数据的数值与占比同时展示
10
10
  * @encoding
11
- * 维度未包含任何`encoding`, 则使用默认映射规则:
12
- * 1. angle: 第一个维度映射至angle轴
13
- * 2. color: 非`angle`轴所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
14
- * 3. detail: 非`angle`轴所有维度与指标名称, 映射至Detail通道
15
- * 指标未包含任何`encoding`, 则使用默认映射规则:
16
- * 1. radius: 全部指标映射至radius轴
17
- * 2. tooltip: 全部指标映射至Tooltip
18
- *
19
- * 维度映射规则:
20
- * 1. 用户指定的`angle`维度映射至angle轴, 支持多个维度; 若未指定, 则默认将第一个维度映射至angle轴
21
- * 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
22
- * 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
23
- * 指标映射规则:
24
- * 1. 指标未配置`encoding`, 则默认映射至Y轴;
25
- * 2. 用户指定的`radius`指标映射至radius轴, 支持多个指标;
26
- * 3. 所有指标均映射到Tooltip
11
+ * 分组玫瑰图支持以下视觉通道:
12
+ * `angle` : 角度通道, 支持`多个维度`, 按维度值映射至角度轴
13
+ * `radius` : 半径通道, 支持`多个指标`, 按指标值映射至半径轴
14
+ * `detail` : 细分通道, 支持`多个维度`, 在同一个颜色系列下展示更细粒度的数据时使用
15
+ * `color` : 颜色通道, 支持`多个维度`或 `一个指标`, 维度颜色用于区分不同的数据系列, 指标颜色用于线性映射指标值到图形颜色
16
+ * `tooltip`: 提示通道, 支持`多个维度`与 `多个指标`, 会在鼠标悬停在数据点上时展示
17
+ * `label` : 标签通道, 支持`多个维度`与 `多个指标`, 会在数据点上展示数据标签
27
18
  * @warning
28
19
  * 数据要求:
29
20
  * - 至少1个数值字段(度量)
@@ -50,18 +41,6 @@ export interface RoseParallel {
50
41
  * @example [{month:'1月', value:100}, {month:'2月', value:150}, {month:'3月', value:120}]
51
42
  */
52
43
  dataset: Dataset;
53
- /**
54
- * @description 编码配置, 并列玫瑰图的视觉通道, 包括: angle通道, color通道, detail通道, label通道, tooltip通道
55
- * - angle: 映射到角度的字段, 支持放入多个维度
56
- * - detail: 细分映射通道, 支持放入多个维度
57
- * - tooltip: 提示映射通道, 支持放入多个维度 和 多个指标
58
- * - color: 颜色映射通道, 支持放入多个维度 或 1个 指标
59
- * - label: 标签映射通道, 支持放入 多个维度 或 多个指标
60
- *
61
- * @tip 特殊的:
62
- * - radius: measures会直接映射到半径通道
63
- */
64
- encoding?: Pick<Encoding, 'angle' | 'color' | 'detail' | 'label' | 'tooltip'>;
65
44
  /**
66
45
  * 维度
67
46
  * @description 玫瑰图的第一个维度被映射到角度轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示.
@@ -1,25 +1,16 @@
1
1
  import type { Locale } from '../../i18n';
2
- import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, PointStyle, Theme, Tooltip, CrosshairLine, YLinearAxis, XLinearAxis, MeasureTree, Encoding, ScatterMeasures } from '../../properties';
2
+ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, Color, Dataset, Dimensions, Label, Legend, PointStyle, Theme, Tooltip, CrosshairLine, YLinearAxis, XLinearAxis, MeasureTree, ScatterMeasures } from '../../properties';
3
3
  /**
4
4
  * @description 散点图,适用于展示数据的分布情况,通过点的位置表示数据的数值
5
5
  * 适用场景:
6
6
  * - 分析数据的分布特征, 如数据的中心趋势, 分布范围, 异常值等
7
7
  * @encoding
8
- * 维度未包含任何`encoding`, 则使用默认映射规则:
9
- * 1. color: 所有维度与指标名称, 合并映射至颜色通道, 作为图例展示
10
- * 2. detail: 所有维度与指标名称, 映射至Detail通道
11
- * 指标未包含任何`encoding`, 则使用默认映射规则:
12
- * 1. x: 第一个指标映射至X轴
13
- * 2. y: 第二个及其之后的指标映射至Y轴
14
- * 3. tooltip: 全部指标映射至Tooltip
15
- *
16
- * 维度映射规则:
17
- * 2. 用户指定的`color`维度映射至颜色通道, 支持多个维度; 若未指定, 则默认将指标名称映射至颜色通道, 作为图例展示
18
- * 3. 用户指定的`detail`维度映射至Detail通道, 支持多个维度; 若未指定, 则默认将指标名称映射至Detail通道
19
- * 指标映射规则:
20
- * 1. 指标未配置encoding, 则第一个指标默认映射至X轴, 第二个指标默认映射至Y轴
21
- * 2. 用户指定的yAxis指标映射至Y轴X轴, 支持多个指标;
22
- * 3. 所有指标均映射到Tooltip
8
+ * 散点图支持以下视觉通道:
9
+ * `xAxis` : x轴通道, 支持`多个指标`, 按指标值映射至x轴
10
+ * `yAxis` : y轴通道, 支持`多个指标`, 按指标值映射至y轴
11
+ * `color` : 颜色通道, 支持`多个维度`或 `一个指标`, 维度颜色用于区分不同的数据系列, 指标颜色用于线性映射指标值到图形颜色
12
+ * `tooltip`: 提示通道, 支持`多个维度`与 `多个指标`, 会在鼠标悬停在数据点上时展示
13
+ * `label` : 标签通道, 支持`多个维度`与 `多个指标`, 会在数据点上展示数据标签
23
14
  * @warning
24
15
  * 数据要求:
25
16
  * - 至少2个数值字段(度量)
@@ -46,18 +37,6 @@ export interface Scatter {
46
37
  * @example [{month:'1月', value:100}, {month:'2月', value:150}, {month:'3月', value:120}]
47
38
  */
48
39
  dataset: Dataset;
49
- /**
50
- * @description 编码配置, 散点图的视觉通道, 包括: color通道, detail通道, label通道, tooltip通道
51
- * - detail: 细分映射通道, 支持放入多个维度
52
- * - tooltip: 提示映射通道, 支持放入多个维度 和 多个指标
53
- * - color: 颜色映射通道, 支持放入多个维度 或 1个 指标
54
- * - label: 标签映射通道, 支持放入 多个维度 或 多个指标
55
- *
56
- * @tip 特殊的:
57
- * - x: measures会直接映射到X轴通道
58
- * - y: measures会直接映射到Y轴通道
59
- */
60
- encoding?: Pick<Encoding, 'color' | 'detail' | 'label' | 'tooltip'>;
61
40
  /**
62
41
  * 维度
63
42
  * @description 散点图的第一个维度被映射到X轴, 其余维度会与指标名称(存在多个指标时)合并, 作为图例项展示