@visactor/vseed 0.1.16 → 0.1.17

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 (84) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/pipeline/advanced/chart/pipeline/area.js +5 -2
  4. package/dist/esm/pipeline/advanced/chart/pipeline/area.js.map +1 -1
  5. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js +5 -2
  6. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js.map +1 -1
  7. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js +5 -2
  8. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js.map +1 -1
  9. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js +5 -2
  10. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js.map +1 -1
  11. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js +5 -2
  12. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js.map +1 -1
  13. package/dist/esm/pipeline/advanced/chart/pipeline/column.js +5 -2
  14. package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
  15. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js +5 -2
  16. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js.map +1 -1
  17. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js +5 -2
  18. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js.map +1 -1
  19. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +5 -2
  20. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
  21. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js +5 -2
  22. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js.map +1 -1
  23. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js +5 -2
  24. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js.map +1 -1
  25. package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js +5 -2
  26. package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js.map +1 -1
  27. package/dist/esm/pipeline/advanced/chart/pipeline/line.js +5 -2
  28. package/dist/esm/pipeline/advanced/chart/pipeline/line.js.map +1 -1
  29. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +5 -2
  30. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
  31. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js +5 -2
  32. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js.map +1 -1
  33. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js +5 -2
  34. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js.map +1 -1
  35. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js +5 -2
  36. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js.map +1 -1
  37. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js +6 -2
  38. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js.map +1 -1
  39. package/dist/esm/pipeline/advanced/chart/pipes/config/config.d.ts +0 -1
  40. package/dist/esm/pipeline/advanced/chart/pipes/config/config.js +1 -2
  41. package/dist/esm/pipeline/advanced/chart/pipes/config/config.js.map +1 -1
  42. package/dist/esm/pipeline/advanced/chart/pipes/config/index.d.ts +1 -0
  43. package/dist/esm/pipeline/advanced/chart/pipes/config/index.js +1 -0
  44. package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.d.ts +2 -0
  45. package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js +32 -0
  46. package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js.map +1 -0
  47. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js +1 -0
  48. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js.map +1 -1
  49. package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.d.ts +2 -0
  50. package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.js +12 -0
  51. package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.js.map +1 -0
  52. package/dist/esm/pipeline/advanced/chart/pipes/measures/index.d.ts +1 -1
  53. package/dist/esm/pipeline/advanced/chart/pipes/measures/index.js +2 -2
  54. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +3 -1
  55. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
  56. package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
  57. package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
  58. package/dist/esm/pipeline/spec/chart/pipes/size/index.d.ts +1 -0
  59. package/dist/esm/pipeline/spec/chart/pipes/size/index.js +2 -0
  60. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.d.ts +2 -0
  61. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js +22 -0
  62. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js.map +1 -0
  63. package/dist/esm/pipeline/utils/format/createNumFormatter.js +4 -1
  64. package/dist/esm/pipeline/utils/format/createNumFormatter.js.map +1 -1
  65. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +10 -40
  66. package/dist/esm/types/chartType/scatter/scatter.d.ts +14 -0
  67. package/dist/esm/types/chartType/scatter/zScatter.d.ts +12 -40
  68. package/dist/esm/types/chartType/scatter/zScatter.js +2 -0
  69. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  70. package/dist/esm/types/properties/measures/dualMeasures.d.ts +2 -2
  71. package/dist/esm/types/properties/measures/scatterMeasures.d.ts +2 -2
  72. package/dist/esm/types/properties/measures/zDualMeasures.d.ts +20 -80
  73. package/dist/esm/types/properties/measures/zDualMeasures.js +7 -1
  74. package/dist/esm/types/properties/measures/zDualMeasures.js.map +1 -1
  75. package/dist/esm/types/properties/measures/zScatterMeasures.d.ts +20 -80
  76. package/dist/esm/types/properties/measures/zScatterMeasures.js +8 -2
  77. package/dist/esm/types/properties/measures/zScatterMeasures.js.map +1 -1
  78. package/dist/esm/types/zVseed.d.ts +22 -80
  79. package/dist/umd/index.js +150 -30
  80. package/dist/umd/index.js.map +1 -1
  81. package/package.json +1 -1
  82. package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteTooltipAndLabelMeasure.d.ts +0 -2
  83. package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteTooltipAndLabelMeasure.js +0 -12
  84. package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteTooltipAndLabelMeasure.js.map +0 -1
@@ -73,7 +73,6 @@ const pieConfig = (advancedVSeed, context)=>{
73
73
  };
74
74
  const areaConfig = lineConfig;
75
75
  const areaPercentConfig = lineConfig;
76
- const scatterConfig = lineConfig;
77
76
  const barConfig = columnConfig;
78
77
  const barParallelConfig = columnConfig;
79
78
  const barPercentConfig = columnConfig;
@@ -85,6 +84,6 @@ const roseParallelConfig = pieConfig;
85
84
  const funnelConfig = pieConfig;
86
85
  const heatmapConfig = pieConfig;
87
86
  const radarConfig = pieConfig;
88
- export { areaConfig, areaPercentConfig, barConfig, barParallelConfig, barPercentConfig, columnConfig, columnParallelConfig, columnPercentConfig, donutConfig, funnelConfig, heatmapConfig, lineConfig, pieConfig, radarConfig, roseConfig, roseParallelConfig, scatterConfig };
87
+ export { areaConfig, areaPercentConfig, barConfig, barParallelConfig, barPercentConfig, columnConfig, columnParallelConfig, columnPercentConfig, donutConfig, funnelConfig, heatmapConfig, lineConfig, pieConfig, radarConfig, roseConfig, roseParallelConfig };
89
88
 
90
89
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/config/config.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/config/config.ts"],"sourcesContent":["import { pick } from 'remeda'\nimport { replaceNullToUndefined } from 'src/pipeline/utils'\nimport type { AdvancedPipe, AdvancedVSeed, Config } from 'src/types'\n\nexport const lineConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const pickedConfig = pick(vseed, [\n 'backgroundColor',\n 'color',\n 'label',\n 'legend',\n 'tooltip',\n 'xAxis',\n 'yAxis',\n 'crosshairLine',\n ]) as Config['line']\n\n const config = replaceNullToUndefined(pickedConfig)\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n\nexport const columnConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const config = pick(vseed, [\n 'backgroundColor',\n 'color',\n 'label',\n 'legend',\n 'tooltip',\n 'xAxis',\n 'yAxis',\n 'crosshairRect',\n 'stackCornerRadius',\n ]) as Config['column']\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n\nexport const pieConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const config = pick(vseed, ['backgroundColor', 'color', 'label', 'legend', 'tooltip']) as Config['pie']\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n\nexport const areaConfig: AdvancedPipe = lineConfig\nexport const areaPercentConfig: AdvancedPipe = lineConfig\nexport const scatterConfig: AdvancedPipe = lineConfig\n\nexport const barConfig: AdvancedPipe = columnConfig\nexport const barParallelConfig: AdvancedPipe = columnConfig\nexport const barPercentConfig: AdvancedPipe = columnConfig\nexport const columnParallelConfig: AdvancedPipe = columnConfig\nexport const columnPercentConfig: AdvancedPipe = columnConfig\n\nexport const donutConfig: AdvancedPipe = pieConfig\nexport const roseConfig: AdvancedPipe = pieConfig\nexport const roseParallelConfig: AdvancedPipe = pieConfig\nexport const funnelConfig: AdvancedPipe = pieConfig\nexport const heatmapConfig: AdvancedPipe = pieConfig\nexport const radarConfig: AdvancedPipe = pieConfig\n"],"names":["lineConfig","advancedVSeed","context","vseed","chartType","result","pickedConfig","pick","config","replaceNullToUndefined","columnConfig","pieConfig","areaConfig","areaPercentConfig","scatterConfig","barConfig","barParallelConfig","barPercentConfig","columnParallelConfig","columnPercentConfig","donutConfig","roseConfig","roseParallelConfig","funnelConfig","heatmapConfig","radarConfig"],"mappings":";;AAIO,MAAMA,aAA2B,CAACC,eAAeC;IACtD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMK,eAAeC,KAAKJ,OAAO;QAC/B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAED,MAAMK,SAASC,uBAAuBH;IAEtCD,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT;AAEO,MAAMK,eAA6B,CAACT,eAAeC;IACxD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMO,SAASD,KAAKJ,OAAO;QACzB;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAEDE,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT;AAEO,MAAMM,YAA0B,CAACV,eAAeC;IACrD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMO,SAASD,KAAKJ,OAAO;QAAC;QAAmB;QAAS;QAAS;QAAU;KAAU;IAErFE,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT;AAEO,MAAMO,aAA2BZ;AACjC,MAAMa,oBAAkCb;AACxC,MAAMc,gBAA8Bd;AAEpC,MAAMe,YAA0BL;AAChC,MAAMM,oBAAkCN;AACxC,MAAMO,mBAAiCP;AACvC,MAAMQ,uBAAqCR;AAC3C,MAAMS,sBAAoCT;AAE1C,MAAMU,cAA4BT;AAClC,MAAMU,aAA2BV;AACjC,MAAMW,qBAAmCX;AACzC,MAAMY,eAA6BZ;AACnC,MAAMa,gBAA8Bb;AACpC,MAAMc,cAA4Bd"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/config/config.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/config/config.ts"],"sourcesContent":["import { pick } from 'remeda'\nimport { replaceNullToUndefined } from 'src/pipeline/utils'\nimport type { AdvancedPipe, AdvancedVSeed, Config } from 'src/types'\n\nexport const lineConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const pickedConfig = pick(vseed, [\n 'backgroundColor',\n 'color',\n 'label',\n 'legend',\n 'tooltip',\n 'xAxis',\n 'yAxis',\n 'crosshairLine',\n ]) as Config['line']\n\n const config = replaceNullToUndefined(pickedConfig)\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n\nexport const columnConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const config = pick(vseed, [\n 'backgroundColor',\n 'color',\n 'label',\n 'legend',\n 'tooltip',\n 'xAxis',\n 'yAxis',\n 'crosshairRect',\n 'stackCornerRadius',\n ]) as Config['column']\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n\nexport const pieConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const config = pick(vseed, ['backgroundColor', 'color', 'label', 'legend', 'tooltip']) as Config['pie']\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n\nexport const areaConfig: AdvancedPipe = lineConfig\nexport const areaPercentConfig: AdvancedPipe = lineConfig\n\nexport const barConfig: AdvancedPipe = columnConfig\nexport const barParallelConfig: AdvancedPipe = columnConfig\nexport const barPercentConfig: AdvancedPipe = columnConfig\nexport const columnParallelConfig: AdvancedPipe = columnConfig\nexport const columnPercentConfig: AdvancedPipe = columnConfig\n\nexport const donutConfig: AdvancedPipe = pieConfig\nexport const roseConfig: AdvancedPipe = pieConfig\nexport const roseParallelConfig: AdvancedPipe = pieConfig\nexport const funnelConfig: AdvancedPipe = pieConfig\nexport const heatmapConfig: AdvancedPipe = pieConfig\nexport const radarConfig: AdvancedPipe = pieConfig\n"],"names":["lineConfig","advancedVSeed","context","vseed","chartType","result","pickedConfig","pick","config","replaceNullToUndefined","columnConfig","pieConfig","areaConfig","areaPercentConfig","barConfig","barParallelConfig","barPercentConfig","columnParallelConfig","columnPercentConfig","donutConfig","roseConfig","roseParallelConfig","funnelConfig","heatmapConfig","radarConfig"],"mappings":";;AAIO,MAAMA,aAA2B,CAACC,eAAeC;IACtD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMK,eAAeC,KAAKJ,OAAO;QAC/B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAED,MAAMK,SAASC,uBAAuBH;IAEtCD,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT;AAEO,MAAMK,eAA6B,CAACT,eAAeC;IACxD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMO,SAASD,KAAKJ,OAAO;QACzB;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAEDE,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT;AAEO,MAAMM,YAA0B,CAACV,eAAeC;IACrD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMO,SAASD,KAAKJ,OAAO;QAAC;QAAmB;QAAS;QAAS;QAAU;KAAU;IAErFE,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT;AAEO,MAAMO,aAA2BZ;AACjC,MAAMa,oBAAkCb;AAExC,MAAMc,YAA0BJ;AAChC,MAAMK,oBAAkCL;AACxC,MAAMM,mBAAiCN;AACvC,MAAMO,uBAAqCP;AAC3C,MAAMQ,sBAAoCR;AAE1C,MAAMS,cAA4BR;AAClC,MAAMS,aAA2BT;AACjC,MAAMU,qBAAmCV;AACzC,MAAMW,eAA6BX;AACnC,MAAMY,gBAA8BZ;AACpC,MAAMa,cAA4Bb"}
@@ -1,2 +1,3 @@
1
1
  export * from './config';
2
2
  export * from './dualAxis';
3
+ export * from './scatter';
@@ -1,2 +1,3 @@
1
1
  export * from "./config.js";
2
2
  export * from "./dualAxis.js";
3
+ export * from "./scatter.js";
@@ -0,0 +1,2 @@
1
+ import type { AdvancedPipe } from '../../../../../types';
2
+ export declare const scatterConfig: AdvancedPipe;
@@ -0,0 +1,32 @@
1
+ import { pick } from "remeda";
2
+ import { replaceNullToUndefined } from "../../../../utils/index.js";
3
+ const scatterConfig = (advancedVSeed, context)=>{
4
+ const { vseed } = context;
5
+ const { chartType } = vseed;
6
+ const result = {
7
+ ...advancedVSeed
8
+ };
9
+ const pickedConfig = pick(vseed, [
10
+ 'backgroundColor',
11
+ 'color',
12
+ 'label',
13
+ 'legend',
14
+ 'tooltip',
15
+ 'xAxis',
16
+ 'yAxis',
17
+ 'sizeRange',
18
+ 'size',
19
+ 'crosshairLine'
20
+ ]);
21
+ const config = replaceNullToUndefined(pickedConfig);
22
+ result.config = {
23
+ ...result.config || {},
24
+ [chartType]: {
25
+ ...config
26
+ }
27
+ };
28
+ return result;
29
+ };
30
+ export { scatterConfig };
31
+
32
+ //# sourceMappingURL=scatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/config/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/config/scatter.ts"],"sourcesContent":["import { pick } from 'remeda'\nimport { replaceNullToUndefined } from 'src/pipeline/utils'\nimport type { AdvancedPipe, AdvancedVSeed, Config } from 'src/types'\n\nexport const scatterConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const pickedConfig = pick(vseed, [\n 'backgroundColor',\n 'color',\n 'label',\n 'legend',\n 'tooltip',\n 'xAxis',\n 'yAxis',\n 'sizeRange',\n 'size',\n 'crosshairLine',\n ]) as Config['line']\n\n const config = replaceNullToUndefined(pickedConfig)\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n"],"names":["scatterConfig","advancedVSeed","context","vseed","chartType","result","pickedConfig","pick","config","replaceNullToUndefined"],"mappings":";;AAIO,MAAMA,gBAA8B,CAACC,eAAeC;IACzD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMK,eAAeC,KAAKJ,OAAO;QAC/B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAED,MAAMK,SAASC,uBAAuBH;IAEtCD,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT"}
@@ -58,6 +58,7 @@ const generateMeasureEncoding = (measures, encoding)=>{
58
58
  if (color.length > 0) encoding.color = [
59
59
  color[0]
60
60
  ];
61
+ encoding.size = unique(measures.filter((item)=>'size' === item.encoding).map((item)=>item.id));
61
62
  const label = unique(measures.filter((item)=>'label' === item.encoding).map((item)=>item.id));
62
63
  encoding.label = unique([
63
64
  ...encoding.label || [],
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/encoding/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/encoding/scatter.ts"],"sourcesContent":["import { unique } from 'remeda'\nimport { MeasureName } from 'src/dataReshape'\nimport { findAllMeasures } from 'src/pipeline/utils'\nimport type { AdvancedPipe, Dimension, Dimensions, Encoding, Measure, Measures } from 'src/types'\nimport { addColorToEncoding } from './color'\n\nexport const defaultEncodingForScatter: AdvancedPipe = (advancedVSeed) => {\n const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed\n const measures = findAllMeasures(vseedMeasures)\n const encoding: Encoding = {}\n generateDefaultDimensionEncoding(dimensions, encoding)\n generateDefaultMeasureEncoding(measures, encoding)\n return { ...advancedVSeed, encoding }\n}\n\nexport const encodingForScatter: AdvancedPipe = (advancedVSeed) => {\n const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed\n // prepare measures and dimensions\n const measures = findAllMeasures(vseedMeasures)\n\n // exist encoding condition\n const hasDimensionEncoding = dimensions.some((item: Dimension) => item.encoding)\n const hasMeasureEncoding = measures.some((item: Measure) => item.encoding)\n\n // encoding for modify in place\n const encoding: Encoding = {}\n\n if (hasDimensionEncoding) {\n generateDimensionEncoding(dimensions, encoding)\n } else {\n generateDefaultDimensionEncoding(dimensions, encoding)\n }\n\n if (hasMeasureEncoding) {\n generateMeasureEncoding(measures, encoding)\n } else {\n generateDefaultMeasureEncoding(measures, encoding)\n }\n\n return { ...advancedVSeed, encoding }\n}\n/**\n * --------------------维度--------------------\n */\nconst generateDefaultDimensionEncoding = (dimensions: Dimensions, encoding: Encoding) => {\n const dimensionsWithoutMeasureName = dimensions.filter((item) => item.id !== MeasureName)\n const uniqueDimIds = unique(dimensionsWithoutMeasureName.map((d) => d.id))\n encoding.color = uniqueDimIds.slice(0)\n encoding.detail = encoding.color\n encoding.tooltip = uniqueDimIds.filter((d) => d !== MeasureName) // 展示指标名称之外的所有维度\n encoding.label = [] // 默认不展示标签\n encoding.row = [] // 默认不进行行透视\n encoding.column = [] // 默认不进行列透视\n}\nconst generateDimensionEncoding = (dimensions: Dimensions, encoding: Encoding) => {\n // color\n addColorToEncoding(dimensions, encoding, false)\n\n // detail\n encoding.detail = unique(dimensions.filter((item) => item.encoding === 'detail').map((item) => item.id))\n if (encoding.detail.length === 0) {\n encoding.detail = [MeasureName]\n }\n // tooltip\n encoding.tooltip = unique(dimensions.map((item) => item.id))\n encoding.tooltip = encoding.tooltip.filter((d) => d !== MeasureName)\n\n // label\n encoding.label = unique(dimensions.filter((item) => item.encoding === 'label').map((item) => item.id))\n encoding.label = encoding.label.filter((d) => d !== MeasureName)\n}\n\n/**\n * --------------------指标--------------------\n */\nconst generateDefaultMeasureEncoding = (measures: Measures, encoding: Encoding) => {\n encoding.y = unique(\n measures\n .filter((item) => item.encoding === 'xAxis' || item.encoding === 'yAxis' || !item.encoding)\n .map((item) => item.id),\n )\n}\nconst generateMeasureEncoding = (measures: Measures, encoding: Encoding) => {\n encoding.y = unique(\n measures\n .filter((item) => item.encoding === 'xAxis' || item.encoding === 'yAxis' || !item.encoding)\n .map((item) => item.id),\n )\n const color = unique(measures.filter((item) => item.encoding === 'color').map((item) => item.id))\n if (color.length > 0) {\n encoding.color = [color[0]]\n }\n\n // label\n const label = unique(measures.filter((item) => item.encoding === 'label').map((item) => item.id))\n encoding.label = unique([...(encoding.label || []), ...label])\n\n // tooltip\n const tooltip = unique(measures.filter((item) => item.encoding === 'tooltip').map((item) => item.id))\n encoding.tooltip = unique([...(encoding.tooltip || []), ...label, ...tooltip])\n}\n"],"names":["defaultEncodingForScatter","advancedVSeed","vseedMeasures","dimensions","measures","findAllMeasures","encoding","generateDefaultDimensionEncoding","generateDefaultMeasureEncoding","encodingForScatter","hasDimensionEncoding","item","hasMeasureEncoding","generateDimensionEncoding","generateMeasureEncoding","dimensionsWithoutMeasureName","MeasureName","uniqueDimIds","unique","d","addColorToEncoding","color","label","tooltip"],"mappings":"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"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/encoding/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/encoding/scatter.ts"],"sourcesContent":["import { unique } from 'remeda'\nimport { MeasureName } from 'src/dataReshape'\nimport { findAllMeasures } from 'src/pipeline/utils'\nimport type { AdvancedPipe, Dimension, Dimensions, Encoding, Measure, Measures } from 'src/types'\nimport { addColorToEncoding } from './color'\n\nexport const defaultEncodingForScatter: AdvancedPipe = (advancedVSeed) => {\n const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed\n const measures = findAllMeasures(vseedMeasures)\n const encoding: Encoding = {}\n generateDefaultDimensionEncoding(dimensions, encoding)\n generateDefaultMeasureEncoding(measures, encoding)\n return { ...advancedVSeed, encoding }\n}\n\nexport const encodingForScatter: AdvancedPipe = (advancedVSeed) => {\n const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed\n // prepare measures and dimensions\n const measures = findAllMeasures(vseedMeasures)\n\n // exist encoding condition\n const hasDimensionEncoding = dimensions.some((item: Dimension) => item.encoding)\n const hasMeasureEncoding = measures.some((item: Measure) => item.encoding)\n\n // encoding for modify in place\n const encoding: Encoding = {}\n\n if (hasDimensionEncoding) {\n generateDimensionEncoding(dimensions, encoding)\n } else {\n generateDefaultDimensionEncoding(dimensions, encoding)\n }\n\n if (hasMeasureEncoding) {\n generateMeasureEncoding(measures, encoding)\n } else {\n generateDefaultMeasureEncoding(measures, encoding)\n }\n\n return { ...advancedVSeed, encoding }\n}\n/**\n * --------------------维度--------------------\n */\nconst generateDefaultDimensionEncoding = (dimensions: Dimensions, encoding: Encoding) => {\n const dimensionsWithoutMeasureName = dimensions.filter((item) => item.id !== MeasureName)\n const uniqueDimIds = unique(dimensionsWithoutMeasureName.map((d) => d.id))\n encoding.color = uniqueDimIds.slice(0)\n encoding.detail = encoding.color\n encoding.tooltip = uniqueDimIds.filter((d) => d !== MeasureName) // 展示指标名称之外的所有维度\n encoding.label = [] // 默认不展示标签\n encoding.row = [] // 默认不进行行透视\n encoding.column = [] // 默认不进行列透视\n}\nconst generateDimensionEncoding = (dimensions: Dimensions, encoding: Encoding) => {\n // color\n addColorToEncoding(dimensions, encoding, false)\n\n // detail\n encoding.detail = unique(dimensions.filter((item) => item.encoding === 'detail').map((item) => item.id))\n if (encoding.detail.length === 0) {\n encoding.detail = [MeasureName]\n }\n // tooltip\n encoding.tooltip = unique(dimensions.map((item) => item.id))\n encoding.tooltip = encoding.tooltip.filter((d) => d !== MeasureName)\n\n // label\n encoding.label = unique(dimensions.filter((item) => item.encoding === 'label').map((item) => item.id))\n encoding.label = encoding.label.filter((d) => d !== MeasureName)\n}\n\n/**\n * --------------------指标--------------------\n */\nconst generateDefaultMeasureEncoding = (measures: Measures, encoding: Encoding) => {\n encoding.y = unique(\n measures\n .filter((item) => item.encoding === 'xAxis' || item.encoding === 'yAxis' || !item.encoding)\n .map((item) => item.id),\n )\n}\nconst generateMeasureEncoding = (measures: Measures, encoding: Encoding) => {\n encoding.y = unique(\n measures\n .filter((item) => item.encoding === 'xAxis' || item.encoding === 'yAxis' || !item.encoding)\n .map((item) => item.id),\n )\n const color = unique(measures.filter((item) => item.encoding === 'color').map((item) => item.id))\n if (color.length > 0) {\n encoding.color = [color[0]]\n }\n\n // size\n encoding.size = unique(measures.filter((item) => item.encoding === 'size').map((item) => item.id))\n\n // label\n const label = unique(measures.filter((item) => item.encoding === 'label').map((item) => item.id))\n encoding.label = unique([...(encoding.label || []), ...label])\n\n // tooltip\n const tooltip = unique(measures.filter((item) => item.encoding === 'tooltip').map((item) => item.id))\n encoding.tooltip = unique([...(encoding.tooltip || []), ...label, ...tooltip])\n}\n"],"names":["defaultEncodingForScatter","advancedVSeed","vseedMeasures","dimensions","measures","findAllMeasures","encoding","generateDefaultDimensionEncoding","generateDefaultMeasureEncoding","encodingForScatter","hasDimensionEncoding","item","hasMeasureEncoding","generateDimensionEncoding","generateMeasureEncoding","dimensionsWithoutMeasureName","MeasureName","uniqueDimIds","unique","d","addColorToEncoding","color","label","tooltip"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import type { AdvancedPipe } from '../../../../../types';
2
+ export declare const deleteEncodingForMeasure: (encodingKeys: string[]) => AdvancedPipe;
@@ -0,0 +1,12 @@
1
+ import { deleteMeasureTreeByCallback } from "../../../../utils/index.js";
2
+ const deleteEncodingForMeasure = (encodingKeys)=>(advancedVSeed)=>{
3
+ const deleteBy = (measure)=>encodingKeys.includes(measure.encoding);
4
+ const measureTree = deleteMeasureTreeByCallback(advancedVSeed.measures, deleteBy);
5
+ return {
6
+ ...advancedVSeed,
7
+ measures: measureTree
8
+ };
9
+ };
10
+ export { deleteEncodingForMeasure };
11
+
12
+ //# sourceMappingURL=deleteEncodingForMeasure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.ts"],"sourcesContent":["import { deleteMeasureTreeByCallback } from 'src/pipeline/utils'\nimport type { AdvancedPipe, Measure } from 'src/types'\n\nexport const deleteEncodingForMeasure = (encodingKeys: string[]): AdvancedPipe => {\n return (advancedVSeed) => {\n const deleteBy = (measure: Measure) => encodingKeys.includes(measure.encoding as string)\n\n const measureTree = deleteMeasureTreeByCallback(advancedVSeed.measures, deleteBy)\n\n return {\n ...advancedVSeed,\n measures: measureTree,\n }\n }\n}\n"],"names":["deleteEncodingForMeasure","encodingKeys","advancedVSeed","deleteBy","measure","measureTree","deleteMeasureTreeByCallback"],"mappings":";AAGO,MAAMA,2BAA2B,CAACC,eAChC,CAACC;QACN,MAAMC,WAAW,CAACC,UAAqBH,aAAa,QAAQ,CAACG,QAAQ,QAAQ;QAE7E,MAAMC,cAAcC,4BAA4BJ,cAAc,QAAQ,EAAEC;QAExE,OAAO;YACL,GAAGD,aAAa;YAChB,UAAUG;QACZ;IACF"}
@@ -2,4 +2,4 @@ export * from './utils';
2
2
  export { buildMeasuresForDualAxis } from './buildMeasuresForDualAxis';
3
3
  export { buildMeasures } from './buildMeasures';
4
4
  export { buildMeasuresForScatter } from './buildMeasuresForScatter';
5
- export { deleteTooltipAndLabelMeasure } from './deleteTooltipAndLabelMeasure';
5
+ export { deleteEncodingForMeasure } from './deleteEncodingForMeasure';
@@ -1,6 +1,6 @@
1
1
  import { buildMeasuresForDualAxis } from "./buildMeasuresForDualAxis.js";
2
2
  import { buildMeasures } from "./buildMeasures.js";
3
3
  import { buildMeasuresForScatter } from "./buildMeasuresForScatter.js";
4
- import { deleteTooltipAndLabelMeasure } from "./deleteTooltipAndLabelMeasure.js";
4
+ import { deleteEncodingForMeasure } from "./deleteEncodingForMeasure.js";
5
5
  export * from "./utils.js";
6
- export { buildMeasures, buildMeasuresForDualAxis, buildMeasuresForScatter, deleteTooltipAndLabelMeasure };
6
+ export { buildMeasures, buildMeasuresForDualAxis, buildMeasuresForScatter, deleteEncodingForMeasure };
@@ -1,4 +1,4 @@
1
- import { annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorPointStyleFill, datasetPivot, datasetScatter, discreteLegend, horizontalCrosshairLine, initPivot, initScatter, labelScatter, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pointStateHover, pointStyle, progressive, tooltipScatter, verticalCrosshairLine, xLinear, yLinear } from "../pipes/index.js";
1
+ import { annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorPointStyleFill, datasetPivot, datasetScatter, discreteLegend, horizontalCrosshairLine, initPivot, initScatter, labelScatter, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pointStateHover, pointStyle, progressive, scatterSize, tooltipScatter, verticalCrosshairLine, xLinear, yLinear } from "../pipes/index.js";
2
2
  const scatter = [
3
3
  initScatter,
4
4
  colorAdapter(color, linearColor),
@@ -7,6 +7,7 @@ const scatter = [
7
7
  progressive,
8
8
  xLinear,
9
9
  yLinear,
10
+ scatterSize,
10
11
  labelScatter,
11
12
  tooltipScatter,
12
13
  colorAdapter(discreteLegend, colorLegend),
@@ -32,6 +33,7 @@ const pivotScatter = [
32
33
  progressive,
33
34
  xLinear,
34
35
  yLinear,
36
+ scatterSize,
35
37
  labelScatter,
36
38
  tooltipScatter,
37
39
  verticalCrosshairLine,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/scatter.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n yLinear,\n backgroundColor,\n tooltipScatter,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n verticalCrosshairLine,\n xLinear,\n horizontalCrosshairLine,\n pointStateHover,\n initScatter,\n progressive,\n datasetScatter,\n linearColor,\n colorAdapter,\n colorPointStyleFill,\n colorLegend,\n pivotColorLegend,\n labelScatter,\n} from '../pipes'\n\nconst scatter: SpecPipeline = [\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n labelScatter,\n tooltipScatter,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotScatter: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n labelScatter,\n tooltipScatter,\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const scatterSpecPipeline: SpecPipeline = [pivotAdapter(scatter, pivotScatter)]\n"],"names":["scatter","initScatter","colorAdapter","color","linearColor","backgroundColor","datasetScatter","progressive","xLinear","yLinear","labelScatter","tooltipScatter","discreteLegend","colorLegend","verticalCrosshairLine","horizontalCrosshairLine","colorPointStyleFill","pointStyle","pointStateHover","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotScatter","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","scatterSpecPipeline","pivotAdapter"],"mappings":";AAoCA,MAAMA,UAAwB;IAC5BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,gBAAgBC;IAC7BC;IACAC;IACAC,oBAAoBC;IACpBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd3B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAG;QACAC;QACAC,oBAAoBC;QACpBC;QACAC;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACA5B,aAAa6B,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAalC,SAASuB;CAAc"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/scatter.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n yLinear,\n backgroundColor,\n tooltipScatter,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n verticalCrosshairLine,\n xLinear,\n horizontalCrosshairLine,\n pointStateHover,\n initScatter,\n progressive,\n datasetScatter,\n linearColor,\n colorAdapter,\n colorPointStyleFill,\n colorLegend,\n pivotColorLegend,\n labelScatter,\n scatterSize,\n} from '../pipes'\n\nconst scatter: SpecPipeline = [\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotScatter: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const scatterSpecPipeline: SpecPipeline = [pivotAdapter(scatter, pivotScatter)]\n"],"names":["scatter","initScatter","colorAdapter","color","linearColor","backgroundColor","datasetScatter","progressive","xLinear","yLinear","scatterSize","labelScatter","tooltipScatter","discreteLegend","colorLegend","verticalCrosshairLine","horizontalCrosshairLine","colorPointStyleFill","pointStyle","pointStateHover","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotScatter","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","scatterSpecPipeline","pivotAdapter"],"mappings":";AAqCA,MAAMA,UAAwB;IAC5BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAV,aAAaW,gBAAgBC;IAC7BC;IACAC;IACAC,oBAAoBC;IACpBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd5B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAG;QACAC;QACAC,oBAAoBC;QACpBC;QACAC;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACA7B,aAAa8B,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAanC,SAASwB;CAAc"}
@@ -14,3 +14,4 @@ export * from './annotation';
14
14
  export * from './crosshair';
15
15
  export * from './series';
16
16
  export * from './dual';
17
+ export * from './size';
@@ -14,3 +14,4 @@ export * from "./annotation/index.js";
14
14
  export * from "./crosshair/index.js";
15
15
  export * from "./series/index.js";
16
16
  export * from "./dual/index.js";
17
+ export * from "./size/index.js";
@@ -0,0 +1 @@
1
+ export { scatterSize } from './scatterSize';
@@ -0,0 +1,2 @@
1
+ import { scatterSize } from "./scatterSize.js";
2
+ export { scatterSize };
@@ -0,0 +1,2 @@
1
+ import type { SpecPipe } from '../../../../../types';
2
+ export declare const scatterSize: SpecPipe;
@@ -0,0 +1,22 @@
1
+ const scatterSize = (spec, context)=>{
2
+ const result = {
3
+ ...spec
4
+ };
5
+ const { advancedVSeed } = context;
6
+ const { chartType, encoding } = advancedVSeed;
7
+ const baseConfig = advancedVSeed.config[chartType];
8
+ if (!baseConfig || !baseConfig.sizeRange && !baseConfig.size) return result;
9
+ const size = baseConfig.size ?? baseConfig.sizeRange;
10
+ result.size = {
11
+ type: 'linear',
12
+ range: Array.isArray(size) ? size : [
13
+ size,
14
+ size
15
+ ]
16
+ };
17
+ result.sizeField = encoding?.size?.[0] || void 0;
18
+ return result;
19
+ };
20
+ export { scatterSize };
21
+
22
+ //# sourceMappingURL=scatterSize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/size/scatterSize.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/size/scatterSize.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const scatterSize: SpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed } = context\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as {\n sizeRange: number | number[]\n size?: number | number[]\n }\n\n if (!baseConfig || (!baseConfig.sizeRange && !baseConfig.size)) {\n return result\n }\n\n const size = baseConfig.size ?? baseConfig.sizeRange\n\n result.size = {\n type: 'linear',\n range: Array.isArray(size) ? size : [size, size],\n } as IScatterChartSpec['size']\n\n result.sizeField = encoding?.size?.[0] || undefined\n\n return result\n}\n"],"names":["scatterSize","spec","context","result","advancedVSeed","chartType","encoding","baseConfig","size","Array","undefined"],"mappings":"AAGO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGF;IAChC,MAAMG,aAAaH,cAAc,MAAM,CAACC,UAAU;IAKlD,IAAI,CAACE,cAAe,CAACA,WAAW,SAAS,IAAI,CAACA,WAAW,IAAI,EAC3D,OAAOJ;IAGT,MAAMK,OAAOD,WAAW,IAAI,IAAIA,WAAW,SAAS;IAEpDJ,OAAO,IAAI,GAAG;QACZ,MAAM;QACN,OAAOM,MAAM,OAAO,CAACD,QAAQA,OAAO;YAACA;YAAMA;SAAK;IAClD;IAEAL,OAAO,SAAS,GAAGG,UAAU,MAAM,CAAC,EAAE,IAAII;IAE1C,OAAOP;AACT"}
@@ -20,7 +20,10 @@ const createNumFormatter = (format, locale = intl.getLocale())=>{
20
20
  numFormatterOptions.maximumSignificantDigits = significantDigits;
21
21
  }
22
22
  }
23
- const numFormatter = new Intl.NumberFormat(locale, numFormatterOptions);
23
+ const numFormatter = new Intl.NumberFormat(locale, {
24
+ ...numFormatterOptions,
25
+ useGrouping: thousandSeparator
26
+ });
24
27
  return (value)=>{
25
28
  let num = Number(value);
26
29
  let typeSymbol = '';
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/utils/format/createNumFormatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/format/createNumFormatter.ts"],"sourcesContent":["import { isNumber } from 'remeda'\nimport { intl } from '../../../i18n'\nimport type { Formatter, Locale, NumFormat } from 'src/types'\n\nexport const createNumFormatter = (format?: Partial<NumFormat>, locale: Locale = intl.getLocale()): Formatter => {\n const {\n type = 'number',\n ratio = 1,\n symbol = '',\n thousandSeparator = true,\n prefix = '',\n suffix = '',\n\n fractionDigits = 2,\n significantDigits,\n roundingMode = 'halfExpand',\n roundingPriority = 'auto',\n } = format || {}\n\n const numFormatterOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n notation: type === 'scientific' ? 'scientific' : 'standard',\n // @ts-expect-error roundingMode is not in NumberFormatOptions\n roundingMode,\n roundingPriority,\n }\n\n if (isNumber(fractionDigits)) {\n if (fractionDigits >= 0) {\n numFormatterOptions.minimumFractionDigits = fractionDigits\n numFormatterOptions.maximumFractionDigits = fractionDigits\n }\n }\n if (isNumber(significantDigits) && significantDigits > 0) {\n if (significantDigits > 0) {\n numFormatterOptions.minimumSignificantDigits = significantDigits\n numFormatterOptions.maximumSignificantDigits = significantDigits\n }\n }\n\n const numFormatter = new Intl.NumberFormat(locale, numFormatterOptions)\n\n return (value?: number | string) => {\n let num = Number(value)\n let typeSymbol = ''\n if (Number.isNaN(num)) {\n return String(value)\n }\n\n // apply ratio for percent/permille\n if (type === 'percent') {\n num *= 100\n typeSymbol = '%'\n } else if (type === 'permille') {\n num *= 1000\n typeSymbol = '‰'\n } else if (type === 'number') {\n num = num / (ratio || 1)\n }\n\n // format value\n let numStr = numFormatter.format(num)\n\n // add thousand separator\n if (thousandSeparator) {\n const parts = numStr.split('.')\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n numStr = parts.join('.')\n }\n\n // add symbol, typeSymbol, prefix and suffix\n return `${prefix}${numStr}${typeSymbol}${symbol}${suffix}`\n }\n}\n\nexport const autoNumFormatter = (value?: number | string, locale: Locale = intl.getLocale()): string => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const numFormatterOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n notation: 'compact',\n }\n numFormatterOptions.minimumFractionDigits = 0\n numFormatterOptions.maximumFractionDigits = 2\n\n const numFormatter = new Intl.NumberFormat(locale, { ...numFormatterOptions })\n\n return numFormatter.format(Number(value))\n}\n"],"names":["createNumFormatter","format","locale","intl","type","ratio","symbol","thousandSeparator","prefix","suffix","fractionDigits","significantDigits","roundingMode","roundingPriority","numFormatterOptions","isNumber","numFormatter","Intl","value","num","Number","typeSymbol","String","numStr","parts","autoNumFormatter"],"mappings":";;AAIO,MAAMA,qBAAqB,CAACC,QAA6BC,SAAiBC,KAAK,SAAS,EAAE;IAC/F,MAAM,EACJC,OAAO,QAAQ,EACfC,QAAQ,CAAC,EACTC,SAAS,EAAE,EACXC,oBAAoB,IAAI,EACxBC,SAAS,EAAE,EACXC,SAAS,EAAE,EAEXC,iBAAiB,CAAC,EAClBC,iBAAiB,EACjBC,eAAe,YAAY,EAC3BC,mBAAmB,MAAM,EAC1B,GAAGZ,UAAU,CAAC;IAEf,MAAMa,sBAAgD;QACpD,OAAO;QACP,UAAUV,AAAS,iBAATA,OAAwB,eAAe;QAEjDQ;QACAC;IACF;IAEA,IAAIE,SAASL,iBACX;QAAA,IAAIA,kBAAkB,GAAG;YACvBI,oBAAoB,qBAAqB,GAAGJ;YAC5CI,oBAAoB,qBAAqB,GAAGJ;QAC9C;IAAA;IAEF,IAAIK,SAASJ,sBAAsBA,oBAAoB,GACrD;QAAA,IAAIA,oBAAoB,GAAG;YACzBG,oBAAoB,wBAAwB,GAAGH;YAC/CG,oBAAoB,wBAAwB,GAAGH;QACjD;IAAA;IAGF,MAAMK,eAAe,IAAIC,KAAK,YAAY,CAACf,QAAQY;IAEnD,OAAO,CAACI;QACN,IAAIC,MAAMC,OAAOF;QACjB,IAAIG,aAAa;QACjB,IAAID,OAAO,KAAK,CAACD,MACf,OAAOG,OAAOJ;QAIhB,IAAId,AAAS,cAATA,MAAoB;YACtBe,OAAO;YACPE,aAAa;QACf,OAAO,IAAIjB,AAAS,eAATA,MAAqB;YAC9Be,OAAO;YACPE,aAAa;QACf,OAAO,IAAIjB,AAAS,aAATA,MACTe,OAAad,SAAS;QAIxB,IAAIkB,SAASP,aAAa,MAAM,CAACG;QAGjC,IAAIZ,mBAAmB;YACrB,MAAMiB,QAAQD,OAAO,KAAK,CAAC;YAC3BC,KAAK,CAAC,EAAE,GAAGA,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,yBAAyB;YACrDD,SAASC,MAAM,IAAI,CAAC;QACtB;QAGA,OAAO,GAAGhB,SAASe,SAASF,aAAaf,SAASG,QAAQ;IAC5D;AACF;AAEO,MAAMgB,mBAAmB,CAACP,OAAyBhB,SAAiBC,KAAK,SAAS,EAAE;IACzF,IAAIe,QAAAA,OAAuC,OAAOI,OAAOJ;IACzD,MAAMC,MAAMC,OAAOF;IACnB,IAAIE,OAAO,KAAK,CAACD,MAAM,OAAOG,OAAOJ;IAErC,MAAMJ,sBAAgD;QACpD,OAAO;QACP,UAAU;IACZ;IACAA,oBAAoB,qBAAqB,GAAG;IAC5CA,oBAAoB,qBAAqB,GAAG;IAE5C,MAAME,eAAe,IAAIC,KAAK,YAAY,CAACf,QAAQ;QAAE,GAAGY,mBAAmB;IAAC;IAE5E,OAAOE,aAAa,MAAM,CAACI,OAAOF;AACpC"}
1
+ {"version":3,"file":"pipeline/utils/format/createNumFormatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/format/createNumFormatter.ts"],"sourcesContent":["import { isNumber } from 'remeda'\nimport { intl } from '../../../i18n'\nimport type { Formatter, Locale, NumFormat } from 'src/types'\n\nexport const createNumFormatter = (format?: Partial<NumFormat>, locale: Locale = intl.getLocale()): Formatter => {\n const {\n type = 'number',\n ratio = 1,\n symbol = '',\n thousandSeparator = true,\n prefix = '',\n suffix = '',\n\n fractionDigits = 2,\n significantDigits,\n roundingMode = 'halfExpand',\n roundingPriority = 'auto',\n } = format || {}\n\n const numFormatterOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n notation: type === 'scientific' ? 'scientific' : 'standard',\n // @ts-expect-error roundingMode is not in NumberFormatOptions\n roundingMode,\n roundingPriority,\n }\n\n if (isNumber(fractionDigits)) {\n if (fractionDigits >= 0) {\n numFormatterOptions.minimumFractionDigits = fractionDigits\n numFormatterOptions.maximumFractionDigits = fractionDigits\n }\n }\n if (isNumber(significantDigits) && significantDigits > 0) {\n if (significantDigits > 0) {\n numFormatterOptions.minimumSignificantDigits = significantDigits\n numFormatterOptions.maximumSignificantDigits = significantDigits\n }\n }\n\n const numFormatter = new Intl.NumberFormat(locale, { ...numFormatterOptions, useGrouping: thousandSeparator })\n\n return (value?: number | string) => {\n let num = Number(value)\n let typeSymbol = ''\n if (Number.isNaN(num)) {\n return String(value)\n }\n\n // apply ratio for percent/permille\n if (type === 'percent') {\n num *= 100\n typeSymbol = '%'\n } else if (type === 'permille') {\n num *= 1000\n typeSymbol = '‰'\n } else if (type === 'number') {\n num = num / (ratio || 1)\n }\n\n // format value\n let numStr = numFormatter.format(num)\n\n // add thousand separator\n if (thousandSeparator) {\n const parts = numStr.split('.')\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n numStr = parts.join('.')\n }\n\n // add symbol, typeSymbol, prefix and suffix\n return `${prefix}${numStr}${typeSymbol}${symbol}${suffix}`\n }\n}\n\nexport const autoNumFormatter = (value?: number | string, locale: Locale = intl.getLocale()): string => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const numFormatterOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n notation: 'compact',\n }\n numFormatterOptions.minimumFractionDigits = 0\n numFormatterOptions.maximumFractionDigits = 2\n\n const numFormatter = new Intl.NumberFormat(locale, { ...numFormatterOptions })\n\n return numFormatter.format(Number(value))\n}\n"],"names":["createNumFormatter","format","locale","intl","type","ratio","symbol","thousandSeparator","prefix","suffix","fractionDigits","significantDigits","roundingMode","roundingPriority","numFormatterOptions","isNumber","numFormatter","Intl","value","num","Number","typeSymbol","String","numStr","parts","autoNumFormatter"],"mappings":";;AAIO,MAAMA,qBAAqB,CAACC,QAA6BC,SAAiBC,KAAK,SAAS,EAAE;IAC/F,MAAM,EACJC,OAAO,QAAQ,EACfC,QAAQ,CAAC,EACTC,SAAS,EAAE,EACXC,oBAAoB,IAAI,EACxBC,SAAS,EAAE,EACXC,SAAS,EAAE,EAEXC,iBAAiB,CAAC,EAClBC,iBAAiB,EACjBC,eAAe,YAAY,EAC3BC,mBAAmB,MAAM,EAC1B,GAAGZ,UAAU,CAAC;IAEf,MAAMa,sBAAgD;QACpD,OAAO;QACP,UAAUV,AAAS,iBAATA,OAAwB,eAAe;QAEjDQ;QACAC;IACF;IAEA,IAAIE,SAASL,iBACX;QAAA,IAAIA,kBAAkB,GAAG;YACvBI,oBAAoB,qBAAqB,GAAGJ;YAC5CI,oBAAoB,qBAAqB,GAAGJ;QAC9C;IAAA;IAEF,IAAIK,SAASJ,sBAAsBA,oBAAoB,GACrD;QAAA,IAAIA,oBAAoB,GAAG;YACzBG,oBAAoB,wBAAwB,GAAGH;YAC/CG,oBAAoB,wBAAwB,GAAGH;QACjD;IAAA;IAGF,MAAMK,eAAe,IAAIC,KAAK,YAAY,CAACf,QAAQ;QAAE,GAAGY,mBAAmB;QAAE,aAAaP;IAAkB;IAE5G,OAAO,CAACW;QACN,IAAIC,MAAMC,OAAOF;QACjB,IAAIG,aAAa;QACjB,IAAID,OAAO,KAAK,CAACD,MACf,OAAOG,OAAOJ;QAIhB,IAAId,AAAS,cAATA,MAAoB;YACtBe,OAAO;YACPE,aAAa;QACf,OAAO,IAAIjB,AAAS,eAATA,MAAqB;YAC9Be,OAAO;YACPE,aAAa;QACf,OAAO,IAAIjB,AAAS,aAATA,MACTe,OAAad,SAAS;QAIxB,IAAIkB,SAASP,aAAa,MAAM,CAACG;QAGjC,IAAIZ,mBAAmB;YACrB,MAAMiB,QAAQD,OAAO,KAAK,CAAC;YAC3BC,KAAK,CAAC,EAAE,GAAGA,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,yBAAyB;YACrDD,SAASC,MAAM,IAAI,CAAC;QACtB;QAGA,OAAO,GAAGhB,SAASe,SAASF,aAAaf,SAASG,QAAQ;IAC5D;AACF;AAEO,MAAMgB,mBAAmB,CAACP,OAAyBhB,SAAiBC,KAAK,SAAS,EAAE;IACzF,IAAIe,QAAAA,OAAuC,OAAOI,OAAOJ;IACzD,MAAMC,MAAMC,OAAOF;IACnB,IAAIE,OAAO,KAAK,CAACD,MAAM,OAAOG,OAAOJ;IAErC,MAAMJ,sBAAgD;QACpD,OAAO;QACP,UAAU;IACZ;IACAA,oBAAoB,qBAAqB,GAAG;IAC5CA,oBAAoB,qBAAqB,GAAG;IAE5C,MAAME,eAAe,IAAIC,KAAK,YAAY,CAACf,QAAQ;QAAE,GAAGY,mBAAmB;IAAC;IAE5E,OAAOE,aAAa,MAAM,CAACI,OAAOF;AACpC"}
@@ -100,10 +100,7 @@ export declare const zDualAxis: z.ZodObject<{
100
100
  dualMeasures: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
101
101
  id: z.ZodString;
102
102
  primaryMeasures: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
103
- id: z.ZodString;
104
- alias: z.ZodOptional<z.ZodString>;
105
- autoFormat: z.ZodDefault<z.ZodBoolean>;
106
- numFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
103
+ format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
107
104
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
108
105
  number: "number";
109
106
  percent: "percent";
@@ -133,7 +130,10 @@ export declare const zDualAxis: z.ZodObject<{
133
130
  halfEven: "halfEven";
134
131
  }>>>;
135
132
  }, z.core.$strip>>>;
136
- format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
133
+ id: z.ZodString;
134
+ alias: z.ZodOptional<z.ZodString>;
135
+ autoFormat: z.ZodDefault<z.ZodBoolean>;
136
+ numFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
137
137
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
138
138
  number: "number";
139
139
  percent: "percent";
@@ -163,26 +163,8 @@ export declare const zDualAxis: z.ZodObject<{
163
163
  halfEven: "halfEven";
164
164
  }>>>;
165
165
  }, z.core.$strip>>>;
166
- encoding: z.ZodOptional<z.ZodEnum<{
167
- column: "column";
168
- xAxis: "xAxis";
169
- yAxis: "yAxis";
170
- angle: "angle";
171
- color: "color";
172
- detail: "detail";
173
- tooltip: "tooltip";
174
- label: "label";
175
- primaryYAxis: "primaryYAxis";
176
- secondaryYAxis: "secondaryYAxis";
177
- radius: "radius";
178
- size: "size";
179
- }>>;
180
- parentId: z.ZodOptional<z.ZodString>;
181
166
  }, z.core.$strip>>, z.ZodObject<{
182
- id: z.ZodString;
183
- alias: z.ZodOptional<z.ZodString>;
184
- autoFormat: z.ZodDefault<z.ZodBoolean>;
185
- numFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
167
+ format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
186
168
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
187
169
  number: "number";
188
170
  percent: "percent";
@@ -212,7 +194,10 @@ export declare const zDualAxis: z.ZodObject<{
212
194
  halfEven: "halfEven";
213
195
  }>>>;
214
196
  }, z.core.$strip>>>;
215
- format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
197
+ id: z.ZodString;
198
+ alias: z.ZodOptional<z.ZodString>;
199
+ autoFormat: z.ZodDefault<z.ZodBoolean>;
200
+ numFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
216
201
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
217
202
  number: "number";
218
203
  percent: "percent";
@@ -242,21 +227,6 @@ export declare const zDualAxis: z.ZodObject<{
242
227
  halfEven: "halfEven";
243
228
  }>>>;
244
229
  }, z.core.$strip>>>;
245
- encoding: z.ZodOptional<z.ZodEnum<{
246
- column: "column";
247
- xAxis: "xAxis";
248
- yAxis: "yAxis";
249
- angle: "angle";
250
- color: "color";
251
- detail: "detail";
252
- tooltip: "tooltip";
253
- label: "label";
254
- primaryYAxis: "primaryYAxis";
255
- secondaryYAxis: "secondaryYAxis";
256
- radius: "radius";
257
- size: "size";
258
- }>>;
259
- parentId: z.ZodOptional<z.ZodString>;
260
230
  }, z.core.$strip>]>>;
261
231
  secondaryMeasures: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
262
232
  id: z.ZodString;
@@ -126,6 +126,20 @@ export interface Scatter {
126
126
  * ]
127
127
  */
128
128
  scatterMeasures?: ScatterMeasures;
129
+ /**
130
+ * @description 散点图指标的大小, 用于定义散点图中数据点的大小 或 大小范围
131
+ * - 若大小范围是一个数字, 例如10, 表示数据点的大小范围固定为10
132
+ * - 若大小范围是一个长度为2的数组, 例如[10, 40], 表示数据点的大小范围在10到40之间
133
+ * - 与sizeRange互斥, 优先级低于 size
134
+ */
135
+ size?: number | number[];
136
+ /**
137
+ * @description 散点图指标的大小范围, 用于定义散点图中数据点的大小范围,
138
+ * - 若大小范围是一个长度为2的数组, 例如[10, 40], 表示数据点的大小范围在10到40之间
139
+ * - 若大小范围是一个数字, 例如10, 表示数据点的大小范围固定为10
140
+ * - 与sizeRange互斥, 优先级高于 size
141
+ */
142
+ sizeRange?: number | number[];
129
143
  /**
130
144
  * 图表的背景颜色
131
145
  * @default transparent 默认为透明背景
@@ -114,10 +114,7 @@ export declare const zScatter: z.ZodObject<{
114
114
  scatterMeasures: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
115
115
  id: z.ZodString;
116
116
  xMeasures: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
117
- id: z.ZodString;
118
- alias: z.ZodOptional<z.ZodString>;
119
- autoFormat: z.ZodDefault<z.ZodBoolean>;
120
- numFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
117
+ format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
121
118
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
122
119
  number: "number";
123
120
  percent: "percent";
@@ -147,7 +144,10 @@ export declare const zScatter: z.ZodObject<{
147
144
  halfEven: "halfEven";
148
145
  }>>>;
149
146
  }, z.core.$strip>>>;
150
- format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
147
+ id: z.ZodString;
148
+ alias: z.ZodOptional<z.ZodString>;
149
+ autoFormat: z.ZodDefault<z.ZodBoolean>;
150
+ numFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
151
151
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
152
152
  number: "number";
153
153
  percent: "percent";
@@ -177,21 +177,6 @@ export declare const zScatter: z.ZodObject<{
177
177
  halfEven: "halfEven";
178
178
  }>>>;
179
179
  }, z.core.$strip>>>;
180
- encoding: z.ZodOptional<z.ZodEnum<{
181
- column: "column";
182
- xAxis: "xAxis";
183
- yAxis: "yAxis";
184
- angle: "angle";
185
- color: "color";
186
- detail: "detail";
187
- tooltip: "tooltip";
188
- label: "label";
189
- primaryYAxis: "primaryYAxis";
190
- secondaryYAxis: "secondaryYAxis";
191
- radius: "radius";
192
- size: "size";
193
- }>>;
194
- parentId: z.ZodOptional<z.ZodString>;
195
180
  }, z.core.$strip>>, z.ZodObject<{
196
181
  id: z.ZodString;
197
182
  alias: z.ZodOptional<z.ZodString>;
@@ -273,10 +258,7 @@ export declare const zScatter: z.ZodObject<{
273
258
  parentId: z.ZodOptional<z.ZodString>;
274
259
  }, z.core.$strip>]>>;
275
260
  yMeasures: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
276
- id: z.ZodString;
277
- alias: z.ZodOptional<z.ZodString>;
278
- autoFormat: z.ZodDefault<z.ZodBoolean>;
279
- numFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
261
+ format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
280
262
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
281
263
  number: "number";
282
264
  percent: "percent";
@@ -306,7 +288,10 @@ export declare const zScatter: z.ZodObject<{
306
288
  halfEven: "halfEven";
307
289
  }>>>;
308
290
  }, z.core.$strip>>>;
309
- format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
291
+ id: z.ZodString;
292
+ alias: z.ZodOptional<z.ZodString>;
293
+ autoFormat: z.ZodDefault<z.ZodBoolean>;
294
+ numFormat: z.ZodDefault<z.ZodOptional<z.ZodObject<{
310
295
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
311
296
  number: "number";
312
297
  percent: "percent";
@@ -336,21 +321,6 @@ export declare const zScatter: z.ZodObject<{
336
321
  halfEven: "halfEven";
337
322
  }>>>;
338
323
  }, z.core.$strip>>>;
339
- encoding: z.ZodOptional<z.ZodEnum<{
340
- column: "column";
341
- xAxis: "xAxis";
342
- yAxis: "yAxis";
343
- angle: "angle";
344
- color: "color";
345
- detail: "detail";
346
- tooltip: "tooltip";
347
- label: "label";
348
- primaryYAxis: "primaryYAxis";
349
- secondaryYAxis: "secondaryYAxis";
350
- radius: "radius";
351
- size: "size";
352
- }>>;
353
- parentId: z.ZodOptional<z.ZodString>;
354
324
  }, z.core.$strip>>, z.ZodObject<{
355
325
  id: z.ZodString;
356
326
  alias: z.ZodOptional<z.ZodString>;
@@ -433,6 +403,8 @@ export declare const zScatter: z.ZodObject<{
433
403
  }, z.core.$strip>]>>;
434
404
  }, z.core.$strip>>>>;
435
405
  backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>>>;
406
+ size: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
407
+ sizeRange: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
436
408
  color: z.ZodOptional<z.ZodNullable<z.ZodObject<{
437
409
  colorScheme: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
438
410
  linearColorScheme: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -9,6 +9,8 @@ const zScatter = z.object({
9
9
  measures: zMeasureTree.nullish(),
10
10
  scatterMeasures: zScatterMeasures.nullish(),
11
11
  backgroundColor: zBackgroundColor.nullish(),
12
+ size: z.number().or(z.array(z.number())).nullish(),
13
+ sizeRange: z.number().or(z.array(z.number())).nullish(),
12
14
  color: zColor.nullish(),
13
15
  label: zLabel.nullish(),
14
16
  legend: zLegend.nullish(),
@@ -1 +1 @@
1
- {"version":3,"file":"types/chartType/scatter/zScatter.js","sources":["webpack://@visactor/vseed/./src/types/chartType/scatter/zScatter.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zBackgroundColor,\n zColor,\n zCrosshairLine,\n zDataset,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zMeasureTree,\n zPointStyle,\n zScatterMeasures,\n zTheme,\n zTooltip,\n zXLinearAxis,\n zYLinearAxis,\n} from '../../properties'\n\nexport const zScatter = z.object({\n chartType: z.literal('scatter'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasureTree.nullish(),\n scatterMeasures: zScatterMeasures.nullish(),\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n tooltip: zTooltip.nullish(),\n xAxis: zXLinearAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n theme: zTheme.nullish(),\n pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zScatter","z","zDataset","zEncoding","zDimensions","zMeasureTree","zScatterMeasures","zBackgroundColor","zColor","zLabel","zLegend","zTooltip","zXLinearAxis","zYLinearAxis","zCrosshairLine","zTheme","zPointStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zLocale"],"mappings":";;;AAwBO,MAAMA,WAAWC,EAAE,MAAM,CAAC;IAC/B,WAAWA,EAAE,OAAO,CAAC;IACrB,SAASC,SAAS,OAAO;IACzB,UAAUC,UAAU,OAAO;IAC3B,YAAYC,YAAY,OAAO;IAC/B,UAAUC,aAAa,OAAO;IAC9B,iBAAiBC,iBAAiB,OAAO;IACzC,iBAAiBC,iBAAiB,OAAO;IACzC,OAAOC,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,QAAQC,QAAQ,OAAO;IACvB,SAASC,SAAS,OAAO;IACzB,OAAOC,aAAa,OAAO;IAC3B,OAAOC,aAAa,OAAO;IAC3B,eAAeC,eAAe,OAAO;IACrC,OAAOC,OAAO,OAAO;IACrB,YAAYd,EAAE,KAAK,CAACe,aAAa,EAAE,CAACA,aAAa,OAAO;IACxD,iBAAiBf,EAAE,KAAK,CAACgB,kBAAkB,EAAE,CAACA,kBAAkB,OAAO;IACvE,wBAAwBhB,EAAE,KAAK,CAACiB,yBAAyB,EAAE,CAACA,yBAAyB,OAAO;IAC5F,0BAA0BjB,EAAE,KAAK,CAACkB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,gBAAgBlB,EAAE,KAAK,CAACmB,iBAAiB,EAAE,CAACA,iBAAiB,OAAO;IACpE,QAAQC,QAAQ,OAAO;AACzB"}
1
+ {"version":3,"file":"types/chartType/scatter/zScatter.js","sources":["webpack://@visactor/vseed/./src/types/chartType/scatter/zScatter.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zBackgroundColor,\n zColor,\n zCrosshairLine,\n zDataset,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zMeasureTree,\n zPointStyle,\n zScatterMeasures,\n zTheme,\n zTooltip,\n zXLinearAxis,\n zYLinearAxis,\n} from '../../properties'\n\nexport const zScatter = z.object({\n chartType: z.literal('scatter'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasureTree.nullish(),\n scatterMeasures: zScatterMeasures.nullish(),\n backgroundColor: zBackgroundColor.nullish(),\n size: z.number().or(z.array(z.number())).nullish(),\n sizeRange: z.number().or(z.array(z.number())).nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n tooltip: zTooltip.nullish(),\n xAxis: zXLinearAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n theme: zTheme.nullish(),\n pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zScatter","z","zDataset","zEncoding","zDimensions","zMeasureTree","zScatterMeasures","zBackgroundColor","zColor","zLabel","zLegend","zTooltip","zXLinearAxis","zYLinearAxis","zCrosshairLine","zTheme","zPointStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zLocale"],"mappings":";;;AAwBO,MAAMA,WAAWC,EAAE,MAAM,CAAC;IAC/B,WAAWA,EAAE,OAAO,CAAC;IACrB,SAASC,SAAS,OAAO;IACzB,UAAUC,UAAU,OAAO;IAC3B,YAAYC,YAAY,OAAO;IAC/B,UAAUC,aAAa,OAAO;IAC9B,iBAAiBC,iBAAiB,OAAO;IACzC,iBAAiBC,iBAAiB,OAAO;IACzC,MAAMN,EAAE,MAAM,GAAG,EAAE,CAACA,EAAE,KAAK,CAACA,EAAE,MAAM,KAAK,OAAO;IAChD,WAAWA,EAAE,MAAM,GAAG,EAAE,CAACA,EAAE,KAAK,CAACA,EAAE,MAAM,KAAK,OAAO;IACrD,OAAOO,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,QAAQC,QAAQ,OAAO;IACvB,SAASC,SAAS,OAAO;IACzB,OAAOC,aAAa,OAAO;IAC3B,OAAOC,aAAa,OAAO;IAC3B,eAAeC,eAAe,OAAO;IACrC,OAAOC,OAAO,OAAO;IACrB,YAAYd,EAAE,KAAK,CAACe,aAAa,EAAE,CAACA,aAAa,OAAO;IACxD,iBAAiBf,EAAE,KAAK,CAACgB,kBAAkB,EAAE,CAACA,kBAAkB,OAAO;IACvE,wBAAwBhB,EAAE,KAAK,CAACiB,yBAAyB,EAAE,CAACA,yBAAyB,OAAO;IAC5F,0BAA0BjB,EAAE,KAAK,CAACkB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,gBAAgBlB,EAAE,KAAK,CAACmB,iBAAiB,EAAE,CAACA,iBAAiB,OAAO;IACpE,QAAQC,QAAQ,OAAO;AACzB"}
@@ -1,7 +1,7 @@
1
1
  import type { Measure } from './measures';
2
2
  export type DualMeasure = {
3
3
  id: string;
4
- primaryMeasures?: Measure | Measure[];
5
- secondaryMeasures?: Measure | Measure[];
4
+ primaryMeasures?: Omit<Measure, 'encoding' | 'parentId'> | Omit<Measure, 'encoding' | 'parentId'>[];
5
+ secondaryMeasures?: Omit<Measure, 'encoding' | 'parentId'> | Omit<Measure, 'encoding' | 'parentId'>[];
6
6
  };
7
7
  export type DualMeasures = DualMeasure[];
@@ -1,7 +1,7 @@
1
1
  import type { Measure } from './measures';
2
2
  export type ScatterMeasure = {
3
3
  id: string;
4
- xMeasures?: Measure | Measure[];
5
- yMeasures?: Measure | Measure[];
4
+ xMeasures?: Omit<Measure, 'encoding' | 'parentId'> | Omit<Measure, 'encoding' | 'parentId'>[];
5
+ yMeasures?: Omit<Measure, 'encoding' | 'parentId'> | Omit<Measure, 'encoding' | 'parentId'>[];
6
6
  };
7
7
  export type ScatterMeasures = ScatterMeasure[];