@visactor/vseed 0.1.42 → 0.1.44

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 (324) hide show
  1. package/dist/cjs/index.cjs +3 -3
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/advanced/colorItems.d.ts +4 -1
  4. package/dist/esm/builder/builder/advanced/colorItems.js +1 -1
  5. package/dist/esm/builder/builder/advanced/colorItems.js.map +1 -1
  6. package/dist/esm/builder/builder/builder.d.ts +4392 -3
  7. package/dist/esm/dataReshape/constant.d.ts +1 -0
  8. package/dist/esm/dataReshape/constant.js +2 -1
  9. package/dist/esm/dataReshape/constant.js.map +1 -1
  10. package/dist/esm/dataReshape/dataReshapeByEncoding.d.ts +1 -0
  11. package/dist/esm/dataReshape/dataReshapeByEncoding.js +3 -2
  12. package/dist/esm/dataReshape/dataReshapeByEncoding.js.map +1 -1
  13. package/dist/esm/dataReshape/foldMeasures.d.ts +1 -0
  14. package/dist/esm/dataReshape/foldMeasures.js +5 -2
  15. package/dist/esm/dataReshape/foldMeasures.js.map +1 -1
  16. package/dist/esm/dataReshape/unfoldDimensions.js +14 -9
  17. package/dist/esm/dataReshape/unfoldDimensions.js.map +1 -1
  18. package/dist/esm/dataSelector/selector.d.ts +1 -1
  19. package/dist/esm/dataSelector/selector.js +1 -2
  20. package/dist/esm/dataSelector/selector.js.map +1 -1
  21. package/dist/esm/pipeline/advanced/chart/pipeline/area.js +2 -2
  22. package/dist/esm/pipeline/advanced/chart/pipeline/area.js.map +1 -1
  23. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js +2 -2
  24. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js.map +1 -1
  25. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js +2 -2
  26. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js.map +1 -1
  27. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js +2 -2
  28. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js.map +1 -1
  29. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js +2 -2
  30. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js.map +1 -1
  31. package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js +2 -2
  32. package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js.map +1 -1
  33. package/dist/esm/pipeline/advanced/chart/pipeline/column.js +2 -2
  34. package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
  35. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js +2 -2
  36. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js.map +1 -1
  37. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js +2 -2
  38. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js.map +1 -1
  39. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +2 -2
  40. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
  41. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js +2 -2
  42. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js.map +1 -1
  43. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js +2 -2
  44. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js.map +1 -1
  45. package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js +2 -2
  46. package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js.map +1 -1
  47. package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +4 -2
  48. package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
  49. package/dist/esm/pipeline/advanced/chart/pipeline/line.js +2 -2
  50. package/dist/esm/pipeline/advanced/chart/pipeline/line.js.map +1 -1
  51. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +2 -2
  52. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
  53. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js +2 -2
  54. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js.map +1 -1
  55. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js +2 -2
  56. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js.map +1 -1
  57. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js +2 -2
  58. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js.map +1 -1
  59. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js +2 -2
  60. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js.map +1 -1
  61. package/dist/esm/pipeline/advanced/chart/pipes/analysis/sortLegend.js +3 -6
  62. package/dist/esm/pipeline/advanced/chart/pipes/analysis/sortLegend.js.map +1 -1
  63. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.d.ts +1 -0
  64. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +35 -2
  65. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
  66. package/dist/esm/pipeline/advanced/chart/pipes/default/{defaultMeasureName.d.ts → defaultMeasureId.d.ts} +1 -1
  67. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasureId.js +16 -0
  68. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasureId.js.map +1 -0
  69. package/dist/esm/pipeline/advanced/chart/pipes/default/index.d.ts +1 -1
  70. package/dist/esm/pipeline/advanced/chart/pipes/default/index.js +2 -2
  71. package/dist/esm/pipeline/advanced/chart/pipes/encoding/bar.js +6 -6
  72. package/dist/esm/pipeline/advanced/chart/pipes/encoding/bar.js.map +1 -1
  73. package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js +7 -7
  74. package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js.map +1 -1
  75. package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/addColorToEncoding.d.ts +1 -1
  76. package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/addColorToEncoding.js +4 -4
  77. package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/addColorToEncoding.js.map +1 -1
  78. package/dist/esm/pipeline/advanced/chart/pipes/encoding/column.js +6 -6
  79. package/dist/esm/pipeline/advanced/chart/pipes/encoding/column.js.map +1 -1
  80. package/dist/esm/pipeline/advanced/chart/pipes/encoding/dualAxis.js +6 -6
  81. package/dist/esm/pipeline/advanced/chart/pipes/encoding/dualAxis.js.map +1 -1
  82. package/dist/esm/pipeline/advanced/chart/pipes/encoding/funnel.js +5 -5
  83. package/dist/esm/pipeline/advanced/chart/pipes/encoding/funnel.js.map +1 -1
  84. package/dist/esm/pipeline/advanced/chart/pipes/encoding/heatmap.js +7 -7
  85. package/dist/esm/pipeline/advanced/chart/pipes/encoding/heatmap.js.map +1 -1
  86. package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js +6 -6
  87. package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js.map +1 -1
  88. package/dist/esm/pipeline/advanced/chart/pipes/encoding/line.js +5 -5
  89. package/dist/esm/pipeline/advanced/chart/pipes/encoding/line.js.map +1 -1
  90. package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js +5 -5
  91. package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js.map +1 -1
  92. package/dist/esm/pipeline/advanced/chart/pipes/encoding/radar.js +5 -5
  93. package/dist/esm/pipeline/advanced/chart/pipes/encoding/radar.js.map +1 -1
  94. package/dist/esm/pipeline/advanced/chart/pipes/encoding/rose.js +6 -6
  95. package/dist/esm/pipeline/advanced/chart/pipes/encoding/rose.js.map +1 -1
  96. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js +7 -7
  97. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js.map +1 -1
  98. package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js +1 -1
  99. package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -1
  100. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js +6 -3
  101. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
  102. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +4 -1
  103. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  104. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +22 -2
  105. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
  106. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +6 -3
  107. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
  108. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +22 -3
  109. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -1
  110. package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js +3 -2
  111. package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js.map +1 -1
  112. package/dist/esm/pipeline/advanced/table/pipeline/table.js +2 -1
  113. package/dist/esm/pipeline/advanced/table/pipeline/table.js.map +1 -1
  114. package/dist/esm/pipeline/advanced/table/pipes/{default/defaultMeasureName.d.ts → cellStyle/cellStyle.d.ts} +1 -1
  115. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js +16 -0
  116. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js.map +1 -0
  117. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/index.d.ts +1 -0
  118. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/index.js +2 -0
  119. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.d.ts +2 -0
  120. package/dist/esm/pipeline/advanced/table/pipes/default/{defaultMeasureName.js → defaultMeasureId.js} +5 -5
  121. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.js.map +1 -0
  122. package/dist/esm/pipeline/advanced/table/pipes/default/index.d.ts +1 -1
  123. package/dist/esm/pipeline/advanced/table/pipes/default/index.js +2 -2
  124. package/dist/esm/pipeline/advanced/table/pipes/index.d.ts +1 -0
  125. package/dist/esm/pipeline/advanced/table/pipes/index.js +1 -0
  126. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
  127. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js +2 -0
  128. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js.map +1 -1
  129. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js +2 -0
  130. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
  131. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +22 -3
  132. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
  133. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js +2 -0
  134. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
  135. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +20 -1
  136. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
  137. package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js +24 -11
  138. package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js.map +1 -1
  139. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +2 -1
  140. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
  141. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js +2 -1
  142. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
  143. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +2 -1
  144. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
  145. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js +2 -1
  146. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
  147. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js +2 -1
  148. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js.map +1 -1
  149. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js +2 -1
  150. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js.map +1 -1
  151. package/dist/esm/pipeline/spec/chart/pipes/color/color.d.ts +4 -1
  152. package/dist/esm/pipeline/spec/chart/pipes/color/color.js +2 -2
  153. package/dist/esm/pipeline/spec/chart/pipes/color/color.js.map +1 -1
  154. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js +2 -2
  155. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js.map +1 -1
  156. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js +2 -2
  157. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -1
  158. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js +2 -2
  159. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js.map +1 -1
  160. package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js +4 -0
  161. package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js.map +1 -1
  162. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js +2 -2
  163. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js.map +1 -1
  164. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +4 -3
  165. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  166. package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js +1 -1
  167. package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js.map +1 -1
  168. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js +2 -1
  169. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
  170. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js +5 -7
  171. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js.map +1 -1
  172. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js +23 -6
  173. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
  174. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +39 -34
  175. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  176. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js +10 -3
  177. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
  178. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +1 -1
  179. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
  180. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +1 -1
  181. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
  182. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +6 -3
  183. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
  184. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +2 -0
  185. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
  186. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +2 -0
  187. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
  188. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js +2 -0
  189. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js.map +1 -1
  190. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +2 -0
  191. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -1
  192. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js +2 -0
  193. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
  194. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.d.ts +3 -0
  195. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js +31 -0
  196. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js.map +1 -0
  197. package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js +3 -2
  198. package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js.map +1 -1
  199. package/dist/esm/pipeline/spec/table/pipeline/table.js +3 -2
  200. package/dist/esm/pipeline/spec/table/pipeline/table.js.map +1 -1
  201. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.d.ts +2 -0
  202. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js +14 -0
  203. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js.map +1 -0
  204. package/dist/esm/pipeline/spec/table/pipes/cellStyle/index.d.ts +2 -0
  205. package/dist/esm/pipeline/spec/table/pipes/cellStyle/index.js +2 -0
  206. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.d.ts +2 -0
  207. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js +49 -0
  208. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -0
  209. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.d.ts +2 -0
  210. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js +41 -0
  211. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -0
  212. package/dist/esm/pipeline/spec/table/pipes/index.d.ts +1 -0
  213. package/dist/esm/pipeline/spec/table/pipes/index.js +1 -0
  214. package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js +13 -3
  215. package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js.map +1 -1
  216. package/dist/esm/pipeline/utils/constant.d.ts +3 -1
  217. package/dist/esm/pipeline/utils/constant.js +4 -2
  218. package/dist/esm/pipeline/utils/constant.js.map +1 -1
  219. package/dist/esm/pipeline/utils/measures/depth.js.map +1 -1
  220. package/dist/esm/pipeline/utils/measures/find.js.map +1 -1
  221. package/dist/esm/pipeline/utils/tree/traverse.d.ts +1 -11
  222. package/dist/esm/pipeline/utils/tree/traverse.js +3 -4
  223. package/dist/esm/pipeline/utils/tree/traverse.js.map +1 -1
  224. package/dist/esm/theme/common/axes.js +2 -2
  225. package/dist/esm/theme/common/axes.js.map +1 -1
  226. package/dist/esm/theme/common/table.d.ts +30 -22
  227. package/dist/esm/theme/common/table.js +12 -2
  228. package/dist/esm/theme/common/table.js.map +1 -1
  229. package/dist/esm/theme/common/tooltip.d.ts +3 -2
  230. package/dist/esm/theme/common/tooltip.js +24 -2
  231. package/dist/esm/theme/common/tooltip.js.map +1 -1
  232. package/dist/esm/theme/dark/dark.js +2 -2
  233. package/dist/esm/theme/dark/dark.js.map +1 -1
  234. package/dist/esm/theme/light/light.js +2 -2
  235. package/dist/esm/theme/light/light.js.map +1 -1
  236. package/dist/esm/types/advancedVSeed.d.ts +3446 -1
  237. package/dist/esm/types/advancedVSeed.js +2 -0
  238. package/dist/esm/types/advancedVSeed.js.map +1 -1
  239. package/dist/esm/types/builder/builder.d.ts +4 -1
  240. package/dist/esm/types/builder/builder.js.map +1 -1
  241. package/dist/esm/types/chartType/area/zArea.d.ts +80 -0
  242. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +80 -0
  243. package/dist/esm/types/chartType/bar/zBar.d.ts +80 -0
  244. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +80 -0
  245. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +80 -0
  246. package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +80 -0
  247. package/dist/esm/types/chartType/column/zColumn.d.ts +82 -0
  248. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +80 -0
  249. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +80 -0
  250. package/dist/esm/types/chartType/donut/zDonut.d.ts +80 -0
  251. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +80 -0
  252. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +80 -0
  253. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +80 -0
  254. package/dist/esm/types/chartType/histogram/histogram.d.ts +2 -2
  255. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +88 -4
  256. package/dist/esm/types/chartType/histogram/zHistogram.js +2 -2
  257. package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
  258. package/dist/esm/types/chartType/line/zLine.d.ts +80 -0
  259. package/dist/esm/types/chartType/pie/zPie.d.ts +80 -0
  260. package/dist/esm/types/chartType/pivotTable/pivotTable.d.ts +5 -1
  261. package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +76 -0
  262. package/dist/esm/types/chartType/pivotTable/zPivotTable.js +2 -1
  263. package/dist/esm/types/chartType/pivotTable/zPivotTable.js.map +1 -1
  264. package/dist/esm/types/chartType/radar/zRadar.d.ts +80 -0
  265. package/dist/esm/types/chartType/rose/zRose.d.ts +80 -0
  266. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +80 -0
  267. package/dist/esm/types/chartType/scatter/zScatter.d.ts +88 -0
  268. package/dist/esm/types/chartType/table/table.d.ts +5 -1
  269. package/dist/esm/types/chartType/table/zTable.d.ts +76 -0
  270. package/dist/esm/types/chartType/table/zTable.js +2 -1
  271. package/dist/esm/types/chartType/table/zTable.js.map +1 -1
  272. package/dist/esm/types/properties/cellStyle/bodyCellStyle.d.ts +138 -0
  273. package/dist/esm/types/properties/cellStyle/bodyCellStyle.js +16 -0
  274. package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -0
  275. package/dist/esm/types/properties/cellStyle/cellStyle.d.ts +80 -0
  276. package/dist/esm/types/properties/cellStyle/cellStyle.js +8 -0
  277. package/dist/esm/types/properties/cellStyle/cellStyle.js.map +1 -0
  278. package/dist/esm/types/properties/cellStyle/index.d.ts +1 -0
  279. package/dist/esm/types/properties/cellStyle/index.js +1 -0
  280. package/dist/esm/types/properties/config/area.d.ts +164 -0
  281. package/dist/esm/types/properties/config/bar.d.ts +246 -0
  282. package/dist/esm/types/properties/config/boxplot.d.ts +82 -0
  283. package/dist/esm/types/properties/config/column.d.ts +258 -0
  284. package/dist/esm/types/properties/config/config.d.ts +1676 -0
  285. package/dist/esm/types/properties/config/dualAxis.d.ts +82 -0
  286. package/dist/esm/types/properties/config/funnel.d.ts +82 -0
  287. package/dist/esm/types/properties/config/heatmap.d.ts +82 -0
  288. package/dist/esm/types/properties/config/histogram.d.ts +94 -0
  289. package/dist/esm/types/properties/config/label/label.d.ts +5 -0
  290. package/dist/esm/types/properties/config/label/zLabel.d.ts +69 -0
  291. package/dist/esm/types/properties/config/label/zLabel.js +6 -1
  292. package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
  293. package/dist/esm/types/properties/config/label/zPieLabel.d.ts +69 -0
  294. package/dist/esm/types/properties/config/line.d.ts +82 -0
  295. package/dist/esm/types/properties/config/pie.d.ts +246 -0
  296. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.d.ts +2 -0
  297. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js +3 -1
  298. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js.map +1 -1
  299. package/dist/esm/types/properties/config/rose.d.ts +164 -0
  300. package/dist/esm/types/properties/config/scatter.d.ts +94 -0
  301. package/dist/esm/types/properties/config/tooltip/tooltip.d.ts +12 -0
  302. package/dist/esm/types/properties/config/tooltip/tooltip.js +12 -1
  303. package/dist/esm/types/properties/config/tooltip/tooltip.js.map +1 -1
  304. package/dist/esm/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +4 -1
  305. package/dist/esm/types/properties/datasetReshapeInfo/zDatasetReshapeInfo.d.ts +8 -2
  306. package/dist/esm/types/properties/datasetReshapeInfo/zDatasetReshapeInfo.js +4 -1
  307. package/dist/esm/types/properties/datasetReshapeInfo/zDatasetReshapeInfo.js.map +1 -1
  308. package/dist/esm/types/properties/index.d.ts +1 -0
  309. package/dist/esm/types/properties/index.js +1 -0
  310. package/dist/esm/types/properties/markStyle/barStyle.d.ts +5 -0
  311. package/dist/esm/types/properties/markStyle/barStyle.js.map +1 -1
  312. package/dist/esm/types/properties/regressionLine/ecdfRegressionLine.d.ts +4 -0
  313. package/dist/esm/types/properties/regressionLine/kdeRegressionLine.d.ts +4 -0
  314. package/dist/esm/types/properties/regressionLine/zRegressionLine.d.ts +18 -0
  315. package/dist/esm/types/properties/regressionLine/zRegressionLine.js +1 -0
  316. package/dist/esm/types/properties/regressionLine/zRegressionLine.js.map +1 -1
  317. package/dist/esm/types/properties/theme/customTheme.d.ts +3352 -0
  318. package/dist/esm/types/zVseed.d.ts +1890 -124
  319. package/dist/umd/index.js +840 -446
  320. package/dist/umd/index.js.map +1 -1
  321. package/package.json +3 -3
  322. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasureName.js +0 -16
  323. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasureName.js.map +0 -1
  324. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureName.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { isDeepEqual } from "remeda";
2
- import { MeasureName } from "../../../../../dataReshape/index.js";
2
+ import { MeasureId } from "../../../../../dataReshape/index.js";
3
3
  const initBarParallel = (spec, context)=>{
4
4
  const result = {
5
5
  ...spec
@@ -15,7 +15,7 @@ const initBarParallel = (spec, context)=>{
15
15
  ];
16
16
  if (!sameDimensionsMode) {
17
17
  result.yField.push(unfoldInfo.encodingDetail);
18
- if (encoding.detail?.[0] === MeasureName && encoding.x?.length === 1) result.yField.pop();
18
+ if (encoding.detail?.[0] === MeasureId && encoding.x?.length === 1) result.yField.pop();
19
19
  }
20
20
  result.xField = foldInfo.measureValue;
21
21
  result.seriesField = unfoldInfo.encodingColorId;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/barParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/barParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport { MeasureName } from 'src/dataReshape'\nimport type { SpecPipe } from 'src/types'\n\nexport const initBarParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.y, encoding.color)\n\n result.type = 'bar'\n result.direction = 'horizontal'\n\n result.yField = [unfoldInfo.encodingY]\n\n if (!sameDimensionsMode) {\n result.yField.push(unfoldInfo.encodingDetail)\n\n if (encoding.detail?.[0] === MeasureName && encoding.x?.length === 1) {\n result.yField.pop()\n }\n }\n\n result.xField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initBarParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual","MeasureName"],"mappings":";;AAKO,MAAMA,kBAA4B,CAACC,MAAMC;IAC9C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBC,YAAYJ,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjEH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IAEnBA,OAAO,MAAM,GAAG;QAACI,WAAW,SAAS;KAAC;IAEtC,IAAI,CAACE,oBAAoB;QACvBN,OAAO,MAAM,CAAC,IAAI,CAACI,WAAW,cAAc;QAE5C,IAAID,SAAS,MAAM,EAAE,CAAC,EAAE,KAAKK,eAAeL,SAAS,CAAC,EAAE,WAAW,GACjEH,OAAO,MAAM,CAAC,GAAG;IAErB;IAEAA,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAE/CJ,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/barParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/barParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport { MeasureId } from 'src/dataReshape'\nimport type { SpecPipe } from 'src/types'\n\nexport const initBarParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.y, encoding.color)\n\n result.type = 'bar'\n result.direction = 'horizontal'\n\n result.yField = [unfoldInfo.encodingY]\n\n if (!sameDimensionsMode) {\n result.yField.push(unfoldInfo.encodingDetail)\n\n if (encoding.detail?.[0] === MeasureId && encoding.x?.length === 1) {\n result.yField.pop()\n }\n }\n\n result.xField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initBarParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual","MeasureId"],"mappings":";;AAKO,MAAMA,kBAA4B,CAACC,MAAMC;IAC9C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBC,YAAYJ,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjEH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IAEnBA,OAAO,MAAM,GAAG;QAACI,WAAW,SAAS;KAAC;IAEtC,IAAI,CAACE,oBAAoB;QACvBN,OAAO,MAAM,CAAC,IAAI,CAACI,WAAW,cAAc;QAE5C,IAAID,SAAS,MAAM,EAAE,CAAC,EAAE,KAAKK,aAAaL,SAAS,CAAC,EAAE,WAAW,GAC/DH,OAAO,MAAM,CAAC,GAAG;IAErB;IAEAA,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAE/CJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
@@ -1,5 +1,5 @@
1
1
  import { isDeepEqual } from "remeda";
2
- import { MaxMeasureId, MeasureName, MedianMeasureId, MinMeasureId, OutliersMeasureId, Q1MeasureValue, Q3MeasureValue } from "../../../../../dataReshape/constant.js";
2
+ import { MaxMeasureId, MeasureId, MedianMeasureId, MinMeasureId, OutliersMeasureId, Q1MeasureValue, Q3MeasureValue } from "../../../../../dataReshape/constant.js";
3
3
  const initBoxplot = (spec, context)=>{
4
4
  const result = {
5
5
  ...spec
@@ -21,7 +21,7 @@ const initBoxplot = (spec, context)=>{
21
21
  const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color);
22
22
  if (!sameDimensionsMode) {
23
23
  result.xField.push(unfoldInfo.encodingColor);
24
- if (encoding.color?.[0] === MeasureName && encoding.value?.length === 1) result.xField.pop();
24
+ if (encoding.color?.[0] === MeasureId && encoding.value?.length === 1) result.xField.pop();
25
25
  }
26
26
  result.padding = 0;
27
27
  result.region = [
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/boxplot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/boxplot.ts"],"sourcesContent":["import type { IBoxPlotChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isDeepEqual } from 'remeda'\nimport {\n MaxMeasureId,\n MeasureName,\n MedianMeasureId,\n MinMeasureId,\n OutliersMeasureId,\n Q1MeasureValue,\n Q3MeasureValue,\n} from 'src/dataReshape/constant'\n\nexport const initBoxplot: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBoxPlotChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n result.type = 'boxPlot'\n result.minField = MinMeasureId\n result.q1Field = Q1MeasureValue\n result.medianField = MedianMeasureId\n result.maxField = MaxMeasureId\n result.q3Field = Q3MeasureValue\n result.outliersField = OutliersMeasureId\n result.xField = [unfoldInfo.encodingX]\n result.seriesField = unfoldInfo.encodingColorId\n\n const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color)\n\n if (!sameDimensionsMode) {\n result.xField.push(unfoldInfo.encodingColor)\n\n if (encoding.color?.[0] === MeasureName && encoding.value?.length === 1) {\n result.xField.pop()\n }\n }\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initBoxplot","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","MinMeasureId","Q1MeasureValue","MedianMeasureId","MaxMeasureId","Q3MeasureValue","OutliersMeasureId","sameDimensionsMode","isDeepEqual","MeasureName"],"mappings":";;AAaO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAE5CF,OAAO,IAAI,GAAG;IACdA,OAAO,QAAQ,GAAGK;IAClBL,OAAO,OAAO,GAAGM;IACjBN,OAAO,WAAW,GAAGO;IACrBP,OAAO,QAAQ,GAAGQ;IAClBR,OAAO,OAAO,GAAGS;IACjBT,OAAO,aAAa,GAAGU;IACvBV,OAAO,MAAM,GAAG;QAACI,WAAW,SAAS;KAAC;IACtCJ,OAAO,WAAW,GAAGI,WAAW,eAAe;IAE/C,MAAMO,qBAAqBC,YAAYT,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjE,IAAI,CAACQ,oBAAoB;QACvBX,OAAO,MAAM,CAAC,IAAI,CAACI,WAAW,aAAa;QAE3C,IAAID,SAAS,KAAK,EAAE,CAAC,EAAE,KAAKU,eAAeV,SAAS,KAAK,EAAE,WAAW,GACpEH,OAAO,MAAM,CAAC,GAAG;IAErB;IAEAA,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/boxplot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/boxplot.ts"],"sourcesContent":["import type { IBoxPlotChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isDeepEqual } from 'remeda'\nimport {\n MaxMeasureId,\n MeasureId,\n MedianMeasureId,\n MinMeasureId,\n OutliersMeasureId,\n Q1MeasureValue,\n Q3MeasureValue,\n} from 'src/dataReshape/constant'\n\nexport const initBoxplot: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBoxPlotChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n result.type = 'boxPlot'\n result.minField = MinMeasureId\n result.q1Field = Q1MeasureValue\n result.medianField = MedianMeasureId\n result.maxField = MaxMeasureId\n result.q3Field = Q3MeasureValue\n result.outliersField = OutliersMeasureId\n result.xField = [unfoldInfo.encodingX]\n result.seriesField = unfoldInfo.encodingColorId\n\n const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color)\n\n if (!sameDimensionsMode) {\n result.xField.push(unfoldInfo.encodingColor)\n\n if (encoding.color?.[0] === MeasureId && encoding.value?.length === 1) {\n result.xField.pop()\n }\n }\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initBoxplot","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","MinMeasureId","Q1MeasureValue","MedianMeasureId","MaxMeasureId","Q3MeasureValue","OutliersMeasureId","sameDimensionsMode","isDeepEqual","MeasureId"],"mappings":";;AAaO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAE5CF,OAAO,IAAI,GAAG;IACdA,OAAO,QAAQ,GAAGK;IAClBL,OAAO,OAAO,GAAGM;IACjBN,OAAO,WAAW,GAAGO;IACrBP,OAAO,QAAQ,GAAGQ;IAClBR,OAAO,OAAO,GAAGS;IACjBT,OAAO,aAAa,GAAGU;IACvBV,OAAO,MAAM,GAAG;QAACI,WAAW,SAAS;KAAC;IACtCJ,OAAO,WAAW,GAAGI,WAAW,eAAe;IAE/C,MAAMO,qBAAqBC,YAAYT,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjE,IAAI,CAACQ,oBAAoB;QACvBX,OAAO,MAAM,CAAC,IAAI,CAACI,WAAW,aAAa;QAE3C,IAAID,SAAS,KAAK,EAAE,CAAC,EAAE,KAAKU,aAAaV,SAAS,KAAK,EAAE,WAAW,GAClEH,OAAO,MAAM,CAAC,GAAG;IAErB;IAEAA,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
@@ -1,5 +1,5 @@
1
1
  import { isDeepEqual } from "remeda";
2
- import { MeasureName } from "../../../../../dataReshape/index.js";
2
+ import { MeasureId } from "../../../../../dataReshape/index.js";
3
3
  const initColumnParallel = (spec, context)=>{
4
4
  const result = {
5
5
  ...spec
@@ -15,7 +15,7 @@ const initColumnParallel = (spec, context)=>{
15
15
  ];
16
16
  if (!sameDimensionsMode) {
17
17
  result.xField.push(unfoldInfo.encodingDetail);
18
- if (encoding.detail?.[0] === MeasureName && encoding.y?.length === 1) result.xField.pop();
18
+ if (encoding.detail?.[0] === MeasureId && encoding.y?.length === 1) result.xField.pop();
19
19
  }
20
20
  result.yField = foldInfo.measureValue;
21
21
  result.seriesField = unfoldInfo.encodingColorId;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/columnParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/columnParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport { MeasureName } from 'src/dataReshape'\nimport type { SpecPipe } from 'src/types'\n\nexport const initColumnParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color)\n\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = [unfoldInfo.encodingX]\n\n if (!sameDimensionsMode) {\n result.xField.push(unfoldInfo.encodingDetail)\n\n if (encoding.detail?.[0] === MeasureName && encoding.y?.length === 1) {\n result.xField.pop()\n }\n }\n\n result.yField = foldInfo.measureValue\n result.seriesField = 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":["initColumnParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual","MeasureName"],"mappings":";;AAKO,MAAMA,qBAA+B,CAACC,MAAMC;IACjD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBC,YAAYJ,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjEH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAG;QAACI,WAAW,SAAS;KAAC;IAEtC,IAAI,CAACE,oBAAoB;QACvBN,OAAO,MAAM,CAAC,IAAI,CAACI,WAAW,cAAc;QAE5C,IAAID,SAAS,MAAM,EAAE,CAAC,EAAE,KAAKK,eAAeL,SAAS,CAAC,EAAE,WAAW,GACjEH,OAAO,MAAM,CAAC,GAAG;IAErB;IAEAA,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAC/CJ,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/columnParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/columnParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport { MeasureId } from 'src/dataReshape'\nimport type { SpecPipe } from 'src/types'\n\nexport const initColumnParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color)\n\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = [unfoldInfo.encodingX]\n\n if (!sameDimensionsMode) {\n result.xField.push(unfoldInfo.encodingDetail)\n\n if (encoding.detail?.[0] === MeasureId && encoding.y?.length === 1) {\n result.xField.pop()\n }\n }\n\n result.yField = foldInfo.measureValue\n result.seriesField = 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":["initColumnParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual","MeasureId"],"mappings":";;AAKO,MAAMA,qBAA+B,CAACC,MAAMC;IACjD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBC,YAAYJ,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjEH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAG;QAACI,WAAW,SAAS;KAAC;IAEtC,IAAI,CAACE,oBAAoB;QACvBN,OAAO,MAAM,CAAC,IAAI,CAACI,WAAW,cAAc;QAE5C,IAAID,SAAS,MAAM,EAAE,CAAC,EAAE,KAAKK,aAAaL,SAAS,CAAC,EAAE,WAAW,GAC/DH,OAAO,MAAM,CAAC,GAAG;IAErB;IAEAA,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAC/CJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
@@ -13,6 +13,10 @@ const initHistogram = (spec)=>{
13
13
  clip: true
14
14
  }
15
15
  ];
16
+ result.legends = {
17
+ visible: false
18
+ };
19
+ result.barGap = 2;
16
20
  result.animation = true;
17
21
  return result;
18
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/histogram.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/histogram.ts"],"sourcesContent":["import type { IHistogramChartSpec } from '@visactor/vchart'\nimport { BinEndMeasureId, BinStartMeasureId, FoldMeasureValue } from 'src/index'\nimport type { SpecPipe } from 'src/types'\n\nexport const initHistogram: SpecPipe = (spec) => {\n const result = { ...spec } as IHistogramChartSpec\n\n // 直方图默认支持明细数据\n result.type = 'histogram'\n result.xField = BinStartMeasureId\n result.x2Field = BinEndMeasureId\n result.yField = FoldMeasureValue\n // result.seriesField = 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":["initHistogram","spec","result","BinStartMeasureId","BinEndMeasureId","FoldMeasureValue"],"mappings":";AAIO,MAAMA,gBAA0B,CAACC;IACtC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAGzBC,OAAO,IAAI,GAAG;IACdA,OAAO,MAAM,GAAGC;IAChBD,OAAO,OAAO,GAAGE;IACjBF,OAAO,MAAM,GAAGG;IAEhBH,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/histogram.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/histogram.ts"],"sourcesContent":["import type { IHistogramChartSpec } from '@visactor/vchart'\nimport { BinEndMeasureId, BinStartMeasureId, FoldMeasureValue } from 'src/index'\nimport type { SpecPipe } from 'src/types'\n\nexport const initHistogram: SpecPipe = (spec) => {\n const result = { ...spec } as IHistogramChartSpec\n\n // 直方图默认支持明细数据\n result.type = 'histogram'\n result.xField = BinStartMeasureId\n result.x2Field = BinEndMeasureId\n result.yField = FoldMeasureValue\n // result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.legends = {\n visible: false,\n }\n result.barGap = 2\n result.animation = true\n return result\n}\n"],"names":["initHistogram","spec","result","BinStartMeasureId","BinEndMeasureId","FoldMeasureValue"],"mappings":";AAIO,MAAMA,gBAA0B,CAACC;IACtC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAGzBC,OAAO,IAAI,GAAG;IACdA,OAAO,MAAM,GAAGC;IAChBD,OAAO,OAAO,GAAGE;IACjBF,OAAO,MAAM,GAAGG;IAEhBH,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,OAAO,GAAG;QACf,SAAS;IACX;IACAA,OAAO,MAAM,GAAG;IAChBA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
@@ -1,5 +1,5 @@
1
1
  import { isDeepEqual } from "remeda";
2
- import { MeasureName } from "../../../../../dataReshape/index.js";
2
+ import { MeasureId } from "../../../../../dataReshape/index.js";
3
3
  const initRoseParallel = (spec, context)=>{
4
4
  const result = {
5
5
  ...spec
@@ -14,7 +14,7 @@ const initRoseParallel = (spec, context)=>{
14
14
  ];
15
15
  if (!sameDimensionsMode) {
16
16
  result.angleField.push(unfoldInfo.encodingDetail);
17
- if (encoding.detail?.[0] === MeasureName && encoding.radius?.length === 1) result.angleField.pop();
17
+ if (encoding.detail?.[0] === MeasureId && encoding.radius?.length === 1) result.angleField.pop();
18
18
  }
19
19
  result.valueField = foldInfo.measureValue;
20
20
  result.seriesField = unfoldInfo.encodingColorId;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/roseParallel.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport { MeasureName } from 'src/dataReshape'\nimport type { SpecPipe } from 'src/types'\n\nexport const initRoseParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, dataset, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.angle, encoding.color)\n\n result.type = 'rose'\n result.angleField = [unfoldInfo.encodingAngle]\n\n if (!sameDimensionsMode) {\n result.angleField.push(unfoldInfo.encodingDetail)\n\n if (encoding.detail?.[0] === MeasureName && encoding.radius?.length === 1) {\n result.angleField.pop()\n }\n }\n\n result.valueField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n\n result.outerRadius = 0.9\n result.innerRadius = 0\n\n const hasNegativeValue = dataset.flat().find((d) => d[foldInfo.measureValue] < 0)\n if (hasNegativeValue) {\n result.innerRadius = 0.05\n }\n\n result.rose = {\n style: {\n stroke: '#ffffff',\n lineWidth: 1,\n },\n state: {\n hover: {\n lineWidth: 1,\n fillOpacity: 0.6,\n },\n },\n }\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initRoseParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","dataset","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual","MeasureName","hasNegativeValue","d"],"mappings":";;AAKO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGH;IAClD,MAAM,EAAEI,UAAU,EAAEC,QAAQ,EAAE,GAAGJ,kBAAkB,CAAC,EAAE;IAEtD,MAAMK,qBAAqBC,YAAYJ,SAAS,KAAK,EAAEA,SAAS,KAAK;IAErEJ,OAAO,IAAI,GAAG;IACdA,OAAO,UAAU,GAAG;QAACK,WAAW,aAAa;KAAC;IAE9C,IAAI,CAACE,oBAAoB;QACvBP,OAAO,UAAU,CAAC,IAAI,CAACK,WAAW,cAAc;QAEhD,IAAID,SAAS,MAAM,EAAE,CAAC,EAAE,KAAKK,eAAeL,SAAS,MAAM,EAAE,WAAW,GACtEJ,OAAO,UAAU,CAAC,GAAG;IAEzB;IAEAA,OAAO,UAAU,GAAGM,SAAS,YAAY;IACzCN,OAAO,WAAW,GAAGK,WAAW,eAAe;IAC/CL,OAAO,OAAO,GAAG;IAEjBA,OAAO,WAAW,GAAG;IACrBA,OAAO,WAAW,GAAG;IAErB,MAAMU,mBAAmBP,QAAQ,IAAI,GAAG,IAAI,CAAC,CAACQ,IAAMA,CAAC,CAACL,SAAS,YAAY,CAAC,GAAG;IAC/E,IAAII,kBACFV,OAAO,WAAW,GAAG;IAGvBA,OAAO,IAAI,GAAG;QACZ,OAAO;YACL,QAAQ;YACR,WAAW;QACb;QACA,OAAO;YACL,OAAO;gBACL,WAAW;gBACX,aAAa;YACf;QACF;IACF;IACAA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/roseParallel.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport { MeasureId } from 'src/dataReshape'\nimport type { SpecPipe } from 'src/types'\n\nexport const initRoseParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, dataset, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.angle, encoding.color)\n\n result.type = 'rose'\n result.angleField = [unfoldInfo.encodingAngle]\n\n if (!sameDimensionsMode) {\n result.angleField.push(unfoldInfo.encodingDetail)\n\n if (encoding.detail?.[0] === MeasureId && encoding.radius?.length === 1) {\n result.angleField.pop()\n }\n }\n\n result.valueField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n\n result.outerRadius = 0.9\n result.innerRadius = 0\n\n const hasNegativeValue = dataset.flat().find((d) => d[foldInfo.measureValue] < 0)\n if (hasNegativeValue) {\n result.innerRadius = 0.05\n }\n\n result.rose = {\n style: {\n stroke: '#ffffff',\n lineWidth: 1,\n },\n state: {\n hover: {\n lineWidth: 1,\n fillOpacity: 0.6,\n },\n },\n }\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initRoseParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","dataset","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual","MeasureId","hasNegativeValue","d"],"mappings":";;AAKO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGH;IAClD,MAAM,EAAEI,UAAU,EAAEC,QAAQ,EAAE,GAAGJ,kBAAkB,CAAC,EAAE;IAEtD,MAAMK,qBAAqBC,YAAYJ,SAAS,KAAK,EAAEA,SAAS,KAAK;IAErEJ,OAAO,IAAI,GAAG;IACdA,OAAO,UAAU,GAAG;QAACK,WAAW,aAAa;KAAC;IAE9C,IAAI,CAACE,oBAAoB;QACvBP,OAAO,UAAU,CAAC,IAAI,CAACK,WAAW,cAAc;QAEhD,IAAID,SAAS,MAAM,EAAE,CAAC,EAAE,KAAKK,aAAaL,SAAS,MAAM,EAAE,WAAW,GACpEJ,OAAO,UAAU,CAAC,GAAG;IAEzB;IAEAA,OAAO,UAAU,GAAGM,SAAS,YAAY;IACzCN,OAAO,WAAW,GAAGK,WAAW,eAAe;IAC/CL,OAAO,OAAO,GAAG;IAEjBA,OAAO,WAAW,GAAG;IACrBA,OAAO,WAAW,GAAG;IAErB,MAAMU,mBAAmBP,QAAQ,IAAI,GAAG,IAAI,CAAC,CAACQ,IAAMA,CAAC,CAACL,SAAS,YAAY,CAAC,GAAG;IAC/E,IAAII,kBACFV,OAAO,WAAW,GAAG;IAGvBA,OAAO,IAAI,GAAG;QACZ,OAAO;YACL,QAAQ;YACR,WAAW;QACb;QACA,OAAO;YACL,OAAO;gBACL,WAAW;gBACX,aAAa;YACf;QACF;IACF;IACAA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
@@ -1,6 +1,7 @@
1
1
  import { DATUM_HIDE_KEY, createFormatter, createFormatterByMeasure, findMeasureById } from "../../../../utils/index.js";
2
2
  import { isNumber, merge, uniqueBy } from "remeda";
3
- import { MeasureName } from "../../../../../dataReshape/constant.js";
3
+ import { selector } from "../../../../../dataSelector/index.js";
4
+ import { MeasureId } from "../../../../../dataReshape/constant.js";
4
5
  const label_label = (spec, context)=>{
5
6
  const result = {
6
7
  ...spec
@@ -36,7 +37,7 @@ const generateMeasurePercent = (value, sum, formatter)=>{
36
37
  const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedDimensions, advancedVSeedMeasures, encoding, foldInfoList)=>{
37
38
  const { enable, wrap, showValue, showValuePercent, showDimension, labelOverlap, labelColorSmartInvert, labelStroke, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
38
39
  const hasDimLabelEncoding = vseedDimensions.some((item)=>encoding.label?.includes(item.id));
39
- const labelDims = uniqueBy(hasDimLabelEncoding ? vseedDimensions.filter((item)=>encoding.label?.includes(item.id)) : showDimension ? advancedVSeedDimensions.filter((d)=>d.id !== MeasureName) : [], (item)=>item.id);
40
+ const labelDims = uniqueBy(hasDimLabelEncoding ? vseedDimensions.filter((item)=>encoding.label?.includes(item.id)) : showDimension ? advancedVSeedDimensions.filter((d)=>d.id !== MeasureId) : [], (item)=>item.id);
40
41
  const labelMeas = uniqueBy(vseedMeasures.filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
41
42
  const percentFormat = merge(numFormat, {
42
43
  type: 'percent'
@@ -44,7 +45,7 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
44
45
  const percentFormatter = createFormatter(percentFormat);
45
46
  const result = {
46
47
  visible: enable,
47
- dataFilter: (data)=>data.filter((entry)=>entry.data?.[DATUM_HIDE_KEY] !== true),
48
+ dataFilter: (data)=>data.filter((entry)=>entry.data?.[DATUM_HIDE_KEY] !== true && selector(entry.data, label.selector, 'Or')),
48
49
  formatMethod: (_, datum)=>{
49
50
  const result = [];
50
51
  const dimLabels = labelDims.map((item)=>{
@@ -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 { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimension,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { MeasureName } from 'src/dataReshape/constant'\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\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n ) as unknown as ILineChartSpec['label']\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\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 advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelStroke,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureName)\n : [],\n (item: Dimension) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item: Measure) => 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 dataFilter: (data: Datum[]) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true\n })\n },\n formatMethod: (_: unknown, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item: Dimension) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item: Measure) =>\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 if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n // 饼图/环图需要使用实际占比数据\n const measurePercentLabel = isNumber(datum['__VCHART_ARC_RATIO'])\n ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter)\n : generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter)\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\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 stroke: labelStroke,\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n }\n\n if (labelOverlap) {\n ;(result as any).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","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelStroke","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureName","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel","isNumber"],"mappings":"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"}
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 { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimension,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { selector } from 'src/dataSelector'\nimport { MeasureId } from 'src/dataReshape/constant'\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\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n ) as unknown as ILineChartSpec['label']\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\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 advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelStroke,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureId)\n : [],\n (item: Dimension) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item: Measure) => 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 dataFilter: (data: Datum[]) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true && selector(entry.data as Datum, label.selector, 'Or')\n })\n },\n formatMethod: (_: unknown, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item: Dimension) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item: Measure) =>\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 if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n // 饼图/环图需要使用实际占比数据\n const measurePercentLabel = isNumber(datum['__VCHART_ARC_RATIO'])\n ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter)\n : generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter)\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\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 stroke: labelStroke,\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n }\n\n if (labelOverlap) {\n ;(result as any).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","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelStroke","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureId","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","selector","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel","isNumber"],"mappings":"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"}
@@ -85,7 +85,7 @@ const discreteLegend = (spec, context)=>{
85
85
  }
86
86
  },
87
87
  label: {
88
- formatMethod: (value)=>unfoldInfo.colorIdMap[String(value)] ?? value,
88
+ formatMethod: (value)=>unfoldInfo.colorIdMap[String(value)]?.alias ?? value,
89
89
  style: {
90
90
  fontSize: labelFontSize,
91
91
  fill: labelColor || labelFontColor,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/discreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/discreteLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const discreteLegend: 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 {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\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 result.legends = {\n type: 'discrete',\n visible: enable,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n autoPage: true,\n orient,\n position: legendPosition,\n item: {\n focus: true,\n maxWidth: '30%',\n focusIconStyle: {\n size: labelFontSize + 2,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n shape: {\n space: border ? 6 : 4,\n style: (item) => {\n return {\n symbolType: shapeType,\n size: border ? 8 : 10,\n fillOpacity: 1,\n opacity: 1,\n stroke: false,\n outerBorder: border\n ? {\n stroke: item.shape.fill,\n distance: 3,\n lineWidth: 1,\n }\n : null,\n }\n },\n state: {\n unSelected: {\n opacity: 0.2,\n fillOpacity: 1, // 覆盖 vchart 里的默认值\n },\n },\n },\n label: {\n formatMethod: (value) => {\n return unfoldInfo.colorIdMap[String(value)] ?? value\n },\n style: {\n fontSize: labelFontSize,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n state: {\n unSelected: {\n fill: labelColor || labelFontColor, // 覆盖vchart里面的默认值\n fillOpacity: 0.8, // 覆盖 vchart 里的默认值\n },\n },\n },\n background: {\n state: {\n selectedHover: {\n fill: labelColor || labelFontColor,\n fillOpacity: 0.05,\n },\n unSelectedHover: {\n fill: null,\n },\n },\n },\n },\n padding: 0,\n }\n return result\n}\n"],"names":["discreteLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","Math","item","value","String"],"mappings":"AAEO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,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,EACJE,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,eAAe,EACfC,UAAU,CAAC,EACXC,MAAM,EACNC,YAAY,WAAW,EACxB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACR,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,MAAMS,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACT,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAENR,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACT,QAAQW,KAAK,GAAG,CAAC,GAAGL;QACpB,QAAQK,KAAK,GAAG,CAAC,GAAGL;QACpB,UAAU;QACVG;QACA,UAAUC;QACV,MAAM;YACJ,OAAO;YACP,UAAU;YACV,gBAAgB;gBACd,MAAMN,gBAAgB;gBACtB,MAAMD,cAAcD;gBACpB,YAAYG;YACd;YACA,OAAO;gBACL,OAAOE,SAAS,IAAI;gBACpB,OAAO,CAACK,OACC;wBACL,YAAYJ;wBACZ,MAAMD,SAAS,IAAI;wBACnB,aAAa;wBACb,SAAS;wBACT,QAAQ;wBACR,aAAaA,SACT;4BACE,QAAQK,KAAK,KAAK,CAAC,IAAI;4BACvB,UAAU;4BACV,WAAW;wBACb,IACA;oBACN;gBAEF,OAAO;oBACL,YAAY;wBACV,SAAS;wBACT,aAAa;oBACf;gBACF;YACF;YACA,OAAO;gBACL,cAAc,CAACC,QACNhB,WAAW,UAAU,CAACiB,OAAOD,OAAO,IAAIA;gBAEjD,OAAO;oBACL,UAAUT;oBACV,MAAMD,cAAcD;oBACpB,YAAYG;gBACd;gBACA,OAAO;oBACL,YAAY;wBACV,MAAMF,cAAcD;wBACpB,aAAa;oBACf;gBACF;YACF;YACA,YAAY;gBACV,OAAO;oBACL,eAAe;wBACb,MAAMC,cAAcD;wBACpB,aAAa;oBACf;oBACA,iBAAiB;wBACf,MAAM;oBACR;gBACF;YACF;QACF;QACA,SAAS;IACX;IACA,OAAOT;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/legend/discreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/discreteLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const discreteLegend: 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 {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\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 result.legends = {\n type: 'discrete',\n visible: enable,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n autoPage: true,\n orient,\n position: legendPosition,\n item: {\n focus: true,\n maxWidth: '30%',\n focusIconStyle: {\n size: labelFontSize + 2,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n shape: {\n space: border ? 6 : 4,\n style: (item) => {\n return {\n symbolType: shapeType,\n size: border ? 8 : 10,\n fillOpacity: 1,\n opacity: 1,\n stroke: false,\n outerBorder: border\n ? {\n stroke: item.shape.fill,\n distance: 3,\n lineWidth: 1,\n }\n : null,\n }\n },\n state: {\n unSelected: {\n opacity: 0.2,\n fillOpacity: 1, // 覆盖 vchart 里的默认值\n },\n },\n },\n label: {\n formatMethod: (value) => {\n return unfoldInfo.colorIdMap[String(value)]?.alias ?? value\n },\n style: {\n fontSize: labelFontSize,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n state: {\n unSelected: {\n fill: labelColor || labelFontColor, // 覆盖vchart里面的默认值\n fillOpacity: 0.8, // 覆盖 vchart 里的默认值\n },\n },\n },\n background: {\n state: {\n selectedHover: {\n fill: labelColor || labelFontColor,\n fillOpacity: 0.05,\n },\n unSelectedHover: {\n fill: null,\n },\n },\n },\n },\n padding: 0,\n }\n return result\n}\n"],"names":["discreteLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","Math","item","value","String"],"mappings":"AAEO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,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,EACJE,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,eAAe,EACfC,UAAU,CAAC,EACXC,MAAM,EACNC,YAAY,WAAW,EACxB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACR,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,MAAMS,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACT,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAENR,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACT,QAAQW,KAAK,GAAG,CAAC,GAAGL;QACpB,QAAQK,KAAK,GAAG,CAAC,GAAGL;QACpB,UAAU;QACVG;QACA,UAAUC;QACV,MAAM;YACJ,OAAO;YACP,UAAU;YACV,gBAAgB;gBACd,MAAMN,gBAAgB;gBACtB,MAAMD,cAAcD;gBACpB,YAAYG;YACd;YACA,OAAO;gBACL,OAAOE,SAAS,IAAI;gBACpB,OAAO,CAACK,OACC;wBACL,YAAYJ;wBACZ,MAAMD,SAAS,IAAI;wBACnB,aAAa;wBACb,SAAS;wBACT,QAAQ;wBACR,aAAaA,SACT;4BACE,QAAQK,KAAK,KAAK,CAAC,IAAI;4BACvB,UAAU;4BACV,WAAW;wBACb,IACA;oBACN;gBAEF,OAAO;oBACL,YAAY;wBACV,SAAS;wBACT,aAAa;oBACf;gBACF;YACF;YACA,OAAO;gBACL,cAAc,CAACC,QACNhB,WAAW,UAAU,CAACiB,OAAOD,OAAO,EAAE,SAASA;gBAExD,OAAO;oBACL,UAAUT;oBACV,MAAMD,cAAcD;oBACpB,YAAYG;gBACd;gBACA,OAAO;oBACL,YAAY;wBACV,MAAMF,cAAcD;wBACpB,aAAa;oBACf;gBACF;YACF;YACA,YAAY;gBACV,OAAO;oBACL,eAAe;wBACb,MAAMC,cAAcD;wBACpB,aAAa;oBACf;oBACA,iBAAiB;wBACf,MAAM;oBACR;gBACF;YACF;QACF;QACA,SAAS;IACX;IACA,OAAOT;AACT"}
@@ -57,6 +57,7 @@ const pivotDiscreteLegend = (spec, context)=>{
57
57
  'br'
58
58
  ].includes(position) ? 'end' : 'middle';
59
59
  const legends = {
60
+ padding: 0,
60
61
  visible: enable,
61
62
  type: 'discrete',
62
63
  orient,
@@ -93,7 +94,7 @@ const pivotDiscreteLegend = (spec, context)=>{
93
94
  }
94
95
  },
95
96
  label: {
96
- formatMethod: (value)=>colorIdMap[value] ?? value,
97
+ formatMethod: (value)=>colorIdMap[value]?.alias ?? value,
97
98
  style: {
98
99
  fontSize: labelFontSize,
99
100
  fill: labelColor || labelFontColor,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { unique } from 'remeda'\nimport type { Color, Legend, SpecPipe } from 'src/types'\nimport { createSpecifiedForColorMapping } from '../color/color'\n\nexport const pivotDiscreteLegend: SpecPipe = (spec, context): Partial<PivotChartConstructorOptions> => {\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\n const colorItems = unique(\n datasetReshapeInfo.flatMap((d) => {\n return d.unfoldInfo.colorItems\n }),\n )\n\n const colorIdMap = datasetReshapeInfo.reduce<Record<string, string>>((prev, cur) => {\n return { ...prev, ...cur.unfoldInfo.colorIdMap }\n }, {})\n\n const { legend, color } = baseConfig\n const { colorScheme, colorMapping } = color\n\n const colorSpecified = createSpecifiedForColorMapping(colorMapping, colorIdMap, colorItems)\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\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 = {\n visible: enable,\n type: 'discrete',\n orient,\n position: legendPosition,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n data: colorItems.map((d: string, index: number) => {\n const color = colorSpecified?.[d] ?? colorScheme?.[index % colorScheme.length]\n return {\n label: d,\n shape: {\n outerBorder: border\n ? {\n stroke: color,\n distance: 3,\n lineWidth: 1,\n }\n : undefined,\n fill: color,\n },\n }\n }),\n\n item: {\n focus: true,\n maxWidth: '30%',\n focusIconStyle: {\n size: labelFontSize + 2,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n shape: {\n space: border ? 6 : 4,\n style: {\n symbolType: shapeType,\n size: border ? 8 : 10,\n },\n },\n label: {\n formatMethod: (value: string) => {\n return colorIdMap[value] ?? value\n },\n style: {\n fontSize: labelFontSize,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n },\n background: {\n state: {\n selectedHover: {\n fill: labelColor || labelFontColor,\n fillOpacity: 0.05,\n },\n },\n },\n },\n }\n return { ...result, legends } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotDiscreteLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","colorItems","unique","d","colorIdMap","prev","cur","legend","color","colorScheme","colorMapping","colorSpecified","createSpecifiedForColorMapping","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","legends","Math","index","undefined","value"],"mappings":";;AAKO,MAAMA,sBAAgC,CAACC,MAAMC;IAClD,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;IAE/B,MAAMI,aAAaC,OACjBF,mBAAmB,OAAO,CAAC,CAACG,IACnBA,EAAE,UAAU,CAAC,UAAU;IAIlC,MAAMC,aAAaJ,mBAAmB,MAAM,CAAyB,CAACK,MAAMC,MACnE;YAAE,GAAGD,IAAI;YAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;QAAC,IAC9C,CAAC;IAEJ,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGT;IAC1B,MAAM,EAAEU,WAAW,EAAEC,YAAY,EAAE,GAAGF;IAEtC,MAAMG,iBAAiBC,+BAA+BF,cAAcN,YAAYH;IAEhF,MAAM,EACJY,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACrBC,UAAU,CAAC,EACXC,MAAM,EACNC,YAAY,WAAW,EACxB,GAAGd,UAAU,CAAC;IAEf,MAAMe,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACR,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,MAAMS,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACT,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMU,UAAU;QACd,SAASX;QACT,MAAM;QACNS;QACA,UAAUC;QACV,QAAQE,KAAK,GAAG,CAAC,GAAGN;QACpB,QAAQM,KAAK,GAAG,CAAC,GAAGN;QACpB,MAAMlB,WAAW,GAAG,CAAC,CAACE,GAAWuB;YAC/B,MAAMlB,QAAQG,gBAAgB,CAACR,EAAE,IAAIM,aAAa,CAACiB,QAAQjB,YAAY,MAAM,CAAC;YAC9E,OAAO;gBACL,OAAON;gBACP,OAAO;oBACL,aAAaiB,SACT;wBACE,QAAQZ;wBACR,UAAU;wBACV,WAAW;oBACb,IACAmB;oBACJ,MAAMnB;gBACR;YACF;QACF;QAEA,MAAM;YACJ,OAAO;YACP,UAAU;YACV,gBAAgB;gBACd,MAAMS,gBAAgB;gBACtB,MAAMD,cAAcD;gBACpB,YAAYG;YACd;YACA,OAAO;gBACL,OAAOE,SAAS,IAAI;gBACpB,OAAO;oBACL,YAAYC;oBACZ,MAAMD,SAAS,IAAI;gBACrB;YACF;YACA,OAAO;gBACL,cAAc,CAACQ,QACNxB,UAAU,CAACwB,MAAM,IAAIA;gBAE9B,OAAO;oBACL,UAAUX;oBACV,MAAMD,cAAcD;oBACpB,YAAYG;gBACd;YACF;YACA,YAAY;gBACV,OAAO;oBACL,eAAe;wBACb,MAAMF,cAAcD;wBACpB,aAAa;oBACf;gBACF;YACF;QACF;IACF;IACA,OAAO;QAAE,GAAGnB,MAAM;QAAE4B;IAAQ;AAC9B"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { unique } from 'remeda'\nimport type { Color, Legend, SpecPipe } from 'src/types'\nimport { createSpecifiedForColorMapping } from '../color/color'\n\nexport const pivotDiscreteLegend: SpecPipe = (spec, context): Partial<PivotChartConstructorOptions> => {\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\n const colorItems = unique(\n datasetReshapeInfo.flatMap((d) => {\n return d.unfoldInfo.colorItems\n }),\n )\n\n const colorIdMap = datasetReshapeInfo.reduce<Record<string, { id: string; alias: string }>>((prev, cur) => {\n return { ...prev, ...cur.unfoldInfo.colorIdMap }\n }, {})\n\n const { legend, color } = baseConfig\n const { colorScheme, colorMapping } = color\n\n const colorSpecified = createSpecifiedForColorMapping(colorMapping, colorIdMap, colorItems)\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\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 = {\n padding: 0,\n visible: enable,\n type: 'discrete',\n orient,\n position: legendPosition,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n data: colorItems.map((d: string, index: number) => {\n const color = colorSpecified?.[d] ?? colorScheme?.[index % colorScheme.length]\n return {\n label: d,\n shape: {\n outerBorder: border\n ? {\n stroke: color,\n distance: 3,\n lineWidth: 1,\n }\n : undefined,\n fill: color,\n },\n }\n }),\n\n item: {\n focus: true,\n maxWidth: '30%',\n focusIconStyle: {\n size: labelFontSize + 2,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n shape: {\n space: border ? 6 : 4,\n style: {\n symbolType: shapeType,\n size: border ? 8 : 10,\n },\n },\n label: {\n formatMethod: (value: string) => {\n return colorIdMap[value]?.alias ?? value\n },\n style: {\n fontSize: labelFontSize,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n },\n background: {\n state: {\n selectedHover: {\n fill: labelColor || labelFontColor,\n fillOpacity: 0.05,\n },\n },\n },\n },\n }\n return { ...result, legends } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotDiscreteLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","colorItems","unique","d","colorIdMap","prev","cur","legend","color","colorScheme","colorMapping","colorSpecified","createSpecifiedForColorMapping","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","legends","Math","index","undefined","value"],"mappings":";;AAKO,MAAMA,sBAAgC,CAACC,MAAMC;IAClD,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;IAE/B,MAAMI,aAAaC,OACjBF,mBAAmB,OAAO,CAAC,CAACG,IACnBA,EAAE,UAAU,CAAC,UAAU;IAIlC,MAAMC,aAAaJ,mBAAmB,MAAM,CAAgD,CAACK,MAAMC,MAC1F;YAAE,GAAGD,IAAI;YAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;QAAC,IAC9C,CAAC;IAEJ,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGT;IAC1B,MAAM,EAAEU,WAAW,EAAEC,YAAY,EAAE,GAAGF;IAEtC,MAAMG,iBAAiBC,+BAA+BF,cAAcN,YAAYH;IAEhF,MAAM,EACJY,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACrBC,UAAU,CAAC,EACXC,MAAM,EACNC,YAAY,WAAW,EACxB,GAAGd,UAAU,CAAC;IAEf,MAAMe,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACR,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,MAAMS,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACT,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMU,UAAU;QACd,SAAS;QACT,SAASX;QACT,MAAM;QACNS;QACA,UAAUC;QACV,QAAQE,KAAK,GAAG,CAAC,GAAGN;QACpB,QAAQM,KAAK,GAAG,CAAC,GAAGN;QACpB,MAAMlB,WAAW,GAAG,CAAC,CAACE,GAAWuB;YAC/B,MAAMlB,QAAQG,gBAAgB,CAACR,EAAE,IAAIM,aAAa,CAACiB,QAAQjB,YAAY,MAAM,CAAC;YAC9E,OAAO;gBACL,OAAON;gBACP,OAAO;oBACL,aAAaiB,SACT;wBACE,QAAQZ;wBACR,UAAU;wBACV,WAAW;oBACb,IACAmB;oBACJ,MAAMnB;gBACR;YACF;QACF;QAEA,MAAM;YACJ,OAAO;YACP,UAAU;YACV,gBAAgB;gBACd,MAAMS,gBAAgB;gBACtB,MAAMD,cAAcD;gBACpB,YAAYG;YACd;YACA,OAAO;gBACL,OAAOE,SAAS,IAAI;gBACpB,OAAO;oBACL,YAAYC;oBACZ,MAAMD,SAAS,IAAI;gBACrB;YACF;YACA,OAAO;gBACL,cAAc,CAACQ,QACNxB,UAAU,CAACwB,MAAM,EAAE,SAASA;gBAErC,OAAO;oBACL,UAAUX;oBACV,MAAMD,cAAcD;oBACpB,YAAYG;gBACd;YACF;YACA,YAAY;gBACV,OAAO;oBACL,eAAe;wBACb,MAAMF,cAAcD;wBACpB,aAAa;oBACf;gBACF;YACF;QACF;IACF;IACA,OAAO;QAAE,GAAGnB,MAAM;QAAE4B;IAAQ;AAC9B"}
@@ -25,7 +25,7 @@ const barStyle_barStyle = (spec, context)=>{
25
25
  barStyle
26
26
  ];
27
27
  const customMap = barStyles.reduce((result, style, index)=>{
28
- const { barBorderColor, barBorderStyle, barBorderWidth = 1, barColor, barColorOpacity, barRadius, barVisible = true } = style;
28
+ const { barBorderColor, barBorderStyle, barBorderWidth = 1, barColor, barColorOpacity, barBorderOpacity, barRadius, barVisible = true } = style;
29
29
  const lineDash = 'dashed' === barBorderStyle ? [
30
30
  5,
31
31
  2
@@ -49,12 +49,10 @@ const barStyle_barStyle = (spec, context)=>{
49
49
  fill: barColor,
50
50
  fillOpacity: barColorOpacity,
51
51
  cornerRadius: barRadius,
52
- innerBorder: {
53
- stroke: barBorderColor,
54
- lineWidth: barBorderWidth,
55
- distance: (barBorderWidth || 0) / 2,
56
- lineDash: lineDash
57
- }
52
+ lineWidth: barBorderWidth,
53
+ stroke: barBorderColor,
54
+ strokeOpacity: barBorderOpacity,
55
+ lineDash: lineDash
58
56
  }
59
57
  }
60
58
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/barStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/barStyle.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BarStyle, Datum, SpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const barStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, dataset = [] } = advancedVSeed\n const { barStyle } = markStyle\n\n const showStroke = dataset.length <= 100\n\n const result = {\n ...spec,\n bar: {\n style: {\n visible: true,\n fillOpacity: 1,\n lineWidth: showStroke ? 1 : 0,\n },\n state: {\n hover: {\n fillOpacity: 0.6,\n },\n },\n },\n } as IBarChartSpec\n\n if (isNullish(barStyle) || isEmpty(barStyle)) {\n return result\n }\n\n const barStyles = (Array.isArray(barStyle) ? barStyle : [barStyle]) as BarStyle[]\n\n const customMap = barStyles.reduce<object>((result, style, index) => {\n const {\n barBorderColor,\n barBorderStyle,\n barBorderWidth = 1,\n barColor,\n barColorOpacity,\n barRadius,\n barVisible = true,\n } = style\n\n const lineDash = barBorderStyle === 'dashed' ? [5, 2] : barBorderStyle === 'dotted' ? [2, 5] : [0, 0]\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n if (selector(datum, style.selector)) {\n return true\n }\n return false\n },\n style: {\n visible: barVisible,\n fill: barColor,\n fillOpacity: barColorOpacity,\n cornerRadius: barRadius,\n innerBorder: {\n stroke: barBorderColor,\n lineWidth: barBorderWidth,\n distance: (barBorderWidth || 0) / 2,\n lineDash: lineDash,\n },\n },\n },\n }\n }, {})\n\n result.bar!.state = {\n ...result.bar!.state,\n ...customMap,\n }\n\n return result\n}\n"],"names":["barStyle","spec","context","advancedVSeed","markStyle","dataset","showStroke","result","isNullish","isEmpty","barStyles","Array","customMap","style","index","barBorderColor","barBorderStyle","barBorderWidth","barColor","barColorOpacity","barRadius","barVisible","lineDash","datum","selector"],"mappings":";;AAKO,MAAMA,oBAAqB,CAACC,MAAMC;IACvC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,UAAU,EAAE,EAAE,GAAGF;IACpC,MAAM,EAAEH,QAAQ,EAAE,GAAGI;IAErB,MAAME,aAAaD,QAAQ,MAAM,IAAI;IAErC,MAAME,SAAS;QACb,GAAGN,IAAI;QACP,KAAK;YACH,OAAO;gBACL,SAAS;gBACT,aAAa;gBACb,WAAWK,aAAa,IAAI;YAC9B;YACA,OAAO;gBACL,OAAO;oBACL,aAAa;gBACf;YACF;QACF;IACF;IAEA,IAAIE,UAAUR,aAAaS,QAAQT,WACjC,OAAOO;IAGT,MAAMG,YAAaC,MAAM,OAAO,CAACX,YAAYA,WAAW;QAACA;KAAS;IAElE,MAAMY,YAAYF,UAAU,MAAM,CAAS,CAACH,QAAQM,OAAOC;QACzD,MAAM,EACJC,cAAc,EACdC,cAAc,EACdC,iBAAiB,CAAC,EAClBC,QAAQ,EACRC,eAAe,EACfC,SAAS,EACTC,aAAa,IAAI,EAClB,GAAGR;QAEJ,MAAMS,WAAWN,AAAmB,aAAnBA,iBAA8B;YAAC;YAAG;SAAE,GAAGA,AAAmB,aAAnBA,iBAA8B;YAAC;YAAG;SAAE,GAAG;YAAC;YAAG;SAAE;QACrG,OAAO;YACL,GAAGT,MAAM;YACT,CAAC,CAAC,MAAM,EAAEO,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACS;oBACP,IAAIC,SAASD,OAAOV,MAAM,QAAQ,GAChC,OAAO;oBAET,OAAO;gBACT;gBACA,OAAO;oBACL,SAASQ;oBACT,MAAMH;oBACN,aAAaC;oBACb,cAAcC;oBACd,aAAa;wBACX,QAAQL;wBACR,WAAWE;wBACX,UAAWA,AAAAA,CAAAA,kBAAkB,KAAK;wBAClC,UAAUK;oBACZ;gBACF;YACF;QACF;IACF,GAAG,CAAC;IAEJf,OAAO,GAAG,CAAE,KAAK,GAAG;QAClB,GAAGA,OAAO,GAAG,CAAE,KAAK;QACpB,GAAGK,SAAS;IACd;IAEA,OAAOL;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/barStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/barStyle.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BarStyle, Datum, SpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const barStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, dataset = [] } = advancedVSeed\n const { barStyle } = markStyle\n\n const showStroke = dataset.length <= 100\n\n const result = {\n ...spec,\n bar: {\n style: {\n visible: true,\n fillOpacity: 1,\n lineWidth: showStroke ? 1 : 0,\n },\n state: {\n hover: {\n fillOpacity: 0.6,\n },\n },\n },\n } as IBarChartSpec\n\n if (isNullish(barStyle) || isEmpty(barStyle)) {\n return result\n }\n\n const barStyles = (Array.isArray(barStyle) ? barStyle : [barStyle]) as BarStyle[]\n\n const customMap = barStyles.reduce<object>((result, style, index) => {\n const {\n barBorderColor,\n barBorderStyle,\n barBorderWidth = 1,\n barColor,\n barColorOpacity,\n barBorderOpacity,\n barRadius,\n barVisible = true,\n } = style\n\n const lineDash = barBorderStyle === 'dashed' ? [5, 2] : barBorderStyle === 'dotted' ? [2, 5] : [0, 0]\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n if (selector(datum, style.selector)) {\n return true\n }\n return false\n },\n style: {\n visible: barVisible,\n fill: barColor,\n fillOpacity: barColorOpacity,\n cornerRadius: barRadius,\n lineWidth: barBorderWidth,\n stroke: barBorderColor,\n strokeOpacity: barBorderOpacity,\n lineDash: lineDash,\n },\n },\n }\n }, {})\n\n result.bar!.state = {\n ...result.bar!.state,\n ...customMap,\n }\n\n return result\n}\n"],"names":["barStyle","spec","context","advancedVSeed","markStyle","dataset","showStroke","result","isNullish","isEmpty","barStyles","Array","customMap","style","index","barBorderColor","barBorderStyle","barBorderWidth","barColor","barColorOpacity","barBorderOpacity","barRadius","barVisible","lineDash","datum","selector"],"mappings":";;AAKO,MAAMA,oBAAqB,CAACC,MAAMC;IACvC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,UAAU,EAAE,EAAE,GAAGF;IACpC,MAAM,EAAEH,QAAQ,EAAE,GAAGI;IAErB,MAAME,aAAaD,QAAQ,MAAM,IAAI;IAErC,MAAME,SAAS;QACb,GAAGN,IAAI;QACP,KAAK;YACH,OAAO;gBACL,SAAS;gBACT,aAAa;gBACb,WAAWK,aAAa,IAAI;YAC9B;YACA,OAAO;gBACL,OAAO;oBACL,aAAa;gBACf;YACF;QACF;IACF;IAEA,IAAIE,UAAUR,aAAaS,QAAQT,WACjC,OAAOO;IAGT,MAAMG,YAAaC,MAAM,OAAO,CAACX,YAAYA,WAAW;QAACA;KAAS;IAElE,MAAMY,YAAYF,UAAU,MAAM,CAAS,CAACH,QAAQM,OAAOC;QACzD,MAAM,EACJC,cAAc,EACdC,cAAc,EACdC,iBAAiB,CAAC,EAClBC,QAAQ,EACRC,eAAe,EACfC,gBAAgB,EAChBC,SAAS,EACTC,aAAa,IAAI,EAClB,GAAGT;QAEJ,MAAMU,WAAWP,AAAmB,aAAnBA,iBAA8B;YAAC;YAAG;SAAE,GAAGA,AAAmB,aAAnBA,iBAA8B;YAAC;YAAG;SAAE,GAAG;YAAC;YAAG;SAAE;QACrG,OAAO;YACL,GAAGT,MAAM;YACT,CAAC,CAAC,MAAM,EAAEO,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACU;oBACP,IAAIC,SAASD,OAAOX,MAAM,QAAQ,GAChC,OAAO;oBAET,OAAO;gBACT;gBACA,OAAO;oBACL,SAASS;oBACT,MAAMJ;oBACN,aAAaC;oBACb,cAAcE;oBACd,WAAWJ;oBACX,QAAQF;oBACR,eAAeK;oBACf,UAAUG;gBACZ;YACF;QACF;IACF,GAAG,CAAC;IAEJhB,OAAO,GAAG,CAAE,KAAK,GAAG;QAClB,GAAGA,OAAO,GAAG,CAAE,KAAK;QACpB,GAAGK,SAAS;IACd;IAEA,OAAOL;AACT"}
@@ -1,11 +1,28 @@
1
+ import { BAND_AXIS_INNER_OFFSET_IN_PIVOT } from "../../../../utils/constant.js";
1
2
  const pivotAxisStyle = (axisStyle)=>(spec, context)=>{
2
3
  const result = axisStyle(spec, context);
3
- if (result.axes) result.axes.forEach((axis)=>{
4
- axis.domainLine = {
5
- visible: false
6
- };
7
- if (axis.grid && axis.grid.visible && axis.grid.style) axis.grid.style.strokeOpacity = 0.3;
8
- });
4
+ if (result.axes) {
5
+ const { advancedVSeed } = context;
6
+ const { config, chartType } = advancedVSeed;
7
+ const themConfig = config?.[chartType]?.pivotGrid ?? {};
8
+ result.axes.forEach((axis)=>{
9
+ axis.domainLine = {
10
+ visible: false
11
+ };
12
+ if (themConfig.chartGridColor && axis.grid && axis.grid.visible && axis.grid.style) axis.grid.style.stroke = themConfig.chartGridColor;
13
+ if (themConfig.axisLabelColor && axis.label && axis.label.visible && axis.label.style) axis.label.style.fill = themConfig.axisLabelColor;
14
+ if ('band' === axis.type) {
15
+ if ('left' === axis.orient || 'right' === axis.orient) axis.innerOffset = {
16
+ top: BAND_AXIS_INNER_OFFSET_IN_PIVOT,
17
+ bottom: BAND_AXIS_INNER_OFFSET_IN_PIVOT
18
+ };
19
+ else if ('top' === axis.orient || 'bottom' === axis.orient) axis.innerOffset = {
20
+ left: BAND_AXIS_INNER_OFFSET_IN_PIVOT,
21
+ right: BAND_AXIS_INNER_OFFSET_IN_PIVOT
22
+ };
23
+ }
24
+ });
25
+ }
9
26
  return result;
10
27
  };
11
28
  export { pivotAxisStyle };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const pivotAxisStyle = (axisStyle: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = axisStyle(spec, context) as ILineChartSpec\n\n if (result.axes) {\n result.axes.forEach((axis: any) => {\n axis.domainLine = {\n visible: false,\n }\n\n if (axis.grid && axis.grid.visible && axis.grid.style) {\n axis.grid.style.strokeOpacity = 0.3\n }\n })\n }\n\n return result\n }\n}\n"],"names":["pivotAxisStyle","axisStyle","spec","context","result","axis"],"mappings":"AAGO,MAAMA,iBAAiB,CAACC,YACtB,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,IAAIC,OAAO,IAAI,EACbA,OAAO,IAAI,CAAC,OAAO,CAAC,CAACC;YACnBA,KAAK,UAAU,GAAG;gBAChB,SAAS;YACX;YAEA,IAAIA,KAAK,IAAI,IAAIA,KAAK,IAAI,CAAC,OAAO,IAAIA,KAAK,IAAI,CAAC,KAAK,EACnDA,KAAK,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG;QAEpC;QAGF,OAAOD;IACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { BAND_AXIS_INNER_OFFSET_IN_PIVOT } from 'src/pipeline/utils/constant'\nimport type { Config, SpecPipe } from 'src/types'\n\nexport const pivotAxisStyle = (axisStyle: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = axisStyle(spec, context) as ILineChartSpec\n\n if (result.axes) {\n const { advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = (config?.[chartType] as Config['line'])?.pivotGrid ?? {}\n\n result.axes.forEach((axis: any) => {\n axis.domainLine = {\n visible: false,\n }\n\n if (themConfig.chartGridColor && axis.grid && axis.grid.visible && axis.grid.style) {\n axis.grid.style.stroke = themConfig.chartGridColor\n }\n\n if (themConfig.axisLabelColor && axis.label && axis.label.visible && axis.label.style) {\n axis.label.style.fill = themConfig.axisLabelColor\n }\n\n if (axis.type === 'band') {\n if (axis.orient === 'left' || axis.orient === 'right') {\n axis.innerOffset = {\n top: BAND_AXIS_INNER_OFFSET_IN_PIVOT,\n bottom: BAND_AXIS_INNER_OFFSET_IN_PIVOT,\n }\n } else if (axis.orient === 'top' || axis.orient === 'bottom') {\n axis.innerOffset = {\n left: BAND_AXIS_INNER_OFFSET_IN_PIVOT,\n right: BAND_AXIS_INNER_OFFSET_IN_PIVOT,\n }\n }\n }\n })\n }\n\n return result\n }\n}\n"],"names":["pivotAxisStyle","axisStyle","spec","context","result","advancedVSeed","config","chartType","themConfig","axis","BAND_AXIS_INNER_OFFSET_IN_PIVOT"],"mappings":";AAIO,MAAMA,iBAAiB,CAACC,YACtB,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,IAAIC,OAAO,IAAI,EAAE;YACf,MAAM,EAAEC,aAAa,EAAE,GAAGF;YAC1B,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;YAC9B,MAAMG,aAAcF,QAAQ,CAACC,UAAU,EAAqB,aAAa,CAAC;YAE1EH,OAAO,IAAI,CAAC,OAAO,CAAC,CAACK;gBACnBA,KAAK,UAAU,GAAG;oBAChB,SAAS;gBACX;gBAEA,IAAID,WAAW,cAAc,IAAIC,KAAK,IAAI,IAAIA,KAAK,IAAI,CAAC,OAAO,IAAIA,KAAK,IAAI,CAAC,KAAK,EAChFA,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,GAAGD,WAAW,cAAc;gBAGpD,IAAIA,WAAW,cAAc,IAAIC,KAAK,KAAK,IAAIA,KAAK,KAAK,CAAC,OAAO,IAAIA,KAAK,KAAK,CAAC,KAAK,EACnFA,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,GAAGD,WAAW,cAAc;gBAGnD,IAAIC,AAAc,WAAdA,KAAK,IAAI,EACX;oBAAA,IAAIA,AAAgB,WAAhBA,KAAK,MAAM,IAAeA,AAAgB,YAAhBA,KAAK,MAAM,EACvCA,KAAK,WAAW,GAAG;wBACjB,KAAKC;wBACL,QAAQA;oBACV;yBACK,IAAID,AAAgB,UAAhBA,KAAK,MAAM,IAAcA,AAAgB,aAAhBA,KAAK,MAAM,EAC7CA,KAAK,WAAW,GAAG;wBACjB,MAAMC;wBACN,OAAOA;oBACT;gBACF;YAEJ;QACF;QAEA,OAAON;IACT"}
@@ -2,14 +2,13 @@ import { isCombination, isPivot } from "../../../../utils/index.js";
2
2
  import { isNullish } from "remeda";
3
3
  const pivotGridStyle = (spec, context)=>{
4
4
  const { vseed, advancedVSeed } = context;
5
- const { config, chartType, dimensions } = advancedVSeed;
5
+ const { config, chartType } = advancedVSeed;
6
6
  const themConfig = config?.[chartType]?.pivotGrid ?? {};
7
7
  const onlyCombination = !isPivot(vseed) && isCombination(vseed);
8
8
  const result = {
9
9
  ...spec
10
10
  };
11
11
  const transparent = 'rgba(0,0,0,0)';
12
- const hasColumnDimension = dimensions.some((dim)=>'column' === dim.encoding);
13
12
  const borderColor = themConfig.borderColor ?? '#e3e5eb';
14
13
  const bodyFontColor = themConfig.bodyFontColor ?? '#141414';
15
14
  const headerFontColor = themConfig.headerFontColor ?? '#21252c';
@@ -27,12 +26,15 @@ const pivotGridStyle = (spec, context)=>{
27
26
  bodyStyle: {
28
27
  borderColor,
29
28
  color: bodyFontColor,
30
- borderLineWidth: (arg)=>[
29
+ borderLineWidth: (arg)=>{
30
+ const noYAxis = 'pie' === chartType || 'rose' === chartType || 'donut' === chartType || 'funnel' === chartType || 'radar' === chartType || 'roseParallel' === chartType;
31
+ return [
31
32
  0 === arg.row ? outlineBorderLineWidth : 1,
32
33
  outlineBorderLineWidth,
33
34
  0,
34
- 0 === arg.col ? outlineBorderLineWidth : 1
35
- ],
35
+ 0 === arg.col || noYAxis && 1 === arg.col ? outlineBorderLineWidth : 1
36
+ ];
37
+ },
36
38
  bgColor: transparent,
37
39
  hover: {
38
40
  cellBgColor: 'transparent'
@@ -62,7 +64,7 @@ const pivotGridStyle = (spec, context)=>{
62
64
  color: headerFontColor,
63
65
  padding: [
64
66
  0,
65
- 4,
67
+ 12,
66
68
  0,
67
69
  4
68
70
  ],
@@ -86,7 +88,7 @@ const pivotGridStyle = (spec, context)=>{
86
88
  color: headerFontColor,
87
89
  padding: [
88
90
  0,
89
- 4,
91
+ 12,
90
92
  0,
91
93
  4
92
94
  ],
@@ -107,23 +109,6 @@ const pivotGridStyle = (spec, context)=>{
107
109
  inlineColumnBgColor: hoverHeaderInlineBackgroundColor || void 0
108
110
  }
109
111
  },
110
- cornerRightTopCellStyle: {
111
- borderColor,
112
- borderLineWidth: 0,
113
- frameStyle: {
114
- borderColor,
115
- borderLineWidth: [
116
- outlineBorderLineWidth,
117
- outlineBorderLineWidth,
118
- 1,
119
- 1
120
- ]
121
- },
122
- bgColor: headerBackgroundColor,
123
- hover: {
124
- cellBgColor: hoverHeaderBackgroundColor
125
- }
126
- },
127
112
  cornerLeftBottomCellStyle: {
128
113
  borderColor,
129
114
  borderLineWidth: [
@@ -146,24 +131,19 @@ const pivotGridStyle = (spec, context)=>{
146
131
  cellBgColor: hoverHeaderBackgroundColor
147
132
  }
148
133
  },
149
- cornerRightBottomCellStyle: {
134
+ cornerRightTopCellStyle: {
150
135
  borderColor,
151
- bgColor: headerBackgroundColor,
152
136
  borderLineWidth: [
153
- 1,
154
137
  outlineBorderLineWidth,
155
138
  outlineBorderLineWidth,
139
+ 1,
156
140
  1
157
141
  ],
158
142
  frameStyle: {
159
143
  borderColor,
160
- borderLineWidth: [
161
- 1,
162
- outlineBorderLineWidth,
163
- outlineBorderLineWidth,
164
- 1
165
- ]
144
+ borderLineWidth: 0
166
145
  },
146
+ bgColor: headerBackgroundColor,
167
147
  hover: {
168
148
  cellBgColor: hoverHeaderBackgroundColor
169
149
  }
@@ -172,16 +152,41 @@ const pivotGridStyle = (spec, context)=>{
172
152
  borderColor,
173
153
  bgColor: headerBackgroundColor,
174
154
  borderLineWidth: (arg)=>[
175
- 0 === arg.row || hasColumnDimension && 1 === arg.row ? outlineBorderLineWidth : 1,
155
+ 0 === arg.row ? outlineBorderLineWidth : 1,
176
156
  outlineBorderLineWidth,
177
157
  0,
178
158
  1
179
159
  ],
160
+ frameStyle: {
161
+ borderLineWidth: 0
162
+ },
180
163
  hover: {
181
164
  borderLineWidth: 0,
182
165
  cellBgColor: hoverHeaderBackgroundColor
183
166
  }
184
167
  },
168
+ cornerRightBottomCellStyle: {
169
+ borderColor,
170
+ bgColor: headerBackgroundColor,
171
+ borderLineWidth: [
172
+ 1,
173
+ outlineBorderLineWidth,
174
+ outlineBorderLineWidth,
175
+ 1
176
+ ],
177
+ frameStyle: {
178
+ borderColor,
179
+ borderLineWidth: [
180
+ 1,
181
+ outlineBorderLineWidth,
182
+ outlineBorderLineWidth,
183
+ 1
184
+ ]
185
+ },
186
+ hover: {
187
+ cellBgColor: hoverHeaderBackgroundColor
188
+ }
189
+ },
185
190
  bottomFrozenStyle: {
186
191
  borderColor,
187
192
  borderLineWidth: [