@visactor/vseed 0.1.22 → 0.1.24

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 (112) hide show
  1. package/dist/cjs/index.cjs +2 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/pipeline/advanced/chart/pipeline/area.js +2 -1
  4. package/dist/esm/pipeline/advanced/chart/pipeline/area.js.map +1 -1
  5. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js +2 -1
  6. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js.map +1 -1
  7. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js +2 -1
  8. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js.map +1 -1
  9. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js +2 -1
  10. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js.map +1 -1
  11. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js +2 -1
  12. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js.map +1 -1
  13. package/dist/esm/pipeline/advanced/chart/pipeline/column.js +2 -1
  14. package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
  15. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js +2 -1
  16. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js.map +1 -1
  17. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js +2 -1
  18. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js.map +1 -1
  19. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +2 -1
  20. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
  21. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js +2 -1
  22. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js.map +1 -1
  23. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js +2 -1
  24. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js.map +1 -1
  25. package/dist/esm/pipeline/advanced/chart/pipeline/line.js +2 -1
  26. package/dist/esm/pipeline/advanced/chart/pipeline/line.js.map +1 -1
  27. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +2 -1
  28. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
  29. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js +2 -1
  30. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js.map +1 -1
  31. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js +2 -1
  32. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js.map +1 -1
  33. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js +2 -1
  34. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js.map +1 -1
  35. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js +2 -2
  36. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
  37. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +1 -1
  38. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  39. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +2 -2
  40. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
  41. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js +2 -2
  42. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
  43. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +2 -1
  44. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
  45. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js +2 -2
  46. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
  47. package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.d.ts +1 -0
  48. package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.js +7 -1
  49. package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.js.map +1 -1
  50. package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.js +1 -4
  51. package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.js.map +1 -1
  52. package/dist/esm/pipeline/spec/chart/pipes/axes/radarRadius.js +1 -4
  53. package/dist/esm/pipeline/spec/chart/pipes/axes/radarRadius.js.map +1 -1
  54. package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js +1 -4
  55. package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js.map +1 -1
  56. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +0 -11
  57. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
  58. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js +9 -15
  59. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
  60. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +0 -11
  61. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
  62. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js +9 -15
  63. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
  64. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js +0 -13
  65. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js.map +1 -1
  66. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js +0 -14
  67. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js.map +1 -1
  68. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.d.ts +3 -3
  69. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js +8 -6
  70. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js.map +1 -1
  71. package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js +2 -2
  72. package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js.map +1 -1
  73. package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js +2 -2
  74. package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js.map +1 -1
  75. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js +2 -2
  76. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js.map +1 -1
  77. package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js +2 -2
  78. package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js.map +1 -1
  79. package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js +2 -2
  80. package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js.map +1 -1
  81. package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js +2 -2
  82. package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js.map +1 -1
  83. package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js +2 -2
  84. package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js.map +1 -1
  85. package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js +2 -2
  86. package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js.map +1 -1
  87. package/dist/esm/pipeline/spec/chart/pipes/init/area.js +2 -2
  88. package/dist/esm/pipeline/spec/chart/pipes/init/area.js.map +1 -1
  89. package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js +2 -2
  90. package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js.map +1 -1
  91. package/dist/esm/pipeline/spec/chart/pipes/init/line.js +2 -2
  92. package/dist/esm/pipeline/spec/chart/pipes/init/line.js.map +1 -1
  93. package/dist/esm/pipeline/spec/chart/pipes/init/radar.js +2 -2
  94. package/dist/esm/pipeline/spec/chart/pipes/init/radar.js.map +1 -1
  95. package/dist/esm/pipeline/utils/chatType.d.ts +4 -1
  96. package/dist/esm/pipeline/utils/chatType.js +8 -5
  97. package/dist/esm/pipeline/utils/chatType.js.map +1 -1
  98. package/dist/esm/pipeline/utils/constant.d.ts +22 -0
  99. package/dist/esm/pipeline/utils/constant.js +23 -1
  100. package/dist/esm/pipeline/utils/constant.js.map +1 -1
  101. package/dist/esm/pipeline/utils/format/createNumFormatter.js +2 -1
  102. package/dist/esm/pipeline/utils/format/createNumFormatter.js.map +1 -1
  103. package/dist/esm/pipeline/utils/index.d.ts +1 -0
  104. package/dist/esm/pipeline/utils/index.js +1 -0
  105. package/dist/esm/theme/light.js +3 -12
  106. package/dist/esm/theme/light.js.map +1 -1
  107. package/dist/esm/types/properties/chartType/chartType.d.ts +0 -22
  108. package/dist/esm/types/properties/chartType/chartType.js +1 -23
  109. package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
  110. package/dist/umd/index.js +267 -283
  111. package/dist/umd/index.js.map +1 -1
  112. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorAreaStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorAreaStyleFill.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorAreaStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IAreaChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.area?.style) {\n result.area.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorAreaStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;QAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcH,gBAChB;YAAA,IAAID,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;gBACvB,OAAOG,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOH;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorAreaStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorAreaStyleFill.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorAreaStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IAreaChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.area?.style) {\n result.area.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorAreaStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;gBACvB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -1,10 +1,10 @@
1
1
  import { isLinearColor } from "./colorAdapter.js";
2
2
  const colorBarStyleFill = (stylePipe)=>(spec, context)=>{
3
3
  const result = stylePipe(spec, context);
4
- const { advancedVSeed } = context;
4
+ const { advancedVSeed, vseed } = context;
5
5
  const { datasetReshapeInfo } = advancedVSeed;
6
6
  const { unfoldInfo } = datasetReshapeInfo[0];
7
- if (isLinearColor(advancedVSeed)) {
7
+ if (isLinearColor(advancedVSeed, vseed)) {
8
8
  if (result?.bar?.style) result.bar.style.fill = {
9
9
  field: unfoldInfo.encodingColor,
10
10
  scale: 'color'
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorBarStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorBarStyleFill.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorBarStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IBarChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.bar?.style) {\n result.bar.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorBarStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,oBAAoB,CAACC,YACzB,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;QAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcH,gBAChB;YAAA,IAAID,QAAQ,KAAK,OACfA,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG;gBACtB,OAAOG,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOH;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorBarStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorBarStyleFill.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorBarStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IBarChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.bar?.style) {\n result.bar.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorBarStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,oBAAoB,CAACC,YACzB,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,KAAK,OACfA,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG;gBACtB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -1,10 +1,10 @@
1
1
  import { isLinearColor } from "./colorAdapter.js";
2
2
  const colorCellStyleFill = (stylePipe)=>(spec, context)=>{
3
3
  const result = stylePipe(spec, context);
4
- const { advancedVSeed } = context;
4
+ const { advancedVSeed, vseed } = context;
5
5
  const { datasetReshapeInfo } = advancedVSeed;
6
6
  const { unfoldInfo } = datasetReshapeInfo[0];
7
- if (isLinearColor(advancedVSeed)) {
7
+ if (isLinearColor(advancedVSeed, vseed)) {
8
8
  if (result?.cell?.style) result.cell.style.fill = {
9
9
  field: unfoldInfo.encodingColor,
10
10
  scale: 'color'
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorCellStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorCellStyleFill.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorCellStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IHeatmapChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.cell?.style) {\n result.cell.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorCellStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;QAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcH,gBAChB;YAAA,IAAID,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;gBACvB,OAAOG,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOH;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorCellStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorCellStyleFill.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorCellStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IHeatmapChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.cell?.style) {\n result.cell.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorCellStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;gBACvB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -1,10 +1,10 @@
1
1
  import { isLinearColor } from "./colorAdapter.js";
2
2
  const colorFunnelStyleFill = (stylePipe)=>(spec, context)=>{
3
3
  const result = stylePipe(spec, context);
4
- const { advancedVSeed } = context;
4
+ const { advancedVSeed, vseed } = context;
5
5
  const { datasetReshapeInfo } = advancedVSeed;
6
6
  const { unfoldInfo } = datasetReshapeInfo[0];
7
- if (isLinearColor(advancedVSeed)) {
7
+ if (isLinearColor(advancedVSeed, vseed)) {
8
8
  if (result?.funnel?.style) result.funnel.style.fill = {
9
9
  field: unfoldInfo.encodingColor,
10
10
  scale: 'color'
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.ts"],"sourcesContent":["import type { IFunnelChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorFunnelStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IFunnelChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.funnel?.style) {\n result.funnel.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorFunnelStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,uBAAuB,CAACC,YAC5B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;QAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcH,gBAChB;YAAA,IAAID,QAAQ,QAAQ,OAClBA,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG;gBACzB,OAAOG,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOH;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.ts"],"sourcesContent":["import type { IFunnelChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorFunnelStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IFunnelChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.funnel?.style) {\n result.funnel.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorFunnelStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,uBAAuB,CAACC,YAC5B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,QAAQ,OAClBA,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG;gBACzB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -1,10 +1,10 @@
1
1
  import { isLinearColor } from "./colorAdapter.js";
2
2
  const colorLineStyleFill = (stylePipe)=>(spec, context)=>{
3
3
  const result = stylePipe(spec, context);
4
- const { advancedVSeed } = context;
4
+ const { advancedVSeed, vseed } = context;
5
5
  const { datasetReshapeInfo } = advancedVSeed;
6
6
  const { unfoldInfo } = datasetReshapeInfo[0];
7
- if (isLinearColor(advancedVSeed)) {
7
+ if (isLinearColor(advancedVSeed, vseed)) {
8
8
  if (result?.line?.style) result.line.style.stroke = {
9
9
  field: unfoldInfo.encodingColor,
10
10
  scale: 'color'
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorLineStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorLineStyleFill.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorLineStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as ILineChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.line?.style) {\n result.line.style.stroke = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorLineStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;QAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcH,gBAChB;YAAA,IAAID,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG;gBACzB,OAAOG,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOH;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorLineStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorLineStyleFill.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorLineStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as ILineChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.line?.style) {\n result.line.style.stroke = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorLineStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG;gBACzB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -1,10 +1,10 @@
1
1
  import { isLinearColor } from "./colorAdapter.js";
2
2
  const colorPieStyleFill = (stylePipe)=>(spec, context)=>{
3
3
  const result = stylePipe(spec, context);
4
- const { advancedVSeed } = context;
4
+ const { advancedVSeed, vseed } = context;
5
5
  const { datasetReshapeInfo } = advancedVSeed;
6
6
  const { unfoldInfo } = datasetReshapeInfo[0];
7
- if (isLinearColor(advancedVSeed)) {
7
+ if (isLinearColor(advancedVSeed, vseed)) {
8
8
  if (result?.pie?.style) result.pie.style.fill = {
9
9
  field: unfoldInfo.encodingColor,
10
10
  scale: 'color'
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorPieStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorPieStyleFill.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorPieStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IPieChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.pie?.style) {\n result.pie.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorPieStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,oBAAoB,CAACC,YACzB,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;QAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcH,gBAChB;YAAA,IAAID,QAAQ,KAAK,OACfA,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG;gBACtB,OAAOG,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOH;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorPieStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorPieStyleFill.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorPieStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IPieChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.pie?.style) {\n result.pie.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorPieStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,oBAAoB,CAACC,YACzB,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,KAAK,OACfA,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG;gBACtB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -1,10 +1,10 @@
1
1
  import { isLinearColor } from "./colorAdapter.js";
2
2
  const colorPointStyleFill = (stylePipe)=>(spec, context)=>{
3
3
  const result = stylePipe(spec, context);
4
- const { advancedVSeed } = context;
4
+ const { advancedVSeed, vseed } = context;
5
5
  const { datasetReshapeInfo } = advancedVSeed;
6
6
  const { unfoldInfo } = datasetReshapeInfo[0];
7
- if (isLinearColor(advancedVSeed)) {
7
+ if (isLinearColor(advancedVSeed, vseed)) {
8
8
  if (result?.point?.style) result.point.style.fill = {
9
9
  field: unfoldInfo.encodingColor,
10
10
  scale: 'color'
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorPointStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorPointStyleFill.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorPointStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as ILineChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.point?.style) {\n result.point.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorPointStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,sBAAsB,CAACC,YAC3B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;QAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcH,gBAChB;YAAA,IAAID,QAAQ,OAAO,OACjBA,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG;gBACxB,OAAOG,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOH;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorPointStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorPointStyleFill.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorPointStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as ILineChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.point?.style) {\n result.point.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorPointStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,sBAAsB,CAACC,YAC3B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,OAAO,OACjBA,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG;gBACxB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -1,10 +1,10 @@
1
1
  import { isLinearColor } from "./colorAdapter.js";
2
2
  const colorRoseStyleFill = (stylePipe)=>(spec, context)=>{
3
3
  const result = stylePipe(spec, context);
4
- const { advancedVSeed } = context;
4
+ const { advancedVSeed, vseed } = context;
5
5
  const { datasetReshapeInfo } = advancedVSeed;
6
6
  const { unfoldInfo } = datasetReshapeInfo[0];
7
- if (isLinearColor(advancedVSeed)) {
7
+ if (isLinearColor(advancedVSeed, vseed)) {
8
8
  if (result?.rose?.style) result.rose.style.fill = {
9
9
  field: unfoldInfo.encodingColor,
10
10
  scale: 'color'
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorRoseStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorRoseStyleFill.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorRoseStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IRoseChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.rose?.style) {\n result.rose.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorRoseStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;QAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcH,gBAChB;YAAA,IAAID,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;gBACvB,OAAOG,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOH;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorRoseStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorRoseStyleFill.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorRoseStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IRoseChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.rose?.style) {\n result.rose.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorRoseStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;gBACvB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -3,14 +3,14 @@ const initArea = (spec, context)=>{
3
3
  const result = {
4
4
  ...spec
5
5
  };
6
- const { advancedVSeed } = context;
6
+ const { advancedVSeed, vseed } = context;
7
7
  const { datasetReshapeInfo } = advancedVSeed;
8
8
  const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
9
9
  result.type = 'area';
10
10
  result.direction = 'vertical';
11
11
  result.yField = foldInfo.measureValue;
12
12
  result.xField = unfoldInfo.encodingX;
13
- result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
13
+ result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
14
14
  result.padding = 0;
15
15
  result.region = [
16
16
  {
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/area.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/area.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initArea: SpecPipe = (spec, context) => {\n const result = { ...spec } as IAreaChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n result.type = 'area'\n result.direction = 'vertical'\n result.yField = foldInfo.measureValue\n\n result.xField = unfoldInfo.encodingX\n result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initArea","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,QAAQ,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDF,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGI,SAAS,YAAY;IAErCJ,OAAO,MAAM,GAAGG,WAAW,SAAS;IACpCH,OAAO,WAAW,GAAGK,cAAcJ,iBAAiBE,WAAW,cAAc,GAAGA,WAAW,eAAe;IAC1GH,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/area.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/area.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initArea: SpecPipe = (spec, context) => {\n const result = { ...spec } as IAreaChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n result.type = 'area'\n result.direction = 'vertical'\n result.yField = foldInfo.measureValue\n\n result.xField = unfoldInfo.encodingX\n result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initArea","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","foldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGK,SAAS,YAAY;IAErCL,OAAO,MAAM,GAAGI,WAAW,SAAS;IACpCJ,OAAO,WAAW,GAAGM,cAAcL,eAAeC,SAASE,WAAW,cAAc,GAAGA,WAAW,eAAe;IACjHJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
@@ -19,7 +19,7 @@ const initDualAxisSecondary = (spec, context)=>{
19
19
  const result = {
20
20
  ...spec
21
21
  };
22
- const { advancedVSeed } = context;
22
+ const { advancedVSeed, vseed } = context;
23
23
  const { datasetReshapeInfo } = advancedVSeed;
24
24
  const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0];
25
25
  result.id = `${id}-secondary-series`;
@@ -27,7 +27,7 @@ const initDualAxisSecondary = (spec, context)=>{
27
27
  result.direction = 'vertical';
28
28
  result.xField = unfoldInfo.encodingX;
29
29
  if (foldInfoList?.[1]) result.yField = foldInfoList[1].measureValue;
30
- result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
30
+ result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
31
31
  result.animation = true;
32
32
  return result;
33
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/dualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/dualAxis.ts"],"sourcesContent":["import type { IBarSeriesSpec, ILineSeriesSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initDualAxisPrimary: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarSeriesSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0]\n\n result.id = `${id}-primary-series`\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n result.seriesField = unfoldInfo.encodingColorId\n\n result.yField = foldInfoList?.[0].measureValue\n result.animation = true\n\n return result\n}\n\nexport const initDualAxisSecondary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineSeriesSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0]\n\n result.id = `${id}-secondary-series`\n result.type = 'line'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n if (foldInfoList?.[1]) {\n result.yField = foldInfoList[1].measureValue\n }\n\n result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n\n result.animation = true\n\n return result\n}\n"],"names":["initDualAxisPrimary","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfoList","id","initDualAxisSecondary","isLinearColor"],"mappings":";AAIO,MAAMA,sBAAgC,CAACC,MAAMC;IAClD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,YAAY,EAAEC,EAAE,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAE9DF,OAAO,EAAE,GAAG,GAAGK,GAAG,eAAe,CAAC;IAClCL,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGG,WAAW,SAAS;IACpCH,OAAO,WAAW,GAAGG,WAAW,eAAe;IAE/CH,OAAO,MAAM,GAAGI,cAAc,CAAC,EAAE,CAAC;IAClCJ,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT;AAEO,MAAMM,wBAAkC,CAACR,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,YAAY,EAAEC,EAAE,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAE9DF,OAAO,EAAE,GAAG,GAAGK,GAAG,iBAAiB,CAAC;IACpCL,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGG,WAAW,SAAS;IACpC,IAAIC,cAAc,CAAC,EAAE,EACnBJ,OAAO,MAAM,GAAGI,YAAY,CAAC,EAAE,CAAC,YAAY;IAG9CJ,OAAO,WAAW,GAAGO,cAAcN,iBAAiBE,WAAW,cAAc,GAAGA,WAAW,eAAe;IAE1GH,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/dualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/dualAxis.ts"],"sourcesContent":["import type { IBarSeriesSpec, ILineSeriesSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initDualAxisPrimary: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarSeriesSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0]\n\n result.id = `${id}-primary-series`\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n result.seriesField = unfoldInfo.encodingColorId\n\n result.yField = foldInfoList?.[0].measureValue\n result.animation = true\n\n return result\n}\n\nexport const initDualAxisSecondary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineSeriesSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0]\n\n result.id = `${id}-secondary-series`\n result.type = 'line'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n if (foldInfoList?.[1]) {\n result.yField = foldInfoList[1].measureValue\n }\n\n result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n\n result.animation = true\n\n return result\n}\n"],"names":["initDualAxisPrimary","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfoList","id","initDualAxisSecondary","vseed","isLinearColor"],"mappings":";AAIO,MAAMA,sBAAgC,CAACC,MAAMC;IAClD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,YAAY,EAAEC,EAAE,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAE9DF,OAAO,EAAE,GAAG,GAAGK,GAAG,eAAe,CAAC;IAClCL,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGG,WAAW,SAAS;IACpCH,OAAO,WAAW,GAAGG,WAAW,eAAe;IAE/CH,OAAO,MAAM,GAAGI,cAAc,CAAC,EAAE,CAAC;IAClCJ,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT;AAEO,MAAMM,wBAAkC,CAACR,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEM,KAAK,EAAE,GAAGR;IACjC,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,YAAY,EAAEC,EAAE,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAE9DF,OAAO,EAAE,GAAG,GAAGK,GAAG,iBAAiB,CAAC;IACpCL,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGG,WAAW,SAAS;IACpC,IAAIC,cAAc,CAAC,EAAE,EACnBJ,OAAO,MAAM,GAAGI,YAAY,CAAC,EAAE,CAAC,YAAY;IAG9CJ,OAAO,WAAW,GAAGQ,cAAcP,eAAeM,SAASJ,WAAW,cAAc,GAAGA,WAAW,eAAe;IAEjHH,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
@@ -3,14 +3,14 @@ const initLine = (spec, context)=>{
3
3
  const result = {
4
4
  ...spec
5
5
  };
6
- const { advancedVSeed } = context;
6
+ const { advancedVSeed, vseed } = context;
7
7
  const { datasetReshapeInfo } = advancedVSeed;
8
8
  const { foldInfo, unfoldInfo } = datasetReshapeInfo[0];
9
9
  result.type = 'line';
10
10
  result.direction = 'vertical';
11
11
  result.xField = unfoldInfo.encodingX;
12
12
  result.yField = foldInfo.measureValue;
13
- result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
13
+ result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
14
14
  result.padding = 0;
15
15
  result.region = [
16
16
  {
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/line.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initLine: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { foldInfo, unfoldInfo } = datasetReshapeInfo[0]\n\n result.type = 'line'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n result.yField = foldInfo.measureValue\n result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initLine","spec","context","result","advancedVSeed","datasetReshapeInfo","foldInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,QAAQ,EAAEC,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDF,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGI,WAAW,SAAS;IACpCJ,OAAO,MAAM,GAAGG,SAAS,YAAY;IACrCH,OAAO,WAAW,GAAGK,cAAcJ,iBAAiBG,WAAW,cAAc,GAAGA,WAAW,eAAe;IAC1GJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/line.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initLine: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { foldInfo, unfoldInfo } = datasetReshapeInfo[0]\n\n result.type = 'line'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n result.yField = foldInfo.measureValue\n result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initLine","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","foldInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,QAAQ,EAAEC,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGK,WAAW,SAAS;IACpCL,OAAO,MAAM,GAAGI,SAAS,YAAY;IACrCJ,OAAO,WAAW,GAAGM,cAAcL,eAAeC,SAASG,WAAW,cAAc,GAAGA,WAAW,eAAe;IACjHL,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
@@ -3,13 +3,13 @@ const initRadar = (spec, context)=>{
3
3
  const result = {
4
4
  ...spec
5
5
  };
6
- const { advancedVSeed } = context;
6
+ const { advancedVSeed, vseed } = context;
7
7
  const { datasetReshapeInfo } = advancedVSeed;
8
8
  const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
9
9
  result.type = 'radar';
10
10
  result.angleField = unfoldInfo.encodingAngle;
11
11
  result.radiusField = foldInfo.measureValue;
12
- result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
12
+ result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
13
13
  result.padding = 0;
14
14
  result.region = [
15
15
  {
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/radar.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/radar.ts"],"sourcesContent":["import type { IRadarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initRadar: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRadarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n result.type = 'radar'\n result.angleField = unfoldInfo.encodingAngle\n result.radiusField = foldInfo.measureValue\n result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initRadar","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAE/B,MAAM,EAAEE,UAAU,EAAEC,QAAQ,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDF,OAAO,IAAI,GAAG;IACdA,OAAO,UAAU,GAAGG,WAAW,aAAa;IAC5CH,OAAO,WAAW,GAAGI,SAAS,YAAY;IAC1CJ,OAAO,WAAW,GAAGK,cAAcJ,iBAAiBE,WAAW,cAAc,GAAGA,WAAW,eAAe;IAE1GH,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/radar.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/radar.ts"],"sourcesContent":["import type { IRadarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initRadar: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRadarChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n result.type = 'radar'\n result.angleField = unfoldInfo.encodingAngle\n result.radiusField = foldInfo.measureValue\n result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initRadar","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","foldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAE/B,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDH,OAAO,IAAI,GAAG;IACdA,OAAO,UAAU,GAAGI,WAAW,aAAa;IAC5CJ,OAAO,WAAW,GAAGK,SAAS,YAAY;IAC1CL,OAAO,WAAW,GAAGM,cAAcL,eAAeC,SAASE,WAAW,cAAc,GAAGA,WAAW,eAAe;IAEjHJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
@@ -1,7 +1,10 @@
1
- import type { VSeed } from '../../types';
1
+ import { type VSeed } from '../../types';
2
2
  export declare const isTable: (vseed: VSeed) => vseed is import("../../types").Table;
3
3
  export declare const isPivotTable: (vseed: VSeed) => vseed is import("../../types").PivotTable;
4
4
  export declare const isRadar: (vseed: VSeed) => vseed is import("../../types").Radar;
5
+ export declare const isAreaPercent: (vseed: VSeed) => vseed is import("../../types").AreaPercent;
6
+ export declare const isColumnPercent: (vseed: VSeed) => vseed is import("../../types").ColumnPercent;
7
+ export declare const isBarPercent: (vseed: VSeed) => vseed is import("../../types").BarPercent;
5
8
  export declare const isVTable: (vseed: VSeed) => boolean;
6
9
  export declare const isVChart: (vseed: VSeed) => boolean;
7
10
  /**
@@ -1,10 +1,13 @@
1
1
  import { measureDepth } from "./measures/index.js";
2
2
  import { isMeasureTreeWithChildren, isMeasureTreeWithParentId } from "../advanced/chart/pipes/measures/utils.js";
3
3
  import { unique } from "remeda";
4
- import { DEFAULT_PARENT_ID } from "./constant.js";
5
- const isTable = (vseed)=>'table' === vseed.chartType;
6
- const isPivotTable = (vseed)=>'pivotTable' === vseed.chartType;
7
- const isRadar = (vseed)=>'radar' === vseed.chartType;
4
+ import { ChartTypeEnum, DEFAULT_PARENT_ID } from "./constant.js";
5
+ const isTable = (vseed)=>vseed.chartType === ChartTypeEnum.Table;
6
+ const isPivotTable = (vseed)=>vseed.chartType === ChartTypeEnum.PivotTable;
7
+ const isRadar = (vseed)=>vseed.chartType === ChartTypeEnum.Radar;
8
+ const isAreaPercent = (vseed)=>vseed.chartType === ChartTypeEnum.AreaPercent;
9
+ const isColumnPercent = (vseed)=>vseed.chartType === ChartTypeEnum.ColumnPercent;
10
+ const isBarPercent = (vseed)=>vseed.chartType === ChartTypeEnum.BarPercent;
8
11
  const isVTable = (vseed)=>[
9
12
  'table',
10
13
  'pivotTable'
@@ -46,6 +49,6 @@ const isCombination = (vseed)=>{
46
49
  const hasMeasureGroup = measures && measures.some((measure)=>measure && measure.children);
47
50
  return hasMeasureGroup;
48
51
  };
49
- export { isCombination, isPivot, isPivotChart, isPivotTable, isRadar, isTable, isVChart, isVTable };
52
+ export { isAreaPercent, isBarPercent, isColumnPercent, isCombination, isPivot, isPivotChart, isPivotTable, isRadar, isTable, isVChart, isVTable };
50
53
 
51
54
  //# sourceMappingURL=chatType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/utils/chatType.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/chatType.ts"],"sourcesContent":["import type { Dimensions, DimensionGroup, DimensionTree, VSeed, Measure } from 'src/types'\nimport { measureDepth } from './measures'\nimport { isMeasureTreeWithChildren, isMeasureTreeWithParentId } from '../advanced/chart/pipes/measures/utils'\nimport { unique } from 'remeda'\nimport { DEFAULT_PARENT_ID } from './constant'\n\nexport const isTable = (vseed: VSeed) => {\n return vseed.chartType === 'table'\n}\nexport const isPivotTable = (vseed: VSeed) => {\n return vseed.chartType === 'pivotTable'\n}\nexport const isRadar = (vseed: VSeed) => {\n return vseed.chartType === 'radar'\n}\n\nexport const isVTable = (vseed: VSeed) => {\n return ['table', 'pivotTable'].includes(vseed.chartType)\n}\nexport const isVChart = (vseed: VSeed): boolean => {\n return !isVTable(vseed)\n}\n\n/**\n * @description 透视图表或组合图\n * - 透视图表定义: 存在 column 或 row的 encoding\n * - 组合图表定义: 存在多组指标的情况\n * - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况\n * 上述三者都只能使用 VTable.PivotChart 绘制\n */\nexport const isPivotChart = (vseed: VSeed) => {\n if (isVTable(vseed)) {\n return false\n }\n\n if (isPivot(vseed)) {\n return true\n }\n\n return isCombination(vseed)\n}\n\n/**\n * @description 存在column 或 row的encoding\n */\nexport const isPivot = (vseed: VSeed) => {\n const { dimensions = [] } = vseed as {\n dimensions: Dimensions\n }\n\n return dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')\n}\n/**\n * @description 不存在column 或 row的encoding, 但是有多组指标的情况\n */\nexport const isCombination = (vseed: VSeed) => {\n if (isMeasureTreeWithParentId(vseed.measures)) {\n const parentIds = vseed.measures?.map((measure: Measure) => measure.parentId || DEFAULT_PARENT_ID)\n return parentIds && unique(parentIds).length > 1\n }\n\n if (vseed.chartType === 'dualAxis' || vseed.chartType === 'scatter') {\n if (vseed.chartType === 'scatter') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.scatterMeasures && vseed.scatterMeasures.length > 1) {\n return true\n }\n return false\n }\n if (vseed.chartType === 'dualAxis') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.dualMeasures && vseed.dualMeasures.length > 1) {\n return true\n }\n }\n\n return false\n }\n\n const { measures = [] } = vseed as {\n measures: DimensionTree\n dimensions: Dimensions\n }\n\n const hasMeasureGroup = measures && measures.some((measure: DimensionGroup) => measure && measure.children)\n\n return hasMeasureGroup\n}\n"],"names":["isTable","vseed","isPivotTable","isRadar","isVTable","isVChart","isPivotChart","isPivot","isCombination","dimensions","dimension","isMeasureTreeWithParentId","parentIds","measure","DEFAULT_PARENT_ID","unique","isMeasureTreeWithChildren","depth","measureDepth","measures","hasMeasureGroup"],"mappings":";;;;AAMO,MAAMA,UAAU,CAACC,QACfA,AAAoB,YAApBA,MAAM,SAAS;AAEjB,MAAMC,eAAe,CAACD,QACpBA,AAAoB,iBAApBA,MAAM,SAAS;AAEjB,MAAME,UAAU,CAACF,QACfA,AAAoB,YAApBA,MAAM,SAAS;AAGjB,MAAMG,WAAW,CAACH,QAChB;QAAC;QAAS;KAAa,CAAC,QAAQ,CAACA,MAAM,SAAS;AAElD,MAAMI,WAAW,CAACJ,QAChB,CAACG,SAASH;AAUZ,MAAMK,eAAe,CAACL;IAC3B,IAAIG,SAASH,QACX,OAAO;IAGT,IAAIM,QAAQN,QACV,OAAO;IAGT,OAAOO,cAAcP;AACvB;AAKO,MAAMM,UAAU,CAACN;IACtB,MAAM,EAAEQ,aAAa,EAAE,EAAE,GAAGR;IAI5B,OAAOQ,cAAcA,WAAW,IAAI,CAAC,CAACC,YAAcA,AAAuB,UAAvBA,UAAU,QAAQ,IAAcA,AAAuB,aAAvBA,UAAU,QAAQ;AACxG;AAIO,MAAMF,gBAAgB,CAACP;IAC5B,IAAIU,0BAA0BV,MAAM,QAAQ,GAAG;QAC7C,MAAMW,YAAYX,MAAM,QAAQ,EAAE,IAAI,CAACY,UAAqBA,QAAQ,QAAQ,IAAIC;QAChF,OAAOF,aAAaG,OAAOH,WAAW,MAAM,GAAG;IACjD;IAEA,IAAIX,AAAoB,eAApBA,MAAM,SAAS,IAAmBA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;QACnE,IAAIA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;YACjC,IAAIe,0BAA0Bf,MAAM,QAAQ,GAAG;gBAC7C,MAAMgB,QAAQC,aAAajB,MAAM,QAAQ;gBACzC,OAAOgB,AAAU,MAAVA;YACT;YAEA,IAAIhB,MAAM,eAAe,IAAIA,MAAM,eAAe,CAAC,MAAM,GAAG,GAC1D,OAAO;YAET,OAAO;QACT;QACA,IAAIA,AAAoB,eAApBA,MAAM,SAAS,EAAiB;YAClC,IAAIe,0BAA0Bf,MAAM,QAAQ,GAAG;gBAC7C,MAAMgB,QAAQC,aAAajB,MAAM,QAAQ;gBACzC,OAAOgB,AAAU,MAAVA;YACT;YAEA,IAAIhB,MAAM,YAAY,IAAIA,MAAM,YAAY,CAAC,MAAM,GAAG,GACpD,OAAO;QAEX;QAEA,OAAO;IACT;IAEA,MAAM,EAAEkB,WAAW,EAAE,EAAE,GAAGlB;IAK1B,MAAMmB,kBAAkBD,YAAYA,SAAS,IAAI,CAAC,CAACN,UAA4BA,WAAWA,QAAQ,QAAQ;IAE1G,OAAOO;AACT"}
1
+ {"version":3,"file":"pipeline/utils/chatType.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/chatType.ts"],"sourcesContent":["import { type Dimensions, type DimensionGroup, type DimensionTree, type VSeed, type Measure } from 'src/types'\nimport { measureDepth } from './measures'\nimport { isMeasureTreeWithChildren, isMeasureTreeWithParentId } from '../advanced/chart/pipes/measures/utils'\nimport { unique } from 'remeda'\nimport { ChartTypeEnum, DEFAULT_PARENT_ID } from './constant'\n\nexport const isTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Table\n}\nexport const isPivotTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.PivotTable\n}\nexport const isRadar = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Radar\n}\nexport const isAreaPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.AreaPercent\n}\nexport const isColumnPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.ColumnPercent\n}\nexport const isBarPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.BarPercent\n}\n\nexport const isVTable = (vseed: VSeed) => {\n return ['table', 'pivotTable'].includes(vseed.chartType)\n}\nexport const isVChart = (vseed: VSeed): boolean => {\n return !isVTable(vseed)\n}\n\n/**\n * @description 透视图表或组合图\n * - 透视图表定义: 存在 column 或 row的 encoding\n * - 组合图表定义: 存在多组指标的情况\n * - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况\n * 上述三者都只能使用 VTable.PivotChart 绘制\n */\nexport const isPivotChart = (vseed: VSeed) => {\n if (isVTable(vseed)) {\n return false\n }\n\n if (isPivot(vseed)) {\n return true\n }\n\n return isCombination(vseed)\n}\n\n/**\n * @description 存在column 或 row的encoding\n */\nexport const isPivot = (vseed: VSeed) => {\n const { dimensions = [] } = vseed as {\n dimensions: Dimensions\n }\n\n return dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')\n}\n/**\n * @description 不存在column 或 row的encoding, 但是有多组指标的情况\n */\nexport const isCombination = (vseed: VSeed) => {\n if (isMeasureTreeWithParentId(vseed.measures)) {\n const parentIds = vseed.measures?.map((measure: Measure) => measure.parentId || DEFAULT_PARENT_ID)\n return parentIds && unique(parentIds).length > 1\n }\n\n if (vseed.chartType === 'dualAxis' || vseed.chartType === 'scatter') {\n if (vseed.chartType === 'scatter') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.scatterMeasures && vseed.scatterMeasures.length > 1) {\n return true\n }\n return false\n }\n if (vseed.chartType === 'dualAxis') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.dualMeasures && vseed.dualMeasures.length > 1) {\n return true\n }\n }\n\n return false\n }\n\n const { measures = [] } = vseed as {\n measures: DimensionTree\n dimensions: Dimensions\n }\n\n const hasMeasureGroup = measures && measures.some((measure: DimensionGroup) => measure && measure.children)\n\n return hasMeasureGroup\n}\n"],"names":["isTable","vseed","ChartTypeEnum","isPivotTable","isRadar","isAreaPercent","isColumnPercent","isBarPercent","isVTable","isVChart","isPivotChart","isPivot","isCombination","dimensions","dimension","isMeasureTreeWithParentId","parentIds","measure","DEFAULT_PARENT_ID","unique","isMeasureTreeWithChildren","depth","measureDepth","measures","hasMeasureGroup"],"mappings":";;;;AAMO,MAAMA,UAAU,CAACC,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMC,eAAe,CAACF,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAE9C,MAAME,UAAU,CAACH,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMG,gBAAgB,CAACJ,QACrBA,MAAM,SAAS,KAAKC,cAAc,WAAW;AAE/C,MAAMI,kBAAkB,CAACL,QACvBA,MAAM,SAAS,KAAKC,cAAc,aAAa;AAEjD,MAAMK,eAAe,CAACN,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAG9C,MAAMM,WAAW,CAACP,QAChB;QAAC;QAAS;KAAa,CAAC,QAAQ,CAACA,MAAM,SAAS;AAElD,MAAMQ,WAAW,CAACR,QAChB,CAACO,SAASP;AAUZ,MAAMS,eAAe,CAACT;IAC3B,IAAIO,SAASP,QACX,OAAO;IAGT,IAAIU,QAAQV,QACV,OAAO;IAGT,OAAOW,cAAcX;AACvB;AAKO,MAAMU,UAAU,CAACV;IACtB,MAAM,EAAEY,aAAa,EAAE,EAAE,GAAGZ;IAI5B,OAAOY,cAAcA,WAAW,IAAI,CAAC,CAACC,YAAcA,AAAuB,UAAvBA,UAAU,QAAQ,IAAcA,AAAuB,aAAvBA,UAAU,QAAQ;AACxG;AAIO,MAAMF,gBAAgB,CAACX;IAC5B,IAAIc,0BAA0Bd,MAAM,QAAQ,GAAG;QAC7C,MAAMe,YAAYf,MAAM,QAAQ,EAAE,IAAI,CAACgB,UAAqBA,QAAQ,QAAQ,IAAIC;QAChF,OAAOF,aAAaG,OAAOH,WAAW,MAAM,GAAG;IACjD;IAEA,IAAIf,AAAoB,eAApBA,MAAM,SAAS,IAAmBA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;QACnE,IAAIA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;YACjC,IAAImB,0BAA0BnB,MAAM,QAAQ,GAAG;gBAC7C,MAAMoB,QAAQC,aAAarB,MAAM,QAAQ;gBACzC,OAAOoB,AAAU,MAAVA;YACT;YAEA,IAAIpB,MAAM,eAAe,IAAIA,MAAM,eAAe,CAAC,MAAM,GAAG,GAC1D,OAAO;YAET,OAAO;QACT;QACA,IAAIA,AAAoB,eAApBA,MAAM,SAAS,EAAiB;YAClC,IAAImB,0BAA0BnB,MAAM,QAAQ,GAAG;gBAC7C,MAAMoB,QAAQC,aAAarB,MAAM,QAAQ;gBACzC,OAAOoB,AAAU,MAAVA;YACT;YAEA,IAAIpB,MAAM,YAAY,IAAIA,MAAM,YAAY,CAAC,MAAM,GAAG,GACpD,OAAO;QAEX;QAEA,OAAO;IACT;IAEA,MAAM,EAAEsB,WAAW,EAAE,EAAE,GAAGtB;IAK1B,MAAMuB,kBAAkBD,YAAYA,SAAS,IAAI,CAAC,CAACN,UAA4BA,WAAWA,QAAQ,QAAQ;IAE1G,OAAOO;AACT"}
@@ -4,3 +4,25 @@ export declare const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000;
4
4
  export declare const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001;
5
5
  export declare const DUAL_AXIS_LABEL_Z_INDEX = 1002;
6
6
  export declare const DEFAULT_PARENT_ID = "__DefaultParentId__";
7
+ export declare const ChartTypeEnum: {
8
+ readonly Table: "table";
9
+ readonly PivotTable: "pivotTable";
10
+ readonly Line: "line";
11
+ readonly Column: "column";
12
+ readonly ColumnPercent: "columnPercent";
13
+ readonly ColumnParallel: "columnParallel";
14
+ readonly Bar: "bar";
15
+ readonly BarPercent: "barPercent";
16
+ readonly BarParallel: "barParallel";
17
+ readonly Area: "area";
18
+ readonly AreaPercent: "areaPercent";
19
+ readonly DualAxis: "dualAxis";
20
+ readonly Scatter: "scatter";
21
+ readonly Rose: "rose";
22
+ readonly RoseParallel: "roseParallel";
23
+ readonly Pie: "pie";
24
+ readonly Donut: "donut";
25
+ readonly Radar: "radar";
26
+ readonly Funnel: "funnel";
27
+ readonly Heatmap: "heatmap";
28
+ };
@@ -4,6 +4,28 @@ const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000;
4
4
  const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001;
5
5
  const DUAL_AXIS_LABEL_Z_INDEX = 1002;
6
6
  const DEFAULT_PARENT_ID = '__DefaultParentId__';
7
- export { ANNOTATION_Z_INDEX, DEFAULT_PARENT_ID, DUAL_AXIS_CHART_COLUMN_Z_INDEX, DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX, DUAL_AXIS_LABEL_Z_INDEX, LINEAR_AXIS_INNER_OFFSET_TOP };
7
+ const ChartTypeEnum = {
8
+ Table: 'table',
9
+ PivotTable: 'pivotTable',
10
+ Line: 'line',
11
+ Column: 'column',
12
+ ColumnPercent: 'columnPercent',
13
+ ColumnParallel: 'columnParallel',
14
+ Bar: 'bar',
15
+ BarPercent: 'barPercent',
16
+ BarParallel: 'barParallel',
17
+ Area: 'area',
18
+ AreaPercent: 'areaPercent',
19
+ DualAxis: 'dualAxis',
20
+ Scatter: 'scatter',
21
+ Rose: 'rose',
22
+ RoseParallel: 'roseParallel',
23
+ Pie: 'pie',
24
+ Donut: 'donut',
25
+ Radar: 'radar',
26
+ Funnel: 'funnel',
27
+ Heatmap: 'heatmap'
28
+ };
29
+ export { ANNOTATION_Z_INDEX, ChartTypeEnum, DEFAULT_PARENT_ID, DUAL_AXIS_CHART_COLUMN_Z_INDEX, DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX, DUAL_AXIS_LABEL_Z_INDEX, LINEAR_AXIS_INNER_OFFSET_TOP };
8
30
 
9
31
  //# sourceMappingURL=constant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/utils/constant.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/constant.ts"],"sourcesContent":["// 标注层 z-index\nexport const ANNOTATION_Z_INDEX = 1000\n// 线性轴 顶部空隙 预留5px\nexport const LINEAR_AXIS_INNER_OFFSET_TOP = 7\n// 双轴图 柱图 ZIndex\nexport const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000\n// 双轴图 非柱图 ZIndex\nexport const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001\n// 双轴图 标注层 ZIndex\nexport const DUAL_AXIS_LABEL_Z_INDEX = 1002\n// 默认父级id\nexport const DEFAULT_PARENT_ID = '__DefaultParentId__'\n"],"names":["ANNOTATION_Z_INDEX","LINEAR_AXIS_INNER_OFFSET_TOP","DUAL_AXIS_CHART_COLUMN_Z_INDEX","DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX","DUAL_AXIS_LABEL_Z_INDEX","DEFAULT_PARENT_ID"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB"}
1
+ {"version":3,"file":"pipeline/utils/constant.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/constant.ts"],"sourcesContent":["// 标注层 z-index\nexport const ANNOTATION_Z_INDEX = 1000\n// 线性轴 顶部空隙 预留5px\nexport const LINEAR_AXIS_INNER_OFFSET_TOP = 7\n// 双轴图 柱图 ZIndex\nexport const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000\n// 双轴图 非柱图 ZIndex\nexport const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001\n// 双轴图 标注层 ZIndex\nexport const DUAL_AXIS_LABEL_Z_INDEX = 1002\n// 默认父级id\nexport const DEFAULT_PARENT_ID = '__DefaultParentId__'\n\n// 图表类型枚举\nexport const ChartTypeEnum = {\n Table: 'table',\n PivotTable: 'pivotTable',\n // cartesian\n Line: 'line',\n Column: 'column',\n ColumnPercent: 'columnPercent',\n ColumnParallel: 'columnParallel',\n Bar: 'bar',\n BarPercent: 'barPercent',\n BarParallel: 'barParallel',\n Area: 'area',\n AreaPercent: 'areaPercent',\n DualAxis: 'dualAxis',\n Scatter: 'scatter',\n // polar\n Rose: 'rose',\n RoseParallel: 'roseParallel',\n Pie: 'pie',\n Donut: 'donut',\n Radar: 'radar',\n // other\n Funnel: 'funnel',\n Heatmap: 'heatmap',\n} as const\n"],"names":["ANNOTATION_Z_INDEX","LINEAR_AXIS_INNER_OFFSET_TOP","DUAL_AXIS_CHART_COLUMN_Z_INDEX","DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX","DUAL_AXIS_LABEL_Z_INDEX","DEFAULT_PARENT_ID","ChartTypeEnum"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB;AAG1B,MAAMC,gBAAgB;IAC3B,OAAO;IACP,YAAY;IAEZ,MAAM;IACN,QAAQ;IACR,eAAe;IACf,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,aAAa;IACb,MAAM;IACN,aAAa;IACb,UAAU;IACV,SAAS;IAET,MAAM;IACN,cAAc;IACd,KAAK;IACL,OAAO;IACP,OAAO;IAEP,QAAQ;IACR,SAAS;AACX"}
@@ -50,7 +50,8 @@ const autoNumFormatter = (value, locale = intl.getLocale())=>{
50
50
  if (Number.isNaN(num)) return String(value);
51
51
  const numFormatterOptions = {
52
52
  style: 'decimal',
53
- notation: 'compact'
53
+ notation: 'compact',
54
+ useGrouping: true
54
55
  };
55
56
  numFormatterOptions.minimumFractionDigits = 0;
56
57
  numFormatterOptions.maximumFractionDigits = 2;
@@ -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, 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"}
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 useGrouping: true,\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;QACV,aAAa;IACf;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"}
@@ -6,3 +6,4 @@ export * from './dimensions';
6
6
  export * from './tree';
7
7
  export * from './replaceNullToUndefined';
8
8
  export * from './valid';
9
+ export * from './constant';
@@ -6,3 +6,4 @@ export * from "./dimensions/index.js";
6
6
  export * from "./tree/index.js";
7
7
  export * from "./replaceNullToUndefined.js";
8
8
  export * from "./valid/index.js";
9
+ export * from "./constant.js";
@@ -199,10 +199,7 @@ const lightTheme = ()=>{
199
199
  ...baseConfig,
200
200
  xAxis: bandAxis,
201
201
  yAxis: {
202
- ...linearAxis,
203
- numFormat: {
204
- type: 'percent'
205
- }
202
+ ...linearAxis
206
203
  },
207
204
  crosshairRect,
208
205
  stackCornerRadius: [
@@ -239,10 +236,7 @@ const lightTheme = ()=>{
239
236
  barPercent: {
240
237
  ...baseConfig,
241
238
  xAxis: {
242
- ...linearAxis,
243
- numFormat: {
244
- type: 'percent'
245
- }
239
+ ...linearAxis
246
240
  },
247
241
  yAxis: barBandAxis,
248
242
  crosshairRect,
@@ -263,10 +257,7 @@ const lightTheme = ()=>{
263
257
  ...baseConfig,
264
258
  xAxis: bandAxis,
265
259
  yAxis: {
266
- ...linearAxis,
267
- numFormat: {
268
- type: 'percent'
269
- }
260
+ ...linearAxis
270
261
  },
271
262
  crosshairLine
272
263
  },