@visactor/vseed 0.1.18 → 0.1.20

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 (146) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/builder.d.ts +108 -0
  4. package/dist/esm/builder/register/chartType/area.js.map +1 -1
  5. package/dist/esm/builder/register/chartType/areaPercent.js.map +1 -1
  6. package/dist/esm/builder/register/chartType/bar.js.map +1 -1
  7. package/dist/esm/builder/register/chartType/barParallel.js.map +1 -1
  8. package/dist/esm/builder/register/chartType/barPercent.js.map +1 -1
  9. package/dist/esm/builder/register/chartType/column.js.map +1 -1
  10. package/dist/esm/builder/register/chartType/columnParallel.js.map +1 -1
  11. package/dist/esm/builder/register/chartType/columnPercent.js.map +1 -1
  12. package/dist/esm/builder/register/chartType/donut.js.map +1 -1
  13. package/dist/esm/builder/register/chartType/funnel.js.map +1 -1
  14. package/dist/esm/builder/register/chartType/heatmap.js.map +1 -1
  15. package/dist/esm/builder/register/chartType/line.js.map +1 -1
  16. package/dist/esm/builder/register/chartType/pie.js.map +1 -1
  17. package/dist/esm/builder/register/chartType/pivotTable.js.map +1 -1
  18. package/dist/esm/builder/register/chartType/radar.js.map +1 -1
  19. package/dist/esm/builder/register/chartType/rose.js.map +1 -1
  20. package/dist/esm/builder/register/chartType/roseParallel.js.map +1 -1
  21. package/dist/esm/builder/register/chartType/scatter.js.map +1 -1
  22. package/dist/esm/builder/register/chartType/table.js.map +1 -1
  23. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
  24. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  25. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
  26. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
  27. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js +0 -1
  28. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
  29. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.d.ts +1 -1
  30. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
  31. package/dist/esm/pipeline/spec/chart/pipes/axes/title/defaultTitleText.js.map +1 -1
  32. package/dist/esm/pipeline/spec/chart/pipes/init/area.js.map +1 -1
  33. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js +19 -1
  34. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
  35. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +4 -1
  36. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  37. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js +1 -9
  38. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js.map +1 -1
  39. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js +1 -9
  40. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
  41. package/dist/esm/pipeline/spec/chart/pipes/percent/percent.d.ts +1 -1
  42. package/dist/esm/pipeline/spec/chart/pipes/percent/percent.js +1 -1
  43. package/dist/esm/pipeline/spec/chart/pipes/percent/percent.js.map +1 -1
  44. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +93 -51
  45. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  46. package/dist/esm/pipeline/spec/table/pipeline/table.js.map +1 -1
  47. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js +1 -0
  48. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js.map +1 -1
  49. package/dist/esm/pipeline/spec/table/pipes/init/table.js +1 -0
  50. package/dist/esm/pipeline/spec/table/pipes/init/table.js.map +1 -1
  51. package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js +7 -7
  52. package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js.map +1 -1
  53. package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js +1 -1
  54. package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js.map +1 -1
  55. package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js +7 -7
  56. package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js.map +1 -1
  57. package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js +7 -7
  58. package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js.map +1 -1
  59. package/dist/esm/pipeline/utils/measures/depth.d.ts +1 -1
  60. package/dist/esm/pipeline/utils/measures/depth.js.map +1 -1
  61. package/dist/esm/theme/dark.js +8 -2
  62. package/dist/esm/theme/dark.js.map +1 -1
  63. package/dist/esm/theme/light.js +8 -2
  64. package/dist/esm/theme/light.js.map +1 -1
  65. package/dist/esm/types/advancedVSeed.d.ts +180 -0
  66. package/dist/esm/types/chartType/area/area.d.ts +1 -1
  67. package/dist/esm/types/chartType/area/zArea.d.ts +5 -5
  68. package/dist/esm/types/chartType/area/zArea.js +3 -1
  69. package/dist/esm/types/chartType/area/zArea.js.map +1 -1
  70. package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +1 -1
  71. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +5 -5
  72. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js +3 -1
  73. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
  74. package/dist/esm/types/chartType/bar/bar.d.ts +1 -1
  75. package/dist/esm/types/chartType/bar/zBar.d.ts +5 -5
  76. package/dist/esm/types/chartType/bar/zBar.js +3 -1
  77. package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
  78. package/dist/esm/types/chartType/barParallel/barParallel.d.ts +1 -1
  79. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +5 -5
  80. package/dist/esm/types/chartType/barParallel/zBarParallel.js +3 -1
  81. package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
  82. package/dist/esm/types/chartType/barPercent/barPercent.d.ts +1 -1
  83. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +5 -5
  84. package/dist/esm/types/chartType/barPercent/zBarPercent.js +3 -1
  85. package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
  86. package/dist/esm/types/chartType/column/column.d.ts +1 -1
  87. package/dist/esm/types/chartType/column/zColumn.d.ts +5 -5
  88. package/dist/esm/types/chartType/column/zColumn.js +3 -1
  89. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  90. package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +1 -1
  91. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +5 -5
  92. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +3 -1
  93. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
  94. package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +1 -1
  95. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +5 -5
  96. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +3 -1
  97. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
  98. package/dist/esm/types/chartType/donut/zDonut.d.ts +5 -0
  99. package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +1 -1
  100. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +5 -5
  101. package/dist/esm/types/chartType/dualAxis/zDualAxis.js +3 -1
  102. package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
  103. package/dist/esm/types/chartType/funnel/funnel.d.ts +1 -1
  104. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +5 -5
  105. package/dist/esm/types/chartType/funnel/zFunnel.js +3 -1
  106. package/dist/esm/types/chartType/funnel/zFunnel.js.map +1 -1
  107. package/dist/esm/types/chartType/heatmap/heatmap.d.ts +1 -1
  108. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +5 -5
  109. package/dist/esm/types/chartType/heatmap/zHeatmap.js +3 -1
  110. package/dist/esm/types/chartType/heatmap/zHeatmap.js.map +1 -1
  111. package/dist/esm/types/chartType/line/line.d.ts +1 -1
  112. package/dist/esm/types/chartType/line/zLine.d.ts +5 -5
  113. package/dist/esm/types/chartType/line/zLine.js +3 -1
  114. package/dist/esm/types/chartType/line/zLine.js.map +1 -1
  115. package/dist/esm/types/chartType/pie/zPie.d.ts +5 -0
  116. package/dist/esm/types/chartType/radar/radar.d.ts +1 -1
  117. package/dist/esm/types/chartType/radar/zRadar.d.ts +5 -5
  118. package/dist/esm/types/chartType/radar/zRadar.js +3 -1
  119. package/dist/esm/types/chartType/radar/zRadar.js.map +1 -1
  120. package/dist/esm/types/chartType/rose/rose.d.ts +1 -1
  121. package/dist/esm/types/chartType/rose/zRose.d.ts +5 -5
  122. package/dist/esm/types/chartType/rose/zRose.js +3 -1
  123. package/dist/esm/types/chartType/rose/zRose.js.map +1 -1
  124. package/dist/esm/types/chartType/roseParallel/roseParallel.d.ts +1 -1
  125. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +5 -5
  126. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js +3 -1
  127. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js.map +1 -1
  128. package/dist/esm/types/chartType/scatter/scatter.d.ts +1 -1
  129. package/dist/esm/types/chartType/scatter/zScatter.d.ts +5 -5
  130. package/dist/esm/types/chartType/scatter/zScatter.js +3 -1
  131. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  132. package/dist/esm/types/properties/analysis/sort.js.map +1 -1
  133. package/dist/esm/types/properties/analysis/sortLegend.js.map +1 -1
  134. package/dist/esm/types/properties/annotation/annotation.js.map +1 -1
  135. package/dist/esm/types/properties/config/config.d.ts +180 -0
  136. package/dist/esm/types/properties/config/label/label.d.ts +7 -0
  137. package/dist/esm/types/properties/config/label/zLabel.d.ts +5 -0
  138. package/dist/esm/types/properties/config/label/zLabel.js +6 -1
  139. package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
  140. package/dist/esm/types/properties/dimensions/dimensions.d.ts +1 -1
  141. package/dist/esm/types/properties/theme/customTheme.d.ts +180 -0
  142. package/dist/esm/types/zVseed.d.ts +90 -80
  143. package/dist/esm/types/zVseed.js.map +1 -1
  144. package/dist/umd/index.js +213 -116
  145. package/dist/umd/index.js.map +1 -1
  146. package/package.json +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/area.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/area.ts"],"sourcesContent":["import { areaAdvancedPipeline, areaSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerArea = () => {\n Builder._advancedPipelineMap['area'] = areaAdvancedPipeline\n Builder._specPipelineMap['area'] = areaSpecPipeline\n}"],"names":["registerArea","Builder","areaAdvancedPipeline","areaSpecPipeline"],"mappings":";;AAGO,MAAMA,eAAe;IAC1BC,QAAQ,oBAAoB,CAA5BA,IAAoC,GAAGC;IACvCD,QAAQ,gBAAgB,CAAxBA,IAAgC,GAAGE;AACrC"}
1
+ {"version":3,"file":"builder/register/chartType/area.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/area.ts"],"sourcesContent":["import { areaAdvancedPipeline, areaSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerArea = () => {\n Builder._advancedPipelineMap['area'] = areaAdvancedPipeline\n Builder._specPipelineMap['area'] = areaSpecPipeline\n}\n"],"names":["registerArea","Builder","areaAdvancedPipeline","areaSpecPipeline"],"mappings":";;AAGO,MAAMA,eAAe;IAC1BC,QAAQ,oBAAoB,CAA5BA,IAAoC,GAAGC;IACvCD,QAAQ,gBAAgB,CAAxBA,IAAgC,GAAGE;AACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/areaPercent.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/areaPercent.ts"],"sourcesContent":["import { areaPercentAdvancedPipeline, areaPercentSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerAreaPercent = () => {\n Builder._advancedPipelineMap['areaPercent'] = areaPercentAdvancedPipeline\n Builder._specPipelineMap['areaPercent'] = areaPercentSpecPipeline\n}"],"names":["registerAreaPercent","Builder","areaPercentAdvancedPipeline","areaPercentSpecPipeline"],"mappings":";;AAGO,MAAMA,sBAAsB;IACjCC,QAAQ,oBAAoB,CAA5BA,WAA2C,GAAGC;IAC9CD,QAAQ,gBAAgB,CAAxBA,WAAuC,GAAGE;AAC5C"}
1
+ {"version":3,"file":"builder/register/chartType/areaPercent.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/areaPercent.ts"],"sourcesContent":["import { areaPercentAdvancedPipeline, areaPercentSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerAreaPercent = () => {\n Builder._advancedPipelineMap['areaPercent'] = areaPercentAdvancedPipeline\n Builder._specPipelineMap['areaPercent'] = areaPercentSpecPipeline\n}\n"],"names":["registerAreaPercent","Builder","areaPercentAdvancedPipeline","areaPercentSpecPipeline"],"mappings":";;AAGO,MAAMA,sBAAsB;IACjCC,QAAQ,oBAAoB,CAA5BA,WAA2C,GAAGC;IAC9CD,QAAQ,gBAAgB,CAAxBA,WAAuC,GAAGE;AAC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/bar.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/bar.ts"],"sourcesContent":["import { barAdvancedPipeline, barSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerBar = () => {\n Builder._advancedPipelineMap['bar'] = barAdvancedPipeline\n Builder._specPipelineMap['bar'] = barSpecPipeline\n}"],"names":["registerBar","Builder","barAdvancedPipeline","barSpecPipeline"],"mappings":";;AAGO,MAAMA,cAAc;IACzBC,QAAQ,oBAAoB,CAA5BA,GAAmC,GAAGC;IACtCD,QAAQ,gBAAgB,CAAxBA,GAA+B,GAAGE;AACpC"}
1
+ {"version":3,"file":"builder/register/chartType/bar.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/bar.ts"],"sourcesContent":["import { barAdvancedPipeline, barSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerBar = () => {\n Builder._advancedPipelineMap['bar'] = barAdvancedPipeline\n Builder._specPipelineMap['bar'] = barSpecPipeline\n}\n"],"names":["registerBar","Builder","barAdvancedPipeline","barSpecPipeline"],"mappings":";;AAGO,MAAMA,cAAc;IACzBC,QAAQ,oBAAoB,CAA5BA,GAAmC,GAAGC;IACtCD,QAAQ,gBAAgB,CAAxBA,GAA+B,GAAGE;AACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/barParallel.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/barParallel.ts"],"sourcesContent":["import { barParallelAdvancedPipeline, barParallelSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerBarParallel = () => {\n Builder._advancedPipelineMap['barParallel'] = barParallelAdvancedPipeline\n Builder._specPipelineMap['barParallel'] = barParallelSpecPipeline\n}"],"names":["registerBarParallel","Builder","barParallelAdvancedPipeline","barParallelSpecPipeline"],"mappings":";;AAGO,MAAMA,sBAAsB;IACjCC,QAAQ,oBAAoB,CAA5BA,WAA2C,GAAGC;IAC9CD,QAAQ,gBAAgB,CAAxBA,WAAuC,GAAGE;AAC5C"}
1
+ {"version":3,"file":"builder/register/chartType/barParallel.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/barParallel.ts"],"sourcesContent":["import { barParallelAdvancedPipeline, barParallelSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerBarParallel = () => {\n Builder._advancedPipelineMap['barParallel'] = barParallelAdvancedPipeline\n Builder._specPipelineMap['barParallel'] = barParallelSpecPipeline\n}\n"],"names":["registerBarParallel","Builder","barParallelAdvancedPipeline","barParallelSpecPipeline"],"mappings":";;AAGO,MAAMA,sBAAsB;IACjCC,QAAQ,oBAAoB,CAA5BA,WAA2C,GAAGC;IAC9CD,QAAQ,gBAAgB,CAAxBA,WAAuC,GAAGE;AAC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/barPercent.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/barPercent.ts"],"sourcesContent":["import { barPercentAdvancedPipeline, barPercentSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerBarPercent = () => {\n Builder._advancedPipelineMap['barPercent'] = barPercentAdvancedPipeline\n Builder._specPipelineMap['barPercent'] = barPercentSpecPipeline\n}"],"names":["registerBarPercent","Builder","barPercentAdvancedPipeline","barPercentSpecPipeline"],"mappings":";;AAGO,MAAMA,qBAAqB;IAChCC,QAAQ,oBAAoB,CAA5BA,UAA0C,GAAGC;IAC7CD,QAAQ,gBAAgB,CAAxBA,UAAsC,GAAGE;AAC3C"}
1
+ {"version":3,"file":"builder/register/chartType/barPercent.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/barPercent.ts"],"sourcesContent":["import { barPercentAdvancedPipeline, barPercentSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerBarPercent = () => {\n Builder._advancedPipelineMap['barPercent'] = barPercentAdvancedPipeline\n Builder._specPipelineMap['barPercent'] = barPercentSpecPipeline\n}\n"],"names":["registerBarPercent","Builder","barPercentAdvancedPipeline","barPercentSpecPipeline"],"mappings":";;AAGO,MAAMA,qBAAqB;IAChCC,QAAQ,oBAAoB,CAA5BA,UAA0C,GAAGC;IAC7CD,QAAQ,gBAAgB,CAAxBA,UAAsC,GAAGE;AAC3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/column.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/column.ts"],"sourcesContent":["import { columnAdvancedPipeline, columnSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerColumn = () => {\n Builder._advancedPipelineMap['column'] = columnAdvancedPipeline\n Builder._specPipelineMap['column'] = columnSpecPipeline\n}"],"names":["registerColumn","Builder","columnAdvancedPipeline","columnSpecPipeline"],"mappings":";;AAGO,MAAMA,iBAAiB;IAC5BC,QAAQ,oBAAoB,CAA5BA,MAAsC,GAAGC;IACzCD,QAAQ,gBAAgB,CAAxBA,MAAkC,GAAGE;AACvC"}
1
+ {"version":3,"file":"builder/register/chartType/column.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/column.ts"],"sourcesContent":["import { columnAdvancedPipeline, columnSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerColumn = () => {\n Builder._advancedPipelineMap['column'] = columnAdvancedPipeline\n Builder._specPipelineMap['column'] = columnSpecPipeline\n}\n"],"names":["registerColumn","Builder","columnAdvancedPipeline","columnSpecPipeline"],"mappings":";;AAGO,MAAMA,iBAAiB;IAC5BC,QAAQ,oBAAoB,CAA5BA,MAAsC,GAAGC;IACzCD,QAAQ,gBAAgB,CAAxBA,MAAkC,GAAGE;AACvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/columnParallel.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/columnParallel.ts"],"sourcesContent":["import { columnParallelAdvancedPipeline, columnParallelSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerColumnParallel = () => {\n Builder._advancedPipelineMap['columnParallel'] = columnParallelAdvancedPipeline\n Builder._specPipelineMap['columnParallel'] = columnParallelSpecPipeline\n}"],"names":["registerColumnParallel","Builder","columnParallelAdvancedPipeline","columnParallelSpecPipeline"],"mappings":";;AAGO,MAAMA,yBAAyB;IACpCC,QAAQ,oBAAoB,CAA5BA,cAA8C,GAAGC;IACjDD,QAAQ,gBAAgB,CAAxBA,cAA0C,GAAGE;AAC/C"}
1
+ {"version":3,"file":"builder/register/chartType/columnParallel.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/columnParallel.ts"],"sourcesContent":["import { columnParallelAdvancedPipeline, columnParallelSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerColumnParallel = () => {\n Builder._advancedPipelineMap['columnParallel'] = columnParallelAdvancedPipeline\n Builder._specPipelineMap['columnParallel'] = columnParallelSpecPipeline\n}\n"],"names":["registerColumnParallel","Builder","columnParallelAdvancedPipeline","columnParallelSpecPipeline"],"mappings":";;AAGO,MAAMA,yBAAyB;IACpCC,QAAQ,oBAAoB,CAA5BA,cAA8C,GAAGC;IACjDD,QAAQ,gBAAgB,CAAxBA,cAA0C,GAAGE;AAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/columnPercent.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/columnPercent.ts"],"sourcesContent":["import { columnPercentAdvancedPipeline, columnPercentSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerColumnPercent = () => {\n Builder._advancedPipelineMap['columnPercent'] = columnPercentAdvancedPipeline\n Builder._specPipelineMap['columnPercent'] = columnPercentSpecPipeline\n}"],"names":["registerColumnPercent","Builder","columnPercentAdvancedPipeline","columnPercentSpecPipeline"],"mappings":";;AAGO,MAAMA,wBAAwB;IACnCC,QAAQ,oBAAoB,CAA5BA,aAA6C,GAAGC;IAChDD,QAAQ,gBAAgB,CAAxBA,aAAyC,GAAGE;AAC9C"}
1
+ {"version":3,"file":"builder/register/chartType/columnPercent.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/columnPercent.ts"],"sourcesContent":["import { columnPercentAdvancedPipeline, columnPercentSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerColumnPercent = () => {\n Builder._advancedPipelineMap['columnPercent'] = columnPercentAdvancedPipeline\n Builder._specPipelineMap['columnPercent'] = columnPercentSpecPipeline\n}\n"],"names":["registerColumnPercent","Builder","columnPercentAdvancedPipeline","columnPercentSpecPipeline"],"mappings":";;AAGO,MAAMA,wBAAwB;IACnCC,QAAQ,oBAAoB,CAA5BA,aAA6C,GAAGC;IAChDD,QAAQ,gBAAgB,CAAxBA,aAAyC,GAAGE;AAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/donut.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/donut.ts"],"sourcesContent":["import { donutAdvancedPipeline, donutSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerDonut = () => {\n Builder._advancedPipelineMap['donut'] = donutAdvancedPipeline\n Builder._specPipelineMap['donut'] = donutSpecPipeline\n}"],"names":["registerDonut","Builder","donutAdvancedPipeline","donutSpecPipeline"],"mappings":";;AAGO,MAAMA,gBAAgB;IAC3BC,QAAQ,oBAAoB,CAA5BA,KAAqC,GAAGC;IACxCD,QAAQ,gBAAgB,CAAxBA,KAAiC,GAAGE;AACtC"}
1
+ {"version":3,"file":"builder/register/chartType/donut.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/donut.ts"],"sourcesContent":["import { donutAdvancedPipeline, donutSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerDonut = () => {\n Builder._advancedPipelineMap['donut'] = donutAdvancedPipeline\n Builder._specPipelineMap['donut'] = donutSpecPipeline\n}\n"],"names":["registerDonut","Builder","donutAdvancedPipeline","donutSpecPipeline"],"mappings":";;AAGO,MAAMA,gBAAgB;IAC3BC,QAAQ,oBAAoB,CAA5BA,KAAqC,GAAGC;IACxCD,QAAQ,gBAAgB,CAAxBA,KAAiC,GAAGE;AACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/funnel.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/funnel.ts"],"sourcesContent":["import { funnelAdvancedPipeline, funnelSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerFunnel = () => {\n Builder._advancedPipelineMap['funnel'] = funnelAdvancedPipeline\n Builder._specPipelineMap['funnel'] = funnelSpecPipeline\n}"],"names":["registerFunnel","Builder","funnelAdvancedPipeline","funnelSpecPipeline"],"mappings":";;AAGO,MAAMA,iBAAiB;IAC5BC,QAAQ,oBAAoB,CAA5BA,MAAsC,GAAGC;IACzCD,QAAQ,gBAAgB,CAAxBA,MAAkC,GAAGE;AACvC"}
1
+ {"version":3,"file":"builder/register/chartType/funnel.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/funnel.ts"],"sourcesContent":["import { funnelAdvancedPipeline, funnelSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerFunnel = () => {\n Builder._advancedPipelineMap['funnel'] = funnelAdvancedPipeline\n Builder._specPipelineMap['funnel'] = funnelSpecPipeline\n}\n"],"names":["registerFunnel","Builder","funnelAdvancedPipeline","funnelSpecPipeline"],"mappings":";;AAGO,MAAMA,iBAAiB;IAC5BC,QAAQ,oBAAoB,CAA5BA,MAAsC,GAAGC;IACzCD,QAAQ,gBAAgB,CAAxBA,MAAkC,GAAGE;AACvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/heatmap.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/heatmap.ts"],"sourcesContent":["import { heatmapAdvancedPipeline, heatmapSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerHeatmap = () => {\n Builder._advancedPipelineMap['heatmap'] = heatmapAdvancedPipeline\n Builder._specPipelineMap['heatmap'] = heatmapSpecPipeline\n}"],"names":["registerHeatmap","Builder","heatmapAdvancedPipeline","heatmapSpecPipeline"],"mappings":";;AAGO,MAAMA,kBAAkB;IAC7BC,QAAQ,oBAAoB,CAA5BA,OAAuC,GAAGC;IAC1CD,QAAQ,gBAAgB,CAAxBA,OAAmC,GAAGE;AACxC"}
1
+ {"version":3,"file":"builder/register/chartType/heatmap.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/heatmap.ts"],"sourcesContent":["import { heatmapAdvancedPipeline, heatmapSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerHeatmap = () => {\n Builder._advancedPipelineMap['heatmap'] = heatmapAdvancedPipeline\n Builder._specPipelineMap['heatmap'] = heatmapSpecPipeline\n}\n"],"names":["registerHeatmap","Builder","heatmapAdvancedPipeline","heatmapSpecPipeline"],"mappings":";;AAGO,MAAMA,kBAAkB;IAC7BC,QAAQ,oBAAoB,CAA5BA,OAAuC,GAAGC;IAC1CD,QAAQ,gBAAgB,CAAxBA,OAAmC,GAAGE;AACxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/line.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/line.ts"],"sourcesContent":["import { lineAdvancedPipeline, lineSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerLine = () => {\n Builder._advancedPipelineMap['line'] = lineAdvancedPipeline\n Builder._specPipelineMap['line'] = lineSpecPipeline\n}"],"names":["registerLine","Builder","lineAdvancedPipeline","lineSpecPipeline"],"mappings":";;AAGO,MAAMA,eAAe;IAC1BC,QAAQ,oBAAoB,CAA5BA,IAAoC,GAAGC;IACvCD,QAAQ,gBAAgB,CAAxBA,IAAgC,GAAGE;AACrC"}
1
+ {"version":3,"file":"builder/register/chartType/line.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/line.ts"],"sourcesContent":["import { lineAdvancedPipeline, lineSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerLine = () => {\n Builder._advancedPipelineMap['line'] = lineAdvancedPipeline\n Builder._specPipelineMap['line'] = lineSpecPipeline\n}\n"],"names":["registerLine","Builder","lineAdvancedPipeline","lineSpecPipeline"],"mappings":";;AAGO,MAAMA,eAAe;IAC1BC,QAAQ,oBAAoB,CAA5BA,IAAoC,GAAGC;IACvCD,QAAQ,gBAAgB,CAAxBA,IAAgC,GAAGE;AACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/pie.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/pie.ts"],"sourcesContent":["import { pieAdvancedPipeline, pieSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerPie = () => {\n Builder._advancedPipelineMap['pie'] = pieAdvancedPipeline\n Builder._specPipelineMap['pie'] = pieSpecPipeline\n}"],"names":["registerPie","Builder","pieAdvancedPipeline","pieSpecPipeline"],"mappings":";;AAGO,MAAMA,cAAc;IACzBC,QAAQ,oBAAoB,CAA5BA,GAAmC,GAAGC;IACtCD,QAAQ,gBAAgB,CAAxBA,GAA+B,GAAGE;AACpC"}
1
+ {"version":3,"file":"builder/register/chartType/pie.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/pie.ts"],"sourcesContent":["import { pieAdvancedPipeline, pieSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerPie = () => {\n Builder._advancedPipelineMap['pie'] = pieAdvancedPipeline\n Builder._specPipelineMap['pie'] = pieSpecPipeline\n}\n"],"names":["registerPie","Builder","pieAdvancedPipeline","pieSpecPipeline"],"mappings":";;AAGO,MAAMA,cAAc;IACzBC,QAAQ,oBAAoB,CAA5BA,GAAmC,GAAGC;IACtCD,QAAQ,gBAAgB,CAAxBA,GAA+B,GAAGE;AACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/pivotTable.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/pivotTable.ts"],"sourcesContent":["import { pivotTableAdvancedPipeline, pivotTableSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerPivotTable = () => {\n Builder._advancedPipelineMap['pivotTable'] = pivotTableAdvancedPipeline\n Builder._specPipelineMap['pivotTable'] = pivotTableSpecPipeline\n}"],"names":["registerPivotTable","Builder","pivotTableAdvancedPipeline","pivotTableSpecPipeline"],"mappings":";;AAGO,MAAMA,qBAAqB;IAChCC,QAAQ,oBAAoB,CAA5BA,UAA0C,GAAGC;IAC7CD,QAAQ,gBAAgB,CAAxBA,UAAsC,GAAGE;AAC3C"}
1
+ {"version":3,"file":"builder/register/chartType/pivotTable.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/pivotTable.ts"],"sourcesContent":["import { pivotTableAdvancedPipeline, pivotTableSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerPivotTable = () => {\n Builder._advancedPipelineMap['pivotTable'] = pivotTableAdvancedPipeline\n Builder._specPipelineMap['pivotTable'] = pivotTableSpecPipeline\n}\n"],"names":["registerPivotTable","Builder","pivotTableAdvancedPipeline","pivotTableSpecPipeline"],"mappings":";;AAGO,MAAMA,qBAAqB;IAChCC,QAAQ,oBAAoB,CAA5BA,UAA0C,GAAGC;IAC7CD,QAAQ,gBAAgB,CAAxBA,UAAsC,GAAGE;AAC3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/radar.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/radar.ts"],"sourcesContent":["import { radarAdvancedPipeline, radarSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerRadar = () => {\n Builder._advancedPipelineMap['radar'] = radarAdvancedPipeline\n Builder._specPipelineMap['radar'] = radarSpecPipeline\n}"],"names":["registerRadar","Builder","radarAdvancedPipeline","radarSpecPipeline"],"mappings":";;AAGO,MAAMA,gBAAgB;IAC3BC,QAAQ,oBAAoB,CAA5BA,KAAqC,GAAGC;IACxCD,QAAQ,gBAAgB,CAAxBA,KAAiC,GAAGE;AACtC"}
1
+ {"version":3,"file":"builder/register/chartType/radar.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/radar.ts"],"sourcesContent":["import { radarAdvancedPipeline, radarSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerRadar = () => {\n Builder._advancedPipelineMap['radar'] = radarAdvancedPipeline\n Builder._specPipelineMap['radar'] = radarSpecPipeline\n}\n"],"names":["registerRadar","Builder","radarAdvancedPipeline","radarSpecPipeline"],"mappings":";;AAGO,MAAMA,gBAAgB;IAC3BC,QAAQ,oBAAoB,CAA5BA,KAAqC,GAAGC;IACxCD,QAAQ,gBAAgB,CAAxBA,KAAiC,GAAGE;AACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/rose.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/rose.ts"],"sourcesContent":["import { roseAdvancedPipeline, roseSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerRose = () => {\n Builder._advancedPipelineMap['rose'] = roseAdvancedPipeline\n Builder._specPipelineMap['rose'] = roseSpecPipeline\n}"],"names":["registerRose","Builder","roseAdvancedPipeline","roseSpecPipeline"],"mappings":";;AAGO,MAAMA,eAAe;IAC1BC,QAAQ,oBAAoB,CAA5BA,IAAoC,GAAGC;IACvCD,QAAQ,gBAAgB,CAAxBA,IAAgC,GAAGE;AACrC"}
1
+ {"version":3,"file":"builder/register/chartType/rose.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/rose.ts"],"sourcesContent":["import { roseAdvancedPipeline, roseSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerRose = () => {\n Builder._advancedPipelineMap['rose'] = roseAdvancedPipeline\n Builder._specPipelineMap['rose'] = roseSpecPipeline\n}\n"],"names":["registerRose","Builder","roseAdvancedPipeline","roseSpecPipeline"],"mappings":";;AAGO,MAAMA,eAAe;IAC1BC,QAAQ,oBAAoB,CAA5BA,IAAoC,GAAGC;IACvCD,QAAQ,gBAAgB,CAAxBA,IAAgC,GAAGE;AACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/roseParallel.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/roseParallel.ts"],"sourcesContent":["import { roseParallelAdvancedPipeline, roseParallelSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerRoseParallel = () => {\n Builder._advancedPipelineMap['roseParallel'] = roseParallelAdvancedPipeline\n Builder._specPipelineMap['roseParallel'] = roseParallelSpecPipeline\n}"],"names":["registerRoseParallel","Builder","roseParallelAdvancedPipeline","roseParallelSpecPipeline"],"mappings":";;AAGO,MAAMA,uBAAuB;IAClCC,QAAQ,oBAAoB,CAA5BA,YAA4C,GAAGC;IAC/CD,QAAQ,gBAAgB,CAAxBA,YAAwC,GAAGE;AAC7C"}
1
+ {"version":3,"file":"builder/register/chartType/roseParallel.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/roseParallel.ts"],"sourcesContent":["import { roseParallelAdvancedPipeline, roseParallelSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerRoseParallel = () => {\n Builder._advancedPipelineMap['roseParallel'] = roseParallelAdvancedPipeline\n Builder._specPipelineMap['roseParallel'] = roseParallelSpecPipeline\n}\n"],"names":["registerRoseParallel","Builder","roseParallelAdvancedPipeline","roseParallelSpecPipeline"],"mappings":";;AAGO,MAAMA,uBAAuB;IAClCC,QAAQ,oBAAoB,CAA5BA,YAA4C,GAAGC;IAC/CD,QAAQ,gBAAgB,CAAxBA,YAAwC,GAAGE;AAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/scatter.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/scatter.ts"],"sourcesContent":["import { scatterAdvancedPipeline, scatterSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerScatter = () => {\n Builder._advancedPipelineMap['scatter'] = scatterAdvancedPipeline\n Builder._specPipelineMap['scatter'] = scatterSpecPipeline\n}"],"names":["registerScatter","Builder","scatterAdvancedPipeline","scatterSpecPipeline"],"mappings":";;AAGO,MAAMA,kBAAkB;IAC7BC,QAAQ,oBAAoB,CAA5BA,OAAuC,GAAGC;IAC1CD,QAAQ,gBAAgB,CAAxBA,OAAmC,GAAGE;AACxC"}
1
+ {"version":3,"file":"builder/register/chartType/scatter.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/scatter.ts"],"sourcesContent":["import { scatterAdvancedPipeline, scatterSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerScatter = () => {\n Builder._advancedPipelineMap['scatter'] = scatterAdvancedPipeline\n Builder._specPipelineMap['scatter'] = scatterSpecPipeline\n}\n"],"names":["registerScatter","Builder","scatterAdvancedPipeline","scatterSpecPipeline"],"mappings":";;AAGO,MAAMA,kBAAkB;IAC7BC,QAAQ,oBAAoB,CAA5BA,OAAuC,GAAGC;IAC1CD,QAAQ,gBAAgB,CAAxBA,OAAmC,GAAGE;AACxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builder/register/chartType/table.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/table.ts"],"sourcesContent":["import { tableAdvancedPipeline, tableSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerTable = () => {\n Builder._advancedPipelineMap['table'] = tableAdvancedPipeline\n Builder._specPipelineMap['table'] = tableSpecPipeline\n}"],"names":["registerTable","Builder","tableAdvancedPipeline","tableSpecPipeline"],"mappings":";;AAGO,MAAMA,gBAAgB;IAC3BC,QAAQ,oBAAoB,CAA5BA,KAAqC,GAAGC;IACxCD,QAAQ,gBAAgB,CAAxBA,KAAiC,GAAGE;AACtC"}
1
+ {"version":3,"file":"builder/register/chartType/table.js","sources":["webpack://@visactor/vseed/./src/builder/register/chartType/table.ts"],"sourcesContent":["import { tableAdvancedPipeline, tableSpecPipeline } from '../../../pipeline'\nimport { Builder } from '../../builder'\n\nexport const registerTable = () => {\n Builder._advancedPipelineMap['table'] = tableAdvancedPipeline\n Builder._specPipelineMap['table'] = tableSpecPipeline\n}\n"],"names":["registerTable","Builder","tableAdvancedPipeline","tableSpecPipeline"],"mappings":";;AAGO,MAAMA,gBAAgB;IAC3BC,QAAQ,oBAAoB,CAA5BA,KAAqC,GAAGC;IACxCD,QAAQ,gBAAgB,CAAxBA,KAAiC,GAAGE;AACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding, FoldPrimaryMeasureValue, FoldSecondaryMeasureValue } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport { measureDepth } from 'src/pipeline/utils'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Dimension,\n Encoding,\n FoldInfo,\n MeasureGroup,\n UnfoldInfo,\n} from 'src/types'\n\nexport const pivotReshapeWithDualEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding, chartType } = advancedVSeed\n\n const datasetList: Dataset[] = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n const measureGroups: Array<MeasureGroup[]> = []\n\n const depth = measureDepth(measures)\n if (depth === 3) {\n measures.forEach((measure: MeasureGroup) => {\n measureGroups.push(measure.children as unknown as MeasureGroup[])\n })\n } else if (depth === 2) {\n measureGroups.push(measures as unknown as MeasureGroup[])\n }\n\n measureGroups.forEach((measures: MeasureGroup[], index) => {\n if (measures.length > 2) {\n throw new Error('measures can not be more than 2 groups in dualAxis')\n }\n\n const foldInfoList: FoldInfo[] = []\n const unfoldInfoList: UnfoldInfo[] = []\n\n const datasets: Dataset[] = []\n const primaryMeasures = measures[0]\n const secondaryMeasures = measures[1] || []\n\n if (primaryMeasures && primaryMeasures.children) {\n const {\n dataset: newDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(primaryMeasures.children, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: `${FoldPrimaryMeasureValue}${index}`,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n datasets.push(newDataset)\n foldInfoList.push(foldInfo)\n unfoldInfoList.push(unfoldInfo)\n }\n\n if (secondaryMeasures && secondaryMeasures.children) {\n const {\n dataset: newDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(secondaryMeasures.children, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: `${FoldSecondaryMeasureValue}${index}`,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n datasets.push(newDataset)\n foldInfoList.push(foldInfo)\n unfoldInfoList.push(unfoldInfo)\n }\n\n const unfoldInfo: UnfoldInfo = {\n ...unfoldInfoList[0],\n colorItems: unfoldInfoList.flatMap((d) => d.colorItems),\n colorIdMap: unfoldInfoList.reduce((prev, cur) => ({ ...prev, ...cur.colorIdMap }), {}),\n }\n\n const reshapeInfo = {\n id: `${chartType}-${index}`,\n index,\n foldInfo: foldInfoList[0],\n foldInfoList: foldInfoList,\n unfoldInfo: unfoldInfo,\n }\n\n datasetReshapeInfo.push(reshapeInfo)\n datasetList.push(datasets.flat(2))\n })\n\n return {\n ...result,\n dataset: datasetList,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithDualEncoding","advancedVSeed","context","result","vseed","dataset","dimensions","measures","encoding","chartType","datasetList","datasetReshapeInfo","measureGroups","depth","measureDepth","measure","index","Error","foldInfoList","unfoldInfoList","datasets","primaryMeasures","secondaryMeasures","newDataset","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","FoldPrimaryMeasureValue","getColorMeasureId","FoldSecondaryMeasureValue","d","prev","cur","reshapeInfo"],"mappings":";;;;AAiBO,MAAMA,+BAA6C,CAACC,eAAeC;IACxE,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG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E,GACtCD,SAASL,kBAAkB,QAAQ,EAAE,CAACM,OAASA,KAAK,EAAE,GACtDpB,UACA;gBACE,eAAe;gBACf,kBAAkB,GAAGuB,4BAA4Bf,OAAO;gBACxD,gBAAgBc,kBAAkB7B;YACpC;YAGFmB,SAAS,IAAI,CAACG;YACdL,aAAa,IAAI,CAACM;YAClBL,eAAe,IAAI,CAACM;QACtB;QAEA,MAAMA,aAAyB;YAC7B,GAAGN,cAAc,CAAC,EAAE;YACpB,YAAYA,eAAe,OAAO,CAAC,CAACa,IAAMA,EAAE,UAAU;YACtD,YAAYb,eAAe,MAAM,CAAC,CAACc,MAAMC,MAAS;oBAAE,GAAGD,IAAI;oBAAE,GAAGC,IAAI,UAAU;gBAAC,IAAI,CAAC;QACtF;QAEA,MAAMC,cAAc;YAClB,IAAI,GAAG1B,UAAU,CAAC,EAAEO,OAAO;YAC3BA;YACA,UAAUE,YAAY,CAAC,EAAE;YACzB,cAAcA;YACd,YAAYO;QACd;QAEAd,mBAAmB,IAAI,CAACwB;QACxBzB,YAAY,IAAI,CAACU,SAAS,IAAI,CAAC;IACjC;IAEA,OAAO;QACL,GAAGjB,MAAM;QACT,SAASO;QACT,oBAAoBC;IACtB;AACF"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding, FoldPrimaryMeasureValue, FoldSecondaryMeasureValue } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport { measureDepth } from 'src/pipeline/utils'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Encoding,\n FoldInfo,\n MeasureGroup,\n UnfoldInfo,\n} from 'src/types'\n\nexport const pivotReshapeWithDualEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding, chartType } = advancedVSeed\n\n const datasetList: Dataset[] = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n const measureGroups: Array<MeasureGroup[]> = []\n\n const depth = measureDepth(measures)\n if (depth === 3) {\n measures.forEach((measure: MeasureGroup) => {\n measureGroups.push(measure.children as unknown as MeasureGroup[])\n })\n } else if (depth === 2) {\n measureGroups.push(measures as unknown as MeasureGroup[])\n }\n\n measureGroups.forEach((measures: MeasureGroup[], index) => {\n if (measures.length > 2) {\n throw new Error('measures can not be more than 2 groups in dualAxis')\n }\n\n const foldInfoList: FoldInfo[] = []\n const unfoldInfoList: UnfoldInfo[] = []\n\n const datasets: Dataset[] = []\n const primaryMeasures = measures[0]\n const secondaryMeasures = measures[1] || []\n\n if (primaryMeasures && primaryMeasures.children) {\n const {\n dataset: newDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(primaryMeasures.children, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: `${FoldPrimaryMeasureValue}${index}`,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n datasets.push(newDataset)\n foldInfoList.push(foldInfo)\n unfoldInfoList.push(unfoldInfo)\n }\n\n if (secondaryMeasures && secondaryMeasures.children) {\n const {\n dataset: newDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(secondaryMeasures.children, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: `${FoldSecondaryMeasureValue}${index}`,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n datasets.push(newDataset)\n foldInfoList.push(foldInfo)\n unfoldInfoList.push(unfoldInfo)\n }\n\n const unfoldInfo: UnfoldInfo = {\n ...unfoldInfoList[0],\n colorItems: unfoldInfoList.flatMap((d) => d.colorItems),\n colorIdMap: unfoldInfoList.reduce((prev, cur) => ({ ...prev, ...cur.colorIdMap }), {}),\n }\n\n const reshapeInfo = {\n id: `${chartType}-${index}`,\n index,\n foldInfo: foldInfoList[0],\n foldInfoList: foldInfoList,\n unfoldInfo: unfoldInfo,\n }\n\n datasetReshapeInfo.push(reshapeInfo)\n datasetList.push(datasets.flat(2))\n })\n\n return {\n ...result,\n dataset: datasetList,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithDualEncoding","advancedVSeed","context","result","vseed","dataset","dimensions","measures","encoding","chartType","datasetList","datasetReshapeInfo","measureGroups","depth","measureDepth","measure","index","Error","foldInfoList","unfoldInfoList","datasets","primaryMeasures","secondaryMeasures","newDataset","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","FoldPrimaryMeasureValue","getColorMeasureId","FoldSecondaryMeasureValue","d","prev","cur","reshapeInfo"],"mappings":";;;;AAgBO,MAAMA,+BAA6C,CAACC,eAAeC;IACxE,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAE,GAAGD;IACpB,MAAM,EAAEE,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGR;IAEhE,MAAMS,cAAyB,EAAE;IACjC,MAAMC,qBAAyC,EAAE;IAEjD,MAAMC,gBAAuC,EAAE;IAE/C,MAAMC,QAAQC,aAAaP;IAC3B,IAAIM,AAAU,MAAVA,OACFN,SAAS,OAAO,CAAC,CAACQ;QAChBH,cAAc,IAAI,CAACG,QAAQ,QAAQ;IACrC;SACK,IAAIF,AAAU,MAAVA,OACTD,cAAc,IAAI,CAACL;IAGrBK,cAAc,OAAO,CAAC,CAACL,UAA0BS;QA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oBAAE,GAAGC,IAAI,UAAU;gBAAC,IAAI,CAAC;QACtF;QAEA,MAAMC,cAAc;YAClB,IAAI,GAAG1B,UAAU,CAAC,EAAEO,OAAO;YAC3BA;YACA,UAAUE,YAAY,CAAC,EAAE;YACzB,cAAcA;YACd,YAAYO;QACd;QAEAd,mBAAmB,IAAI,CAACwB;QACxBzB,YAAY,IAAI,CAACU,SAAS,IAAI,CAAC;IACjC;IAEA,OAAO;QACL,GAAGjB,MAAM;QACT,SAASO;QACT,oBAAoBC;IACtB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding, FoldMeasureValue } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Dimension,\n Encoding,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding } = advancedVSeed\n\n const measureGroups: MeasureGroup[] = []\n if (measures) {\n measures.forEach((measure: MeasureGroup) => {\n if (measure.children && measure.children.length > 0) {\n measureGroups.push(measure)\n }\n })\n }\n\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const measures = measureGroup.children\n if (!measures) {\n return\n }\n const groupId = measureGroup.id\n const {\n dataset: newSubDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(measures, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: `${FoldMeasureValue}${groupId}`,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n const reshapeInfo = {\n id: groupId,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newSubDataset)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithEncoding","advancedVSeed","context","result","vseed","dataset","dimensions","measures","encoding","measureGroups","measure","datasets","datasetReshapeInfo","measureGroup","index","groupId","newSubDataset","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","FoldMeasureValue","getColorMeasureId","reshapeInfo"],"mappings":";;;AAcO,MAAMA,2BAAyC,CAACC,eAAeC;IACpE,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAE,GAAGD;IACpB,MAAM,EAAEE,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAE,GAAGP;IAErD,MAAMQ,gBAAgC,EAAE;IACxC,IAAIF,UACFA,SAAS,OAAO,CAAC,CAACG;QAChB,IAAIA,QAAQ,QAAQ,IAAIA,QAAQ,QAAQ,CAAC,MAAM,GAAG,GAChDD,cAAc,IAAI,CAACC;IAEvB;IAGF,MAAMC,WAAoB,EAAE;IAC5B,MAAMC,qBAAyC,EAAE;IAEjDH,cAAc,OAAO,CAAC,CAACI,cAAcC;QACnC,MAAMP,WAAWM,aAAa,QAAQ;QACtC,IAAI,CAACN,UACH;QAEF,MAAMQ,UAAUF,aAAa,EAAE;QAC/B,MAAM,EACJ,SAASG,aAAa,EACtBC,QAAQ,EACRC,UAAU,EACX,GAAGC,sBACFd,SACAe,SAASd,YAAY,CAACe,OAASA,KAAK,EAAE,GACtCD,SAASb,UAAU,CAACc,OAASA,KAAK,EAAE,GACpCb,UACA;YACE,eAAe;YACf,kBAAkB,GAAGc,mBAAmBP,SAAS;YACjD,gBAAgBQ,kBAAkBtB;QACpC;QAGF,MAAMuB,cAAc;YAClB,IAAIT;YACJD;YACAG;YACAC;QACF;QACAP,SAAS,IAAI,CAACK;QACdJ,mBAAmB,IAAI,CAACY;IAC1B;IAEA,OAAO;QACL,GAAGrB,MAAM;QACT,SAASQ;QACT,oBAAoBC;IACtB;AACF"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding, FoldMeasureValue } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Encoding,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding } = advancedVSeed\n\n const measureGroups: MeasureGroup[] = []\n if (measures) {\n measures.forEach((measure: MeasureGroup) => {\n if (measure.children && measure.children.length > 0) {\n measureGroups.push(measure)\n }\n })\n }\n\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const measures = measureGroup.children\n if (!measures) {\n return\n }\n const groupId = measureGroup.id\n const {\n dataset: newSubDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(measures, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: `${FoldMeasureValue}${groupId}`,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n const reshapeInfo = {\n id: groupId,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newSubDataset)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithEncoding","advancedVSeed","context","result","vseed","dataset","dimensions","measures","encoding","measureGroups","measure","datasets","datasetReshapeInfo","measureGroup","index","groupId","newSubDataset","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","FoldMeasureValue","getColorMeasureId","reshapeInfo"],"mappings":";;;AAaO,MAAMA,2BAAyC,CAACC,eAAeC;IACpE,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAE,GAAGD;IACpB,MAAM,EAAEE,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAE,GAAGP;IAErD,MAAMQ,gBAAgC,EAAE;IACxC,IAAIF,UACFA,SAAS,OAAO,CAAC,CAACG;QAChB,IAAIA,QAAQ,QAAQ,IAAIA,QAAQ,QAAQ,CAAC,MAAM,GAAG,GAChDD,cAAc,IAAI,CAACC;IAEvB;IAGF,MAAMC,WAAoB,EAAE;IAC5B,MAAMC,qBAAyC,EAAE;IAEjDH,cAAc,OAAO,CAAC,CAACI,cAAcC;QACnC,MAAMP,WAAWM,aAAa,QAAQ;QACtC,IAAI,CAACN,UACH;QAEF,MAAMQ,UAAUF,aAAa,EAAE;QAC/B,MAAM,EACJ,SAASG,aAAa,EACtBC,QAAQ,EACRC,UAAU,EACX,GAAGC,sBACFd,SACAe,SAASd,YAAY,CAACe,OAASA,KAAK,EAAE,GACtCD,SAASb,UAAU,CAACc,OAASA,KAAK,EAAE,GACpCb,UACA;YACE,eAAe;YACf,kBAAkB,GAAGc,mBAAmBP,SAAS;YACjD,gBAAgBQ,kBAAkBtB;QACpC;QAGF,MAAMuB,cAAc;YAClB,IAAIT;YACJD;YACAG;YACAC;QACF;QACAP,SAAS,IAAI,CAACK;QACdJ,mBAAmB,IAAI,CAACY;IAC1B;IAEA,OAAO;QACL,GAAGrB,MAAM;QACT,SAASQ;QACT,oBAAoBC;IACtB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding, FoldPrimaryMeasureValue, FoldSecondaryMeasureValue } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n Dimension,\n Encoding,\n FoldInfo,\n MeasureGroup,\n UnfoldInfo,\n} from 'src/types'\n\nexport const reshapeWithDualEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding, chartType } = advancedVSeed\n\n if (measures.length > 2) {\n throw new Error('measures can not be more than 2 groups in dualAxis')\n }\n const foldInfoList: FoldInfo[] = []\n const unfoldInfoList: UnfoldInfo[] = []\n\n const datasets: Dataset[] = []\n const primaryMeasures = measures[0] as MeasureGroup\n const secondaryMeasures = (measures[1] || []) as MeasureGroup\n\n if (primaryMeasures && primaryMeasures.children) {\n const {\n dataset: newDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(primaryMeasures.children, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: FoldPrimaryMeasureValue,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n datasets.push(newDataset)\n foldInfoList.push(foldInfo)\n unfoldInfoList.push(unfoldInfo)\n }\n\n if (secondaryMeasures && secondaryMeasures.children) {\n const {\n dataset: newDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(secondaryMeasures.children, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: FoldSecondaryMeasureValue,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n datasets.push(newDataset)\n foldInfoList.push(foldInfo)\n unfoldInfoList.push(unfoldInfo)\n }\n\n const unfoldInfo: UnfoldInfo = {\n ...unfoldInfoList[0],\n colorItems: unfoldInfoList.flatMap((d) => d.colorItems),\n colorIdMap: unfoldInfoList.reduce((prev, cur) => ({ ...prev, ...cur.colorIdMap }), {}),\n }\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: [\n {\n id: String(chartType),\n index: 0,\n foldInfo: foldInfoList[0],\n foldInfoList: foldInfoList,\n unfoldInfo: unfoldInfo,\n },\n ],\n }\n}\n"],"names":["reshapeWithDualEncoding","advancedVSeed","context","result","vseed","dataset","dimensions","measures","encoding","chartType","Error","foldInfoList","unfoldInfoList","datasets","primaryMeasures","secondaryMeasures","newDataset","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","FoldPrimaryMeasureValue","getColorMeasureId","FoldSecondaryMeasureValue","d","prev","cur","String"],"mappings":";;;AAeO,MAAMA,0BAAwC,CAACC,eAAeC;IACnE,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAE,GAAGD;IACpB,MAAM,EAAEE,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGR;IAEhE,IAAIM,SAAS,MAAM,GAAG,GACpB,MAAM,IAAIG,MAAM;IAElB,MAAMC,eAA2B,EAAE;IACnC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UE,YAAY,CAAC,EAAE;gBACzB,cAAcA;gBACd,YAAYO;YACd;SACD;IACH;AACF"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding, FoldPrimaryMeasureValue, FoldSecondaryMeasureValue } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n Encoding,\n FoldInfo,\n MeasureGroup,\n UnfoldInfo,\n} from 'src/types'\n\nexport const reshapeWithDualEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding, chartType } = advancedVSeed\n\n if (measures.length > 2) {\n throw new Error('measures can not be more than 2 groups in dualAxis')\n }\n const foldInfoList: FoldInfo[] = []\n const unfoldInfoList: UnfoldInfo[] = []\n\n const datasets: Dataset[] = []\n const primaryMeasures = measures[0] as MeasureGroup\n const secondaryMeasures = (measures[1] || []) as MeasureGroup\n\n if (primaryMeasures && primaryMeasures.children) {\n const {\n dataset: newDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(primaryMeasures.children, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: FoldPrimaryMeasureValue,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n datasets.push(newDataset)\n foldInfoList.push(foldInfo)\n unfoldInfoList.push(unfoldInfo)\n }\n\n if (secondaryMeasures && secondaryMeasures.children) {\n const {\n dataset: newDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(secondaryMeasures.children, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: FoldSecondaryMeasureValue,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n datasets.push(newDataset)\n foldInfoList.push(foldInfo)\n unfoldInfoList.push(unfoldInfo)\n }\n\n const unfoldInfo: UnfoldInfo = {\n ...unfoldInfoList[0],\n colorItems: unfoldInfoList.flatMap((d) => d.colorItems),\n colorIdMap: unfoldInfoList.reduce((prev, cur) => ({ ...prev, ...cur.colorIdMap }), {}),\n }\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: [\n {\n id: String(chartType),\n index: 0,\n foldInfo: foldInfoList[0],\n foldInfoList: foldInfoList,\n unfoldInfo: unfoldInfo,\n },\n ],\n }\n}\n"],"names":["reshapeWithDualEncoding","advancedVSeed","context","result","vseed","dataset","dimensions","measures","encoding","chartType","Error","foldInfoList","unfoldInfoList","datasets","primaryMeasures","secondaryMeasures","newDataset","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","FoldPrimaryMeasureValue","getColorMeasureId","FoldSecondaryMeasureValue","d","prev","cur","String"],"mappings":";;;AAcO,MAAMA,0BAAwC,CAACC,eAAeC;IACnE,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAE,GAAGD;IACpB,MAAM,EAAEE,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGR;IAEhE,IAAIM,SAAS,MAAM,GAAG,GACpB,MAAM,IAAIG,MAAM;IAElB,MAAMC,eAA2B,EAAE;IACnC,MAAMC,iBAA+B,EAAE;IAEvC,MAAMC,WAAsB,EAAE;IAC9B,MAAMC,kBAAkBP,QAAQ,CAAC,EAAE;IACnC,MAAMQ,oBAAqBR,QAAQ,CAAC,EA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ncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport { findAllMeasures } from 'src/pipeline/utils'\nimport type { AdvancedPipe, AdvancedVSeed, ColumnParallel, Dimension, Encoding } from 'src/types'\n\nexport const reshapeWithEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset, chartType } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding } = advancedVSeed\n\n const {\n dataset: newDatasets,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(findAllMeasures(measures), (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n return {\n ...result,\n dataset: newDatasets,\n datasetReshapeInfo: [\n {\n id: String(chartType),\n index: 0,\n foldInfo,\n unfoldInfo,\n },\n ],\n dimensions,\n measures,\n }\n}\n"],"names":["reshapeWithEncoding","advancedVSeed","context","result","vseed","dataset","chartType","dimensions","measures","encoding","newDatasets","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","findAllMeasures","getColorMeasureId","String"],"mappings":";;;;AAMO,MAAMA,sBAAoC,CAACC,eAAeC;IAC/D,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAE,GAAGF;IAC/B,MAAM,EAAEG,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAE,GAAGR;IAErD,MAAM,EACJ,SAASS,WAAW,EACpBC,QAAQ,EACRC,UAAU,EACX,GAAGC,sBACFR,SACAS,SAASP,YAAY,CAACQ,OAASA,KAAK,EAAE,GACtCD,SAASE,gBAAgBR,WAAW,CAACO,OAASA,KAAK,EAAE,GACrDN,UACA;QACE,eAAe;QACf,gBAAgBQ,kBAAkBhB;IACpC;IAGF,OAAO;QACL,GAAGE,MAAM;QACT,SAASO;QACT,oBAAoB;YAClB;gBACE,IAAIQ,OAAOZ;gBACX,OAAO;gBACPK;gBACAC;YACF;SACD;QACDL;QACAC;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport { findAllMeasures } from 'src/pipeline/utils'\nimport type { AdvancedPipe, AdvancedVSeed, ColumnParallel, Encoding } from 'src/types'\n\nexport const reshapeWithEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset, chartType } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding } = advancedVSeed\n\n const {\n dataset: newDatasets,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(findAllMeasures(measures), (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n return {\n ...result,\n dataset: newDatasets,\n datasetReshapeInfo: [\n {\n id: String(chartType),\n index: 0,\n foldInfo,\n unfoldInfo,\n },\n ],\n dimensions,\n measures,\n }\n}\n"],"names":["reshapeWithEncoding","advancedVSeed","context","result","vseed","dataset","chartType","dimensions","measures","encoding","newDatasets","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","findAllMeasures","getColorMeasureId","String"],"mappings":";;;;AAMO,MAAMA,sBAAoC,CAACC,eAAeC;IAC/D,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAE,GAAGF;IAC/B,MAAM,EAAEG,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAE,GAAGR;IAErD,MAAM,EACJ,SAASS,WAAW,EACpBC,QAAQ,EACRC,UAAU,EACX,GAAGC,sBACFR,SACAS,SAASP,YAAY,CAACQ,OAASA,KAAK,EAAE,GACtCD,SAASE,gBAAgBR,WAAW,CAACO,OAASA,KAAK,EAAE,GACrDN,UACA;QACE,eAAe;QACf,gBAAgBQ,kBAAkBhB;IACpC;IAGF,OAAO;QACL,GAAGE,MAAM;QACT,SAASO;QACT,oBAAoB;YAClB;gBACE,IAAIQ,OAAOZ;gBACX,OAAO;gBACPK;gBACAC;YACF;SACD;QACDL;QACAC;IACF;AACF"}
@@ -25,7 +25,6 @@ const pivotHeatmap = [
25
25
  datasetXY,
26
26
  colorAdapter(color, linearColor),
27
27
  label,
28
- discreteLegend,
29
28
  tooltipHeatmap,
30
29
  colorCellStyleFill(cellStyle),
31
30
  annotationPoint,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/heatmap.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/heatmap.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltipHeatmap,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n discreteLegend,\n color,\n colorAdapter,\n linearColor,\n colorLegend,\n cellStyle,\n colorCellStyleFill,\n pivotDiscreteLegend,\n pivotColorLegend,\n} from '../pipes'\nimport { initHeatmap } from '../pipes/init/heatmap'\n\nconst heatmap: SpecPipeline = [\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n colorAdapter(discreteLegend, colorLegend),\n colorCellStyleFill(cellStyle),\n tooltipHeatmap,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotHeatmap: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n discreteLegend,\n tooltipHeatmap,\n colorCellStyleFill(cellStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const heatmapSpecPipeline: SpecPipeline = [pivotAdapter(heatmap, pivotHeatmap)]\n"],"names":["heatmap","initHeatmap","backgroundColor","datasetXY","colorAdapter","color","linearColor","label","discreteLegend","colorLegend","colorCellStyleFill","cellStyle","tooltipHeatmap","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotHeatmap","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","heatmapSpecPipeline","pivotAdapter"],"mappings":";;AA8BA,MAAMA,UAAwB;IAC5BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAH,aAAaI,gBAAgBC;IAC7BC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdrB;QACAC;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAI;QACAF,mBAAmBC;QACnBE;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACApB,aAAaqB,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAa5B,SAASiB;CAAc"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/heatmap.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/heatmap.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltipHeatmap,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n discreteLegend,\n color,\n colorAdapter,\n linearColor,\n colorLegend,\n cellStyle,\n colorCellStyleFill,\n pivotDiscreteLegend,\n pivotColorLegend,\n} from '../pipes'\nimport { initHeatmap } from '../pipes/init/heatmap'\n\nconst heatmap: SpecPipeline = [\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n colorAdapter(discreteLegend, colorLegend),\n colorCellStyleFill(cellStyle),\n tooltipHeatmap,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotHeatmap: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n tooltipHeatmap,\n colorCellStyleFill(cellStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const heatmapSpecPipeline: SpecPipeline = [pivotAdapter(heatmap, pivotHeatmap)]\n"],"names":["heatmap","initHeatmap","backgroundColor","datasetXY","colorAdapter","color","linearColor","label","discreteLegend","colorLegend","colorCellStyleFill","cellStyle","tooltipHeatmap","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotHeatmap","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","heatmapSpecPipeline","pivotAdapter"],"mappings":";;AA8BA,MAAMA,UAAwB;IAC5BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAH,aAAaI,gBAAgBC;IAC7BC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdrB;QACAC;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAK;QACAF,mBAAmBC;QACnBE;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACApB,aAAaqB,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAa5B,SAASiB;CAAc"}
@@ -1,2 +1,2 @@
1
- import type { Datum } from "../../../../../types";
1
+ import type { Datum } from '../../../../../types';
2
2
  export declare const isSubset: (sub: Datum, obj: Datum) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/annotation/utils.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/utils.ts"],"sourcesContent":["import type { Datum } from \"src/types\"\n\nexport const isSubset = (sub: Datum, obj: Datum) => {\n return Object.entries(sub).every(([key, value]) => {\n if (typeof value === 'string') {\n return obj[key] === value\n }\n if (typeof value === 'number') {\n return obj[key] === value\n }\n return true\n })\n}\n"],"names":["isSubset","sub","obj","Object","key","value"],"mappings":"AAEO,MAAMA,WAAW,CAACC,KAAYC,MAC5BC,OAAO,OAAO,CAACF,KAAK,KAAK,CAAC,CAAC,CAACG,KAAKC,MAAM;QAC5C,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOH,GAAG,CAACE,IAAI,KAAKC;QAEtB,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOH,GAAG,CAACE,IAAI,KAAKC;QAEtB,OAAO;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/annotation/utils.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/utils.ts"],"sourcesContent":["import type { Datum } from 'src/types'\n\nexport const isSubset = (sub: Datum, obj: Datum) => {\n return Object.entries(sub).every(([key, value]) => {\n if (typeof value === 'string') {\n return obj[key] === value\n }\n if (typeof value === 'number') {\n return obj[key] === value\n }\n return true\n })\n}\n"],"names":["isSubset","sub","obj","Object","key","value"],"mappings":"AAEO,MAAMA,WAAW,CAACC,KAAYC,MAC5BC,OAAO,OAAO,CAACF,KAAK,KAAK,CAAC,CAAC,CAACG,KAAKC,MAAM;QAC5C,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOH,GAAG,CAACE,IAAI,KAAKC;QAEtB,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOH,GAAG,CAACE,IAAI,KAAKC;QAEtB,OAAO;IACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/title/defaultTitleText.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/title/defaultTitleText.ts"],"sourcesContent":["import { findAllMeasures } from 'src/pipeline/utils'\nimport type { Dimensions, MeasureTree } from 'src/types'\n\nexport const defaultTitleText = (measures: MeasureTree, dimensions: Dimensions, idList: string[] = []) => {\n const allMeasures = findAllMeasures(measures)\n return idList.map((id) => {\n const alias = [...allMeasures, ...dimensions].find((f) => f.id === id)?.alias || ''\n return alias\n }).join(' & ')\n}\n"],"names":["defaultTitleText","measures","dimensions","idList","allMeasures","findAllMeasures","id","alias","f"],"mappings":";AAGO,MAAMA,mBAAmB,CAACC,UAAuBC,YAAwBC,SAAmB,EAAE;IACnG,MAAMC,cAAcC,gBAAgBJ;IACpC,OAAOE,OAAO,GAAG,CAAC,CAACG;QACjB,MAAMC,QAAQ;eAAIH;eAAgBF;SAAW,CAAC,IAAI,CAAC,CAACM,IAAMA,EAAE,EAAE,KAAKF,KAAK,SAAS;QACjF,OAAOC;IACT,GAAG,IAAI,CAAC;AACV"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/title/defaultTitleText.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/title/defaultTitleText.ts"],"sourcesContent":["import { findAllMeasures } from 'src/pipeline/utils'\nimport type { Dimensions, MeasureTree } from 'src/types'\n\nexport const defaultTitleText = (measures: MeasureTree, dimensions: Dimensions, idList: string[] = []) => {\n const allMeasures = findAllMeasures(measures)\n return idList\n .map((id) => {\n const alias = [...allMeasures, ...dimensions].find((f) => f.id === id)?.alias || ''\n return alias\n })\n .join(' & ')\n}\n"],"names":["defaultTitleText","measures","dimensions","idList","allMeasures","findAllMeasures","id","alias","f"],"mappings":";AAGO,MAAMA,mBAAmB,CAACC,UAAuBC,YAAwBC,SAAmB,EAAE;IACnG,MAAMC,cAAcC,gBAAgBJ;IACpC,OAAOE,OACJ,GAAG,CAAC,CAACG;QACJ,MAAMC,QAAQ;eAAIH;eAAgBF;SAAW,CAAC,IAAI,CAAC,CAACM,IAAMA,EAAE,EAAE,KAAKF,KAAK,SAAS;QACjF,OAAOC;IACT,GACC,IAAI,CAAC;AACV"}
@@ -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 } = 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"}
@@ -11,7 +11,25 @@ const initPivot = (spec)=>{
11
11
  records: [],
12
12
  widthMode: 'adaptive',
13
13
  heightMode: 'adaptive',
14
- indicatorsAsCol: false
14
+ indicatorsAsCol: false,
15
+ select: {
16
+ highlightMode: 'cell',
17
+ headerSelectMode: 'inline'
18
+ },
19
+ hover: {
20
+ highlightMode: 'cross'
21
+ },
22
+ tooltip: {
23
+ isShowOverflowTextTooltip: true
24
+ },
25
+ corner: {
26
+ titleOnDimension: 'all'
27
+ },
28
+ animationAppear: {
29
+ duration: 600,
30
+ type: 'all',
31
+ direction: 'row'
32
+ }
15
33
  };
16
34
  };
17
35
  const pivotIndicatorsAsRow = (spec)=>{
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/pivot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/pivot.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { SpecPipe } from 'src/types'\n\nexport const initPivot: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n animation: true,\n rows: [],\n columns: [],\n indicators: [],\n records: [],\n widthMode: 'adaptive',\n heightMode: 'adaptive',\n indicatorsAsCol: false,\n }\n}\n\nexport const pivotIndicatorsAsRow: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: false,\n }\n}\n\nexport const pivotIndicatorsAsCol: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: true,\n }\n}\n"],"names":["initPivot","spec","result","pivotIndicatorsAsRow","pivotIndicatorsAsCol"],"mappings":"AAGO,MAAMA,YAAsB,CAACC;IAClC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,WAAW;QACX,MAAM,EAAE;QACR,SAAS,EAAE;QACX,YAAY,EAAE;QACd,SAAS,EAAE;QACX,WAAW;QACX,YAAY;QACZ,iBAAiB;IACnB;AACF;AAEO,MAAMC,uBAAiC,CAACF;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,iBAAiB;IACnB;AACF;AAEO,MAAME,uBAAiC,CAACH;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,iBAAiB;IACnB;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/pivot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/pivot.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { SpecPipe } from 'src/types'\n\nexport const initPivot: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n animation: true,\n rows: [],\n columns: [],\n indicators: [],\n records: [],\n widthMode: 'adaptive',\n heightMode: 'adaptive',\n indicatorsAsCol: false,\n select: {\n highlightMode: 'cell',\n headerSelectMode: 'inline',\n },\n hover: {\n highlightMode: 'cross',\n },\n tooltip: {\n isShowOverflowTextTooltip: true,\n },\n corner: {\n titleOnDimension: 'all',\n },\n animationAppear: {\n duration: 600,\n type: 'all',\n direction: 'row',\n },\n }\n}\n\nexport const pivotIndicatorsAsRow: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: false,\n }\n}\n\nexport const pivotIndicatorsAsCol: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: true,\n }\n}\n"],"names":["initPivot","spec","result","pivotIndicatorsAsRow","pivotIndicatorsAsCol"],"mappings":"AAGO,MAAMA,YAAsB,CAACC;IAClC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,WAAW;QACX,MAAM,EAAE;QACR,SAAS,EAAE;QACX,YAAY,EAAE;QACd,SAAS,EAAE;QACX,WAAW;QACX,YAAY;QACZ,iBAAiB;QACjB,QAAQ;YACN,eAAe;YACf,kBAAkB;QACpB;QACA,OAAO;YACL,eAAe;QACjB;QACA,SAAS;YACP,2BAA2B;QAC7B;QACA,QAAQ;YACN,kBAAkB;QACpB;QACA,iBAAiB;YACf,UAAU;YACV,MAAM;YACN,WAAW;QACb;IACF;AACF;AAEO,MAAMC,uBAAiC,CAACF;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,iBAAiB;IACnB;AACF;AAEO,MAAME,uBAAiC,CAACH;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,iBAAiB;IACnB;AACF"}
@@ -35,7 +35,7 @@ const generateMeasurePercent = (value, sum, formatter)=>{
35
35
  return formatter(percentValue);
36
36
  };
37
37
  const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedMeasures, encoding, foldInfoList)=>{
38
- const { enable, wrap, showValue, showValuePercent, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
38
+ const { enable, wrap, showValue, showValuePercent, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {}, labelLayout } = label;
39
39
  const labelDims = uniqueBy((vseedDimensions || []).filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
40
40
  const labelMeas = uniqueBy((vseedMeasures || []).filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
41
41
  const percentFormat = merge(numFormat, {
@@ -62,6 +62,9 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
62
62
  return result.join(' ');
63
63
  },
64
64
  position: labelPosition,
65
+ layout: {
66
+ align: labelLayout
67
+ },
65
68
  style: {
66
69
  fill: labelColor,
67
70
  fontSize: labelFontSize,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isEmpty, merge, uniqueBy } from 'remeda'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n if (!baseConfig || isEmpty(baseConfig.label)) {\n return result\n }\n\n const { label } = baseConfig\n\n result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding as Encoding, [\n foldInfo,\n ])\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure?: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n if (!measure) {\n return value\n }\n\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\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 percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n labelOverlap,\n labelColorSmartInvert,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const labelDims = uniqueBy(\n (vseedDimensions || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n const labelMeas = uniqueBy(\n (vseedMeasures || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => item.alias || item.id)\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n const measurePercentLabel = generateMeasurePercent(\n datum[measureValue] as number | string,\n statistics.sum,\n percentFormatter,\n )\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n } as ILineLikeLabelSpec\n\n if (labelOverlap) {\n result.overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","isEmpty","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","labelOverlap","labelColorSmartInvert","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","labelDims","uniqueBy","item","labelMeas","percentFormat","percentFormatter","createFormatter","_","datum","dimLabels","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel"],"mappings":";;AAiBO,MAAMA,cAAkB,CAACC,MAAMC;IACpC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IA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QACA,UAAUwC;QACV,OAAO;YACL,MAAMJ;YACN,UAAUC;YACV,YAAYC;YACZ,YAAYC;QACd;QACA,aAAaJ;IACf;IAEA,IAAID,cACFlC,OAAO,OAAO,GAAG;QACf,WAAW;QACX,YAAY;IACd;IAGF,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isEmpty, merge, uniqueBy } from 'remeda'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n if (!baseConfig || isEmpty(baseConfig.label)) {\n return result\n }\n\n const { label } = baseConfig\n\n result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding as Encoding, [\n foldInfo,\n ])\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure?: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n if (!measure) {\n return value\n }\n\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\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 percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n labelOverlap,\n labelColorSmartInvert,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n labelLayout,\n } = label\n\n const labelDims = uniqueBy(\n (vseedDimensions || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n const labelMeas = uniqueBy(\n (vseedMeasures || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => item.alias || item.id)\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n const measurePercentLabel = generateMeasurePercent(\n datum[measureValue] as number | string,\n statistics.sum,\n percentFormatter,\n )\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n layout: {\n align: labelLayout,\n },\n style: {\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n } as ILineLikeLabelSpec\n\n if (labelOverlap) {\n result.overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","isEmpty","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","labelOverlap","labelColorSmartInvert","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","labelLayout","labelDims","uniqueBy","item","labelMeas","percentFormat","percentFormatter","createFormatter","_","datum","dimLabels","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel"],"mappings":";;AAiBO,MAAMA,cAAkB,CAACC,MAAMC;IACpC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAClD,MAAMG,WAAWJ,kBAAkB,CAAC,EAAE,CAAC,QAAQ;IAC/C,IAAI,CAACG,cAAcE,QAAQF,WAAW,KAAK,GACzC,OAAON;IAGT,MAAM,EAAEH,KAAK,EAAE,GAAGS;IAElBN,OAAO,KAAK,GAAGS,WAAWZ,OAAOK,MAAM,QAAQ,EAAEA,MAAM,UAAU,EAAED,cAAc,QAAQ,EAAEI,UAAsB;QAC/GE;KACD;IAED,OAAOP;AACT;AAEO,MAAMU,uBAAuB,CAClCC,OACAC,SACAC,iBACAC,YAAuB,CAAC,CAAC;IAEzB,IAAI,CAACF,SACH,OAAOD;IAGT,MAAMI,SAASC,MAA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jB,MAAMoD,YAAYT,UAAU,GAAG,CAAC,CAACE,OAASA,KAAK,KAAK,IAAIA,KAAK,EAAE;YAC/D,MAAMQ,YAAYP,UAAU,GAAG,CAAC,CAACD,OAC/BnC,qBAAqByC,KAAK,CAACN,KAAK,EAAE,CAAC,EAAqBA,MAAMJ,YAAY3B;YAG5Ed,OAAO,IAAI,IAAIoD;YAEfvB,aAAa,OAAO,CAAC,CAACtB;gBACpB,MAAM,EAAE+C,SAAS,EAAEC,YAAY,EAAEC,UAAU,EAAE,GAAGjD;gBAChD,MAAMK,UAAU6C,gBAAgB7B,uBAAuBuB,KAAK,CAACG,UAAU;gBACvE,MAAMI,oBAAoBhD,qBACxByC,KAAK,CAACI,aAAa,EACnB3C,SACA6B,YACA3B;gBAEF,MAAM6C,sBAAsBvC,uBAC1B+B,KAAK,CAACI,aAAa,EACnBC,WAAW,GAAG,EACdR;gBAEF,IAAIhB,WACFhC,OAAO,IAAI,CAAC0D;gBAEd,IAAIzB,kBACFjC,OAAO,IAAI,CAAC2D;YAEhB;YAEA3D,OAAO,IAAI,IAAIqD;YAEf,IAAItB,MACF,OAAO/B;YAET,OAAOA,OAAO,IAAI,CAAC;QACrB;QACA,UAAUwC;QACV,QAAQ;YACN,OAAOE;QACT;QACA,OAAO;YACL,MAAMN;YACN,UAAUC;YACV,YAAYC;YACZ,YAAYC;QACd;QACA,aAAaJ;IACf;IAEA,IAAID,cACFlC,OAAO,OAAO,GAAG;QACf,WAAW;QACX,YAAY;IACd;IAGF,OAAOA;AACT"}
@@ -55,15 +55,7 @@ const colorLegend = (spec, context)=>{
55
55
  padding: 0,
56
56
  field: unfoldInfo.encodingColor,
57
57
  maxWidth: '30%',
58
- startText: {
59
- visible: true,
60
- style: {
61
- fill: labelColor || labelFontColor,
62
- fontSize: labelFontSize,
63
- fontWeight: labelFontWeight
64
- }
65
- },
66
- endText: {
58
+ handlerText: {
67
59
  visible: true,
68
60
  style: {
69
61
  fill: labelColor || labelFontColor,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/colorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/colorLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const colorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'color',\n visible: enable,\n orient,\n position: legendPosition,\n padding: 0,\n field: unfoldInfo.encodingColor,\n maxWidth: '30%',\n startText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n endText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return result\n}\n"],"names":["colorLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition"],"mappings":"AAEO,MAAMA,cAAwB,CAACC,MAAMC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ipes/legend/colorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/colorLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const colorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'color',\n visible: enable,\n orient,\n position: legendPosition,\n padding: 0,\n field: unfoldInfo.encodingColor,\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return result\n}\n"],"names":["colorLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition"],"mappings":"AAEO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,SAAS,EAAE,GAAGF;IAC1C,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAMG,aAAaJ,cAAc,MAAM,CAACE,UAAU;IAClD,IAAI,CAACE,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOL;IAGT,MAAM,EAAEM,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,MAAM,EAAEC,WAAW,QAAQ,EAAEC,cAAc,EAAEC,UAAU,EAAEC,gBAAgB,EAAE,EAAEC,eAAe,EAAE,GAAGN,UAAU,CAAC;IAEpH,MAAMO,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAENR,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACTM;QACA,UAAUC;QACV,SAAS;QACT,OAAOV,WAAW,aAAa;QAC/B,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMM,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAOZ;AACT"}
@@ -63,15 +63,7 @@ const pivotColorLegend = (spec, context)=>{
63
63
  min: min,
64
64
  max: max,
65
65
  maxWidth: '30%',
66
- startText: {
67
- visible: true,
68
- style: {
69
- fill: labelColor || labelFontColor,
70
- fontSize: labelFontSize,
71
- fontWeight: labelFontWeight
72
- }
73
- },
74
- endText: {
66
+ handlerText: {
75
67
  visible: true,
76
68
  style: {
77
69
  fill: labelColor || labelFontColor,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { IColorTableLegendOption } from '@visactor/vtable/es/ts-types/component/legend'\nimport type { Color, Legend, SpecPipe } from 'src/types'\n\nexport const pivotColorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n const max = Math.max(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMax))\n const { legend, color } = baseConfig\n const { colorScheme, linearColorScheme } = color\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends: IColorTableLegendOption = {\n visible: enable,\n type: 'color',\n orient,\n position: legendPosition,\n\n colors: linearColorScheme || colorScheme || [],\n value: [min, max],\n min: min,\n max: max,\n\n maxWidth: '30%',\n startText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n endText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return { ...result, legends }\n}\n"],"names":["pivotColorLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","max","Math","d","min","legend","color","colorScheme","linearColorScheme","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","legends"],"mappings":"AAIO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAC/B,MAAMI,MAAMC,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAMC,MAAMF,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAM,EAAEE,MAAM,EAAEC,KAAK,EAAE,GAAGP;IAC1B,MAAM,EAAEQ,WAAW,EAAEC,iBAAiB,EAAE,GAAGF;IAE3C,MAAM,EACJG,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACtB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMO,UAAmC;QACvC,SAASR;QACT,MAAM;QACNM;QACA,UAAUC;QAEV,QAAQR,qBAAqBD,eAAe,EAAE;QAC9C,OAAO;YAACH;YAAKH;SAAI;QACjB,KAAKG;QACL,KAAKH;QAEL,UAAU;QACV,WAAW;YACT,SAAS;YACT,OAAO;gBACL,MAAMW,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;QACA,SAAS;YACP,SAAS;YACT,OAAO;gBACL,MAAMF,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAO;QAAE,GAAGlB,MAAM;QAAEqB;IAAQ;AAC9B"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { IColorTableLegendOption } from '@visactor/vtable/es/ts-types/component/legend'\nimport type { Color, Legend, SpecPipe } from 'src/types'\n\nexport const pivotColorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n const max = Math.max(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMax))\n const { legend, color } = baseConfig\n const { colorScheme, linearColorScheme } = color\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends: IColorTableLegendOption = {\n visible: enable,\n type: 'color',\n orient,\n position: legendPosition,\n\n colors: linearColorScheme || colorScheme || [],\n value: [min, max],\n min: min,\n max: max,\n\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return { ...result, legends }\n}\n"],"names":["pivotColorLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","max","Math","d","min","legend","color","colorScheme","linearColorScheme","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","legends"],"mappings":"AAIO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAC/B,MAAMI,MAAMC,KAAK,GAAG,I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types';
2
2
  export declare const percent: SpecPipe;
@@ -1,4 +1,4 @@
1
- const percent = (spec, context)=>{
1
+ const percent = (spec)=>{
2
2
  const result = {
3
3
  ...spec
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/percent/percent.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/percent/percent.ts"],"sourcesContent":["import { IAreaChartSpec, IBarChartSpec } from '@visactor/vchart'\nimport { SpecPipe } from 'src/types'\n\nexport const percent: SpecPipe = (spec, context) => {\n const result = { ...spec } as IAreaChartSpec | IBarChartSpec\n result.percent = true\n return result\n}\n"],"names":["percent","spec","context","result"],"mappings":"AAGO,MAAMA,UAAoB,CAACC,MAAMC;IACtC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzBE,OAAO,OAAO,GAAG;IACjB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/percent/percent.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/percent/percent.ts"],"sourcesContent":["import type { IAreaChartSpec, IBarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const percent: SpecPipe = (spec) => {\n const result = { ...spec } as IAreaChartSpec | IBarChartSpec\n result.percent = true\n return result\n}\n"],"names":["percent","spec","result"],"mappings":"AAGO,MAAMA,UAAoB,CAACC;IAChC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IACzBC,OAAO,OAAO,GAAG;IACjB,OAAOA;AACT"}