@visactor/vseed 0.1.43 → 0.1.45

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 (474) 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/buildSpec.js.map +1 -1
  4. package/dist/esm/builder/builder/builder.d.ts +4620 -0
  5. package/dist/esm/dataSelector/selector.d.ts +1 -1
  6. package/dist/esm/dataSelector/selector.js +1 -2
  7. package/dist/esm/dataSelector/selector.js.map +1 -1
  8. package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +2 -0
  9. package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
  10. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.d.ts +1 -0
  11. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +35 -2
  12. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
  13. package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js +1 -1
  14. package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -1
  15. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +22 -2
  16. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
  17. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +22 -3
  18. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -1
  19. package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js +3 -2
  20. package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js.map +1 -1
  21. package/dist/esm/pipeline/advanced/table/pipeline/table.js +2 -1
  22. package/dist/esm/pipeline/advanced/table/pipeline/table.js.map +1 -1
  23. package/dist/esm/pipeline/advanced/table/pipes/{default/defaultMeasureName.d.ts → cellStyle/cellStyle.d.ts} +1 -1
  24. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js +16 -0
  25. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js.map +1 -0
  26. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/index.d.ts +1 -0
  27. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/index.js +2 -0
  28. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.d.ts +2 -0
  29. package/dist/esm/pipeline/advanced/table/pipes/default/{defaultMeasureName.js → defaultMeasureId.js} +5 -5
  30. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.js.map +1 -0
  31. package/dist/esm/pipeline/advanced/table/pipes/default/index.d.ts +1 -1
  32. package/dist/esm/pipeline/advanced/table/pipes/default/index.js +2 -2
  33. package/dist/esm/pipeline/advanced/table/pipes/index.d.ts +1 -0
  34. package/dist/esm/pipeline/advanced/table/pipes/index.js +1 -0
  35. package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
  36. package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
  37. package/dist/esm/pipeline/spec/chart/pipeline/bar.d.ts +1 -2
  38. package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
  39. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.d.ts +1 -2
  40. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
  41. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.d.ts +1 -2
  42. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
  43. package/dist/esm/pipeline/spec/chart/pipeline/boxplot.d.ts +1 -2
  44. package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -1
  45. package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
  46. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.d.ts +1 -2
  47. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
  48. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.d.ts +1 -2
  49. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
  50. package/dist/esm/pipeline/spec/chart/pipeline/donut.d.ts +1 -2
  51. package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
  52. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.d.ts +1 -2
  53. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
  54. package/dist/esm/pipeline/spec/chart/pipeline/funnel.d.ts +1 -2
  55. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
  56. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.d.ts +1 -2
  57. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
  58. package/dist/esm/pipeline/spec/chart/pipeline/histogram.d.ts +1 -2
  59. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
  60. package/dist/esm/pipeline/spec/chart/pipeline/line.d.ts +1 -2
  61. package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
  62. package/dist/esm/pipeline/spec/chart/pipeline/pie.d.ts +1 -2
  63. package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
  64. package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
  65. package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
  66. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.d.ts +1 -2
  67. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
  68. package/dist/esm/pipeline/spec/chart/pipeline/scatter.d.ts +1 -2
  69. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
  70. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.d.ts +2 -2
  71. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js +16 -13
  72. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js.map +1 -1
  73. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.d.ts +2 -2
  74. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js +14 -19
  75. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
  76. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.d.ts +2 -2
  77. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +6 -2
  78. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
  79. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.d.ts +2 -2
  80. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js +2 -0
  81. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
  82. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.d.ts +2 -2
  83. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +5 -1
  84. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
  85. package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.d.ts +2 -2
  86. package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js +26 -10
  87. package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js.map +1 -1
  88. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.d.ts +34 -0
  89. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js +35 -1
  90. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
  91. package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.d.ts +2 -2
  92. package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.js.map +1 -1
  93. package/dist/esm/pipeline/spec/chart/pipes/axes/radarRadius.d.ts +2 -2
  94. package/dist/esm/pipeline/spec/chart/pipes/axes/radarRadius.js.map +1 -1
  95. package/dist/esm/pipeline/spec/chart/pipes/axes/radius.d.ts +2 -2
  96. package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js.map +1 -1
  97. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.d.ts +2 -2
  98. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +2 -1
  99. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
  100. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.d.ts +2 -2
  101. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js +2 -1
  102. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
  103. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.d.ts +2 -2
  104. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +2 -1
  105. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
  106. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.d.ts +2 -2
  107. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js +2 -1
  108. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
  109. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.d.ts +2 -2
  110. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js +2 -1
  111. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js.map +1 -1
  112. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.d.ts +2 -2
  113. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js +2 -1
  114. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js.map +1 -1
  115. package/dist/esm/pipeline/spec/chart/pipes/backgroundColor/background.d.ts +2 -2
  116. package/dist/esm/pipeline/spec/chart/pipes/backgroundColor/background.js.map +1 -1
  117. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.d.ts +2 -2
  118. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.js.map +1 -1
  119. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.d.ts +2 -2
  120. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.js.map +1 -1
  121. package/dist/esm/pipeline/spec/chart/pipes/color/color.d.ts +2 -2
  122. package/dist/esm/pipeline/spec/chart/pipes/color/color.js.map +1 -1
  123. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.d.ts +3 -2
  124. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js +3 -1
  125. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js.map +1 -1
  126. package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.d.ts +2 -2
  127. package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js.map +1 -1
  128. package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.d.ts +2 -2
  129. package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js.map +1 -1
  130. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.d.ts +2 -2
  131. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js.map +1 -1
  132. package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.d.ts +2 -2
  133. package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js.map +1 -1
  134. package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.d.ts +2 -2
  135. package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js.map +1 -1
  136. package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.d.ts +2 -2
  137. package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js.map +1 -1
  138. package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.d.ts +2 -2
  139. package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js.map +1 -1
  140. package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.d.ts +2 -2
  141. package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js.map +1 -1
  142. package/dist/esm/pipeline/spec/chart/pipes/color/linearColor.d.ts +2 -2
  143. package/dist/esm/pipeline/spec/chart/pipes/color/linearColor.js.map +1 -1
  144. package/dist/esm/pipeline/spec/chart/pipes/color/linearColorForDualAxis.d.ts +2 -2
  145. package/dist/esm/pipeline/spec/chart/pipes/color/linearColorForDualAxis.js.map +1 -1
  146. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.d.ts +2 -2
  147. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.js.map +1 -1
  148. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.d.ts +2 -2
  149. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js.map +1 -1
  150. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.d.ts +2 -2
  151. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.js.map +1 -1
  152. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.d.ts +2 -2
  153. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js.map +1 -1
  154. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.d.ts +2 -2
  155. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js.map +1 -1
  156. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetDualAxis.d.ts +3 -3
  157. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetDualAxis.js.map +1 -1
  158. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.d.ts +2 -2
  159. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js.map +1 -1
  160. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetPivot.d.ts +2 -2
  161. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetPivot.js.map +1 -1
  162. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetScatter.d.ts +2 -2
  163. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetScatter.js.map +1 -1
  164. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetXY.d.ts +2 -2
  165. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetXY.js.map +1 -1
  166. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetYX.d.ts +2 -2
  167. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetYX.js.map +1 -1
  168. package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.d.ts +2 -2
  169. package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js.map +1 -1
  170. package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.d.ts +3 -3
  171. package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.js.map +1 -1
  172. package/dist/esm/pipeline/spec/chart/pipes/init/area.d.ts +2 -2
  173. package/dist/esm/pipeline/spec/chart/pipes/init/area.js.map +1 -1
  174. package/dist/esm/pipeline/spec/chart/pipes/init/bar.d.ts +2 -2
  175. package/dist/esm/pipeline/spec/chart/pipes/init/bar.js.map +1 -1
  176. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.d.ts +2 -2
  177. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js.map +1 -1
  178. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.d.ts +2 -2
  179. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -1
  180. package/dist/esm/pipeline/spec/chart/pipes/init/column.d.ts +2 -2
  181. package/dist/esm/pipeline/spec/chart/pipes/init/column.js.map +1 -1
  182. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.d.ts +2 -2
  183. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js.map +1 -1
  184. package/dist/esm/pipeline/spec/chart/pipes/init/donut.d.ts +2 -2
  185. package/dist/esm/pipeline/spec/chart/pipes/init/donut.js.map +1 -1
  186. package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.d.ts +3 -3
  187. package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js.map +1 -1
  188. package/dist/esm/pipeline/spec/chart/pipes/init/funnel.d.ts +2 -2
  189. package/dist/esm/pipeline/spec/chart/pipes/init/funnel.js.map +1 -1
  190. package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.d.ts +2 -2
  191. package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.js.map +1 -1
  192. package/dist/esm/pipeline/spec/chart/pipes/init/histogram.d.ts +2 -2
  193. package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js +4 -0
  194. package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js.map +1 -1
  195. package/dist/esm/pipeline/spec/chart/pipes/init/line.d.ts +2 -2
  196. package/dist/esm/pipeline/spec/chart/pipes/init/line.js.map +1 -1
  197. package/dist/esm/pipeline/spec/chart/pipes/init/pie.d.ts +2 -2
  198. package/dist/esm/pipeline/spec/chart/pipes/init/pie.js.map +1 -1
  199. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.d.ts +2 -2
  200. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
  201. package/dist/esm/pipeline/spec/chart/pipes/init/radar.d.ts +2 -2
  202. package/dist/esm/pipeline/spec/chart/pipes/init/radar.js.map +1 -1
  203. package/dist/esm/pipeline/spec/chart/pipes/init/rose.d.ts +2 -2
  204. package/dist/esm/pipeline/spec/chart/pipes/init/rose.js.map +1 -1
  205. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.d.ts +2 -2
  206. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js.map +1 -1
  207. package/dist/esm/pipeline/spec/chart/pipes/init/scatter.d.ts +2 -2
  208. package/dist/esm/pipeline/spec/chart/pipes/init/scatter.js.map +1 -1
  209. package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +2 -2
  210. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +2 -1
  211. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  212. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.d.ts +3 -3
  213. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
  214. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.d.ts +2 -2
  215. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -1
  216. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.d.ts +2 -2
  217. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
  218. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.d.ts +2 -2
  219. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js +7 -0
  220. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js.map +1 -1
  221. package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.d.ts +2 -2
  222. package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js +19 -3
  223. package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js.map +1 -1
  224. package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.d.ts +2 -2
  225. package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.js.map +1 -1
  226. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.d.ts +2 -2
  227. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
  228. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.d.ts +2 -2
  229. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js +1 -0
  230. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
  231. package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.d.ts +2 -2
  232. package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js.map +1 -1
  233. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.d.ts +2 -2
  234. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js +5 -7
  235. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js.map +1 -1
  236. package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.d.ts +2 -2
  237. package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.js.map +1 -1
  238. package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelStyle.d.ts +2 -2
  239. package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelStyle.js.map +1 -1
  240. package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.d.ts +2 -2
  241. package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.js.map +1 -1
  242. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.d.ts +2 -2
  243. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js.map +1 -1
  244. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pieStyle.d.ts +2 -2
  245. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pieStyle.js.map +1 -1
  246. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.d.ts +3 -3
  247. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.js.map +1 -1
  248. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.d.ts +2 -2
  249. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.js.map +1 -1
  250. package/dist/esm/pipeline/spec/chart/pipes/markStyle/roseStyle.d.ts +2 -2
  251. package/dist/esm/pipeline/spec/chart/pipes/markStyle/roseStyle.js.map +1 -1
  252. package/dist/esm/pipeline/spec/chart/pipes/percent/percent.d.ts +2 -2
  253. package/dist/esm/pipeline/spec/chart/pipes/percent/percent.js.map +1 -1
  254. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.d.ts +2 -2
  255. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.js +4 -1
  256. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.js.map +1 -1
  257. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.d.ts +2 -2
  258. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js +23 -6
  259. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
  260. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.d.ts +2 -2
  261. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
  262. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.d.ts +2 -2
  263. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +39 -34
  264. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  265. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.d.ts +2 -2
  266. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js.map +1 -1
  267. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.d.ts +4 -4
  268. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js +10 -3
  269. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
  270. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.d.ts +2 -2
  271. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js.map +1 -1
  272. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotTitle.d.ts +2 -2
  273. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotTitle.js.map +1 -1
  274. package/dist/esm/pipeline/spec/chart/pipes/region/addRegionPadding.d.ts +2 -2
  275. package/dist/esm/pipeline/spec/chart/pipes/region/addRegionPadding.js.map +1 -1
  276. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.d.ts +2 -2
  277. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js.map +1 -1
  278. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.d.ts +2 -2
  279. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +2 -2
  280. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
  281. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.d.ts +2 -2
  282. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +2 -2
  283. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
  284. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.d.ts +6 -6
  285. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js.map +1 -1
  286. package/dist/esm/pipeline/spec/chart/pipes/series/series.d.ts +3 -3
  287. package/dist/esm/pipeline/spec/chart/pipes/series/series.js.map +1 -1
  288. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.d.ts +2 -2
  289. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js.map +1 -1
  290. package/dist/esm/pipeline/spec/chart/pipes/stack/stack.d.ts +2 -2
  291. package/dist/esm/pipeline/spec/chart/pipes/stack/stack.js.map +1 -1
  292. package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.d.ts +2 -2
  293. package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
  294. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.d.ts +2 -2
  295. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +4 -2
  296. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
  297. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.d.ts +2 -2
  298. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +2 -0
  299. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
  300. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.d.ts +3 -3
  301. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +2 -0
  302. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
  303. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.d.ts +2 -2
  304. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js +2 -0
  305. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js.map +1 -1
  306. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.d.ts +2 -2
  307. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +2 -0
  308. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -1
  309. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.d.ts +2 -2
  310. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js +2 -0
  311. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
  312. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.d.ts +3 -0
  313. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js +31 -0
  314. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js.map +1 -0
  315. package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js +3 -2
  316. package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js.map +1 -1
  317. package/dist/esm/pipeline/spec/table/pipeline/table.js +3 -2
  318. package/dist/esm/pipeline/spec/table/pipeline/table.js.map +1 -1
  319. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.d.ts +2 -0
  320. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js +14 -0
  321. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js.map +1 -0
  322. package/dist/esm/pipeline/spec/table/pipes/cellStyle/index.d.ts +2 -0
  323. package/dist/esm/pipeline/spec/table/pipes/cellStyle/index.js +2 -0
  324. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.d.ts +2 -0
  325. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js +49 -0
  326. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -0
  327. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.d.ts +2 -0
  328. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js +41 -0
  329. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -0
  330. package/dist/esm/pipeline/spec/table/pipes/columns/dimensionsToColumns.d.ts +2 -2
  331. package/dist/esm/pipeline/spec/table/pipes/columns/dimensionsToColumns.js.map +1 -1
  332. package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.d.ts +2 -2
  333. package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.js.map +1 -1
  334. package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.d.ts +2 -2
  335. package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.js.map +1 -1
  336. package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.d.ts +2 -2
  337. package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.js.map +1 -1
  338. package/dist/esm/pipeline/spec/table/pipes/index.d.ts +1 -0
  339. package/dist/esm/pipeline/spec/table/pipes/index.js +1 -0
  340. package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.d.ts +2 -2
  341. package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js.map +1 -1
  342. package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.d.ts +2 -2
  343. package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js.map +1 -1
  344. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.d.ts +2 -2
  345. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js.map +1 -1
  346. package/dist/esm/pipeline/spec/table/pipes/init/table.d.ts +2 -2
  347. package/dist/esm/pipeline/spec/table/pipes/init/table.js.map +1 -1
  348. package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.d.ts +2 -2
  349. package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js +13 -3
  350. package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js.map +1 -1
  351. package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.d.ts +2 -2
  352. package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js.map +1 -1
  353. package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.d.ts +2 -2
  354. package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js.map +1 -1
  355. package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.d.ts +2 -2
  356. package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js.map +1 -1
  357. package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.d.ts +2 -2
  358. package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js.map +1 -1
  359. package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.d.ts +2 -2
  360. package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js.map +1 -1
  361. package/dist/esm/pipeline/spec/table/pipes/theme/scrollStyle.d.ts +2 -2
  362. package/dist/esm/pipeline/spec/table/pipes/theme/scrollStyle.js.map +1 -1
  363. package/dist/esm/pipeline/spec/table/pipes/theme/selectionStyle.d.ts +2 -2
  364. package/dist/esm/pipeline/spec/table/pipes/theme/selectionStyle.js.map +1 -1
  365. package/dist/esm/pipeline/utils/constant.d.ts +3 -1
  366. package/dist/esm/pipeline/utils/constant.js +4 -2
  367. package/dist/esm/pipeline/utils/constant.js.map +1 -1
  368. package/dist/esm/pipeline/utils/measures/depth.js.map +1 -1
  369. package/dist/esm/pipeline/utils/measures/find.js.map +1 -1
  370. package/dist/esm/pipeline/utils/tree/traverse.d.ts +1 -11
  371. package/dist/esm/pipeline/utils/tree/traverse.js +3 -4
  372. package/dist/esm/pipeline/utils/tree/traverse.js.map +1 -1
  373. package/dist/esm/theme/common/annotaion.js +7 -7
  374. package/dist/esm/theme/common/annotaion.js.map +1 -1
  375. package/dist/esm/theme/common/axes.js +18 -18
  376. package/dist/esm/theme/common/axes.js.map +1 -1
  377. package/dist/esm/theme/common/legend.d.ts +2 -0
  378. package/dist/esm/theme/common/legend.js +13 -2
  379. package/dist/esm/theme/common/legend.js.map +1 -1
  380. package/dist/esm/theme/common/table.d.ts +30 -22
  381. package/dist/esm/theme/common/table.js +10 -2
  382. package/dist/esm/theme/common/table.js.map +1 -1
  383. package/dist/esm/theme/common/tooltip.d.ts +3 -2
  384. package/dist/esm/theme/common/tooltip.js +24 -2
  385. package/dist/esm/theme/common/tooltip.js.map +1 -1
  386. package/dist/esm/theme/dark/dark.js +4 -4
  387. package/dist/esm/theme/dark/dark.js.map +1 -1
  388. package/dist/esm/theme/light/light.js +4 -4
  389. package/dist/esm/theme/light/light.js.map +1 -1
  390. package/dist/esm/types/advancedVSeed.d.ts +3522 -0
  391. package/dist/esm/types/advancedVSeed.js +2 -0
  392. package/dist/esm/types/advancedVSeed.js.map +1 -1
  393. package/dist/esm/types/chartType/area/zArea.d.ts +82 -0
  394. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +82 -0
  395. package/dist/esm/types/chartType/bar/zBar.d.ts +82 -0
  396. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +82 -0
  397. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +82 -0
  398. package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +82 -0
  399. package/dist/esm/types/chartType/column/zColumn.d.ts +84 -0
  400. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +82 -0
  401. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +82 -0
  402. package/dist/esm/types/chartType/donut/zDonut.d.ts +82 -0
  403. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +82 -0
  404. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +80 -0
  405. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +80 -0
  406. package/dist/esm/types/chartType/histogram/histogram.d.ts +2 -2
  407. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +90 -4
  408. package/dist/esm/types/chartType/histogram/zHistogram.js +2 -2
  409. package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
  410. package/dist/esm/types/chartType/line/zLine.d.ts +82 -0
  411. package/dist/esm/types/chartType/pie/zPie.d.ts +82 -0
  412. package/dist/esm/types/chartType/pivotTable/pivotTable.d.ts +5 -1
  413. package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +76 -0
  414. package/dist/esm/types/chartType/pivotTable/zPivotTable.js +2 -1
  415. package/dist/esm/types/chartType/pivotTable/zPivotTable.js.map +1 -1
  416. package/dist/esm/types/chartType/radar/zRadar.d.ts +82 -0
  417. package/dist/esm/types/chartType/rose/zRose.d.ts +82 -0
  418. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +82 -0
  419. package/dist/esm/types/chartType/scatter/zScatter.d.ts +90 -0
  420. package/dist/esm/types/chartType/table/table.d.ts +5 -1
  421. package/dist/esm/types/chartType/table/zTable.d.ts +76 -0
  422. package/dist/esm/types/chartType/table/zTable.js +2 -1
  423. package/dist/esm/types/chartType/table/zTable.js.map +1 -1
  424. package/dist/esm/types/pipeline/spec/spec.d.ts +11 -2
  425. package/dist/esm/types/properties/cellStyle/bodyCellStyle.d.ts +138 -0
  426. package/dist/esm/types/properties/cellStyle/bodyCellStyle.js +16 -0
  427. package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -0
  428. package/dist/esm/types/properties/cellStyle/cellStyle.d.ts +80 -0
  429. package/dist/esm/types/properties/cellStyle/cellStyle.js +8 -0
  430. package/dist/esm/types/properties/cellStyle/cellStyle.js.map +1 -0
  431. package/dist/esm/types/properties/cellStyle/index.d.ts +1 -0
  432. package/dist/esm/types/properties/cellStyle/index.js +1 -0
  433. package/dist/esm/types/properties/config/area.d.ts +168 -0
  434. package/dist/esm/types/properties/config/bar.d.ts +252 -0
  435. package/dist/esm/types/properties/config/boxplot.d.ts +84 -0
  436. package/dist/esm/types/properties/config/column.d.ts +264 -0
  437. package/dist/esm/types/properties/config/config.d.ts +1716 -0
  438. package/dist/esm/types/properties/config/dualAxis.d.ts +84 -0
  439. package/dist/esm/types/properties/config/funnel.d.ts +84 -0
  440. package/dist/esm/types/properties/config/heatmap.d.ts +84 -0
  441. package/dist/esm/types/properties/config/histogram.d.ts +96 -0
  442. package/dist/esm/types/properties/config/label/label.d.ts +5 -0
  443. package/dist/esm/types/properties/config/label/zLabel.d.ts +69 -0
  444. package/dist/esm/types/properties/config/label/zLabel.js +6 -1
  445. package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
  446. package/dist/esm/types/properties/config/label/zPieLabel.d.ts +69 -0
  447. package/dist/esm/types/properties/config/legend/legend.d.ts +10 -0
  448. package/dist/esm/types/properties/config/legend/legend.js +2 -0
  449. package/dist/esm/types/properties/config/legend/legend.js.map +1 -1
  450. package/dist/esm/types/properties/config/line.d.ts +84 -0
  451. package/dist/esm/types/properties/config/pie.d.ts +252 -0
  452. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.d.ts +2 -0
  453. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js +3 -1
  454. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js.map +1 -1
  455. package/dist/esm/types/properties/config/rose.d.ts +168 -0
  456. package/dist/esm/types/properties/config/scatter.d.ts +96 -0
  457. package/dist/esm/types/properties/config/tooltip/tooltip.d.ts +12 -0
  458. package/dist/esm/types/properties/config/tooltip/tooltip.js +12 -1
  459. package/dist/esm/types/properties/config/tooltip/tooltip.js.map +1 -1
  460. package/dist/esm/types/properties/index.d.ts +1 -0
  461. package/dist/esm/types/properties/index.js +1 -0
  462. package/dist/esm/types/properties/markStyle/barStyle.d.ts +5 -0
  463. package/dist/esm/types/properties/markStyle/barStyle.js.map +1 -1
  464. package/dist/esm/types/properties/regressionLine/ecdfRegressionLine.d.ts +4 -0
  465. package/dist/esm/types/properties/regressionLine/kdeRegressionLine.d.ts +4 -0
  466. package/dist/esm/types/properties/regressionLine/zRegressionLine.d.ts +18 -0
  467. package/dist/esm/types/properties/regressionLine/zRegressionLine.js +1 -0
  468. package/dist/esm/types/properties/regressionLine/zRegressionLine.js.map +1 -1
  469. package/dist/esm/types/properties/theme/customTheme.d.ts +3432 -0
  470. package/dist/esm/types/zVseed.d.ts +1926 -124
  471. package/dist/umd/index.js +884 -439
  472. package/dist/umd/index.js.map +1 -1
  473. package/package.json +5 -5
  474. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureName.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ import { createFormatterByMeasure, findAllMeasures } from "../../../../utils/index.js";
1
2
  const colorLegend = (spec, context)=>{
2
3
  const result = {
3
4
  ...spec
@@ -64,6 +65,12 @@ const colorLegend = (spec, context)=>{
64
65
  }
65
66
  }
66
67
  };
68
+ const measures = findAllMeasures(advancedVSeed.measures);
69
+ const colorMeasure = measures.find((m)=>'color' === m.encoding);
70
+ if (colorMeasure) {
71
+ const formatter = createFormatterByMeasure(colorMeasure);
72
+ result.legends.handlerText.formatter = formatter;
73
+ }
67
74
  return result;
68
75
  };
69
76
  export { colorLegend };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/colorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/colorLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const colorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'color',\n visible: enable,\n orient,\n position: legendPosition,\n padding: 0,\n field: unfoldInfo.encodingColor,\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return result\n}\n"],"names":["colorLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition"],"mappings":"AAEO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,SAAS,EAAE,GAAGF;IAC1C,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAMG,aAAaJ,cAAc,MAAM,CAACE,UAAU;IAClD,IAAI,CAACE,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOL;IAGT,MAAM,EAAEM,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,MAAM,EAAEC,WAAW,QAAQ,EAAEC,cAAc,EAAEC,UAAU,EAAEC,gBAAgB,EAAE,EAAEC,eAAe,EAAE,GAAGN,UAAU,CAAC;IAEpH,MAAMO,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAENR,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACTM;QACA,UAAUC;QACV,SAAS;QACT,OAAOV,WAAW,aAAa;QAC/B,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMM,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAOZ;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/legend/colorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/colorLegend.ts"],"sourcesContent":["import { createFormatterByMeasure, findAllMeasures } from 'src/pipeline/utils'\nimport type { Legend, VChartSpecPipe } from 'src/types'\n\nexport const colorLegend: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'color',\n visible: enable,\n orient,\n position: legendPosition,\n padding: 0,\n field: unfoldInfo.encodingColor,\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n const measures = findAllMeasures(advancedVSeed.measures)\n const colorMeasure = measures.find((m) => m.encoding === 'color')\n if (colorMeasure) {\n const formatter = createFormatterByMeasure(colorMeasure)\n result.legends.handlerText!.formatter = formatter\n }\n return result\n}\n"],"names":["colorLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","measures","findAllMeasures","colorMeasure","m","formatter","createFormatterByMeasure"],"mappings":";AAGO,MAAMA,cAA8B,CAACC,MAAMC;IAChD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,SAAS,EAAE,GAAGF;IAC1C,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAMG,aAAaJ,cAAc,MAAM,CAACE,UAAU;IAClD,IAAI,CAACE,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOL;IAGT,MAAM,EAAEM,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,MAAM,EAAEC,WAAW,QAAQ,EAAEC,cAAc,EAAEC,UAAU,EAAEC,gBAAgB,EAAE,EAAEC,eAAe,EAAE,GAAGN,UAAU,CAAC;IAEpH,MAAMO,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAENR,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACTM;QACA,UAAUC;QACV,SAAS;QACT,OAAOV,WAAW,aAAa;QAC/B,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMM,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,MAAMG,WAAWC,gBAAgBf,cAAc,QAAQ;IACvD,MAAMgB,eAAeF,SAAS,IAAI,CAAC,CAACG,IAAMA,AAAe,YAAfA,EAAE,QAAQ;IACpD,IAAID,cAAc;QAChB,MAAME,YAAYC,yBAAyBH;QAC3CjB,OAAO,OAAO,CAAC,WAAW,CAAE,SAAS,GAAGmB;IAC1C;IACA,OAAOnB;AACT"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const discreteLegend: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const discreteLegend: VChartSpecPipe;
@@ -8,7 +8,7 @@ const discreteLegend = (spec, context)=>{
8
8
  const baseConfig = advancedVSeed.config[chartType];
9
9
  if (!baseConfig || !baseConfig.legend) return result;
10
10
  const { legend } = baseConfig;
11
- const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
11
+ const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, pagerIconColor, pagerIconDisableColor, labelFontWeight, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
12
12
  const orient = [
13
13
  'bottom',
14
14
  'bottomLeft',
@@ -47,6 +47,7 @@ const discreteLegend = (spec, context)=>{
47
47
  'rt',
48
48
  'br'
49
49
  ].includes(position) ? 'end' : 'middle';
50
+ const labelTextColor = labelColor || labelFontColor;
50
51
  result.legends = {
51
52
  type: 'discrete',
52
53
  visible: enable,
@@ -60,7 +61,7 @@ const discreteLegend = (spec, context)=>{
60
61
  maxWidth: '30%',
61
62
  focusIconStyle: {
62
63
  size: labelFontSize + 2,
63
- fill: labelColor || labelFontColor,
64
+ fill: labelTextColor,
64
65
  fontWeight: labelFontWeight
65
66
  },
66
67
  shape: {
@@ -85,7 +86,7 @@ const discreteLegend = (spec, context)=>{
85
86
  }
86
87
  },
87
88
  label: {
88
- formatMethod: (value)=>unfoldInfo.colorIdMap[String(value)].alias ?? value,
89
+ formatMethod: (value)=>unfoldInfo.colorIdMap[String(value)]?.alias ?? value,
89
90
  style: {
90
91
  fontSize: labelFontSize,
91
92
  fill: labelColor || labelFontColor,
@@ -110,6 +111,21 @@ const discreteLegend = (spec, context)=>{
110
111
  }
111
112
  }
112
113
  },
114
+ pager: {
115
+ textStyle: {
116
+ fill: labelTextColor
117
+ },
118
+ handler: {
119
+ style: {
120
+ fill: pagerIconColor
121
+ },
122
+ state: {
123
+ disable: {
124
+ fill: pagerIconDisableColor
125
+ }
126
+ }
127
+ }
128
+ },
113
129
  padding: 0
114
130
  };
115
131
  return result;
@@ -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)].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,CAAC,KAAK,IAAIA;gBAEvD,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, VChartSpecPipe } from 'src/types'\n\nexport const discreteLegend: VChartSpecPipe = (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 pagerIconColor,\n pagerIconDisableColor,\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 const labelTextColor = labelColor || labelFontColor\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: labelTextColor,\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 pager: {\n textStyle: {\n fill: labelTextColor,\n },\n handler: {\n style: {\n fill: pagerIconColor,\n },\n state: {\n disable: {\n fill: pagerIconDisableColor,\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","pagerIconColor","pagerIconDisableColor","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","labelTextColor","Math","item","value","String"],"mappings":"AAEO,MAAMA,iBAAiC,CAACC,MAAMC;IACnD,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,cAAc,EACdC,qBAAqB,EACrBC,eAAe,EACfC,UAAU,CAAC,EACXC,MAAM,EACNC,YAAY,WAAW,EACxB,GAAGX,UAAU,CAAC;IAEf,MAAMY,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACV,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,MAAMW,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACX,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IACN,MAAMY,iBAAiBV,cAAcD;IAErCT,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACT,QAAQc,KAAK,GAAG,CAAC,GAAGN;QACpB,QAAQM,KAAK,GAAG,CAAC,GAAGN;QACpB,UAAU;QACVG;QACA,UAAUC;QACV,MAAM;YACJ,OAAO;YACP,UAAU;YACV,gBAAgB;gBACd,MAAMR,gBAAgB;gBACtB,MAAMS;gBACN,YAAYN;YACd;YACA,OAAO;gBACL,OAAOE,SAAS,IAAI;gBACpB,OAAO,CAACM,OACC;wBACL,YAAYL;wBACZ,MAAMD,SAAS,IAAI;wBACnB,aAAa;wBACb,SAAS;wBACT,QAAQ;wBACR,aAAaA,SACT;4BACE,QAAQM,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,QACNnB,WAAW,UAAU,CAACoB,OAAOD,OAAO,EAAE,SAASA;gBAExD,OAAO;oBACL,UAAUZ;oBACV,MAAMD,cAAcD;oBACpB,YAAYK;gBACd;gBACA,OAAO;oBACL,YAAY;wBACV,MAAMJ,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,OAAO;YACL,WAAW;gBACT,MAAMW;YACR;YACA,SAAS;gBACP,OAAO;oBACL,MAAMR;gBACR;gBACA,OAAO;oBACL,SAAS;wBACP,MAAMC;oBACR;gBACF;YACF;QACF;QACA,SAAS;IACX;IACA,OAAOb;AACT"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const heatmapColorLegend: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const heatmapColorLegend: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/heatmapColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/heatmapColorLegend.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport type { SpecPipe } from 'src/types'\nimport { colorLegend } from './colorLegend'\nimport type { Datum, IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\n\nexport const heatmapColorLegend: SpecPipe = (spec, context) => {\n const result = colorLegend(spec, context) as IHeatmapChartSpec\n\n if (result.legends) {\n ;(result.legends as any).customFilter = (data: Datum[], range: number[], key: string) => {\n const min = Math.min(range[0], range[1])\n const max = Math.max(range[0], range[1])\n return (data ?? []).map((entry: Datum) => {\n const val = entry[key]\n const isHide = val - min < -1e-6 || val - max > 1e-6\n\n entry[DATUM_HIDE_KEY] = isHide\n\n return entry\n })\n }\n }\n\n return result\n}\n"],"names":["heatmapColorLegend","spec","context","result","colorLegend","data","range","key","min","Math","max","entry","val","isHide","DATUM_HIDE_KEY"],"mappings":";;AAMO,MAAMA,qBAA+B,CAACC,MAAMC;IACjD,MAAMC,SAASC,YAAYH,MAAMC;IAEjC,IAAIC,OAAO,OAAO,EACdA,OAAO,OAAO,CAAS,YAAY,GAAG,CAACE,MAAeC,OAAiBC;QACvE,MAAMC,MAAMC,KAAK,GAAG,CAACH,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC,EAAE;QACvC,MAAMI,MAAMD,KAAK,GAAG,CAACH,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC,EAAE;QACvC,OAAQD,AAAAA,CAAAA,QAAQ,EAAC,EAAG,GAAG,CAAC,CAACM;YACvB,MAAMC,MAAMD,KAAK,CAACJ,IAAI;YACtB,MAAMM,SAASD,MAAMJ,MAAM,aAASI,MAAMF,MAAM;YAEhDC,KAAK,CAACG,eAAe,GAAGD;YAExB,OAAOF;QACT;IACF;IAGF,OAAOR;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/legend/heatmapColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/heatmapColorLegend.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport type { VChartSpecPipe } from 'src/types'\nimport { colorLegend } from './colorLegend'\nimport type { Datum, IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\n\nexport const heatmapColorLegend: VChartSpecPipe = (spec, context) => {\n const result = colorLegend(spec, context) as IHeatmapChartSpec\n\n if (result.legends) {\n ;(result.legends as any).customFilter = (data: Datum[], range: number[], key: string) => {\n const min = Math.min(range[0], range[1])\n const max = Math.max(range[0], range[1])\n return (data ?? []).map((entry: Datum) => {\n const val = entry[key]\n const isHide = val - min < -1e-6 || val - max > 1e-6\n\n entry[DATUM_HIDE_KEY] = isHide\n\n return entry\n })\n }\n }\n\n return result\n}\n"],"names":["heatmapColorLegend","spec","context","result","colorLegend","data","range","key","min","Math","max","entry","val","isHide","DATUM_HIDE_KEY"],"mappings":";;AAMO,MAAMA,qBAAqC,CAACC,MAAMC;IACvD,MAAMC,SAASC,YAAYH,MAAMC;IAEjC,IAAIC,OAAO,OAAO,EACdA,OAAO,OAAO,CAAS,YAAY,GAAG,CAACE,MAAeC,OAAiBC;QACvE,MAAMC,MAAMC,KAAK,GAAG,CAACH,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC,EAAE;QACvC,MAAMI,MAAMD,KAAK,GAAG,CAACH,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC,EAAE;QACvC,OAAQD,AAAAA,CAAAA,QAAQ,EAAC,EAAG,GAAG,CAAC,CAACM;YACvB,MAAMC,MAAMD,KAAK,CAACJ,IAAI;YACtB,MAAMM,SAASD,MAAMJ,MAAM,aAASI,MAAMF,MAAM;YAEhDC,KAAK,CAACG,eAAe,GAAGD;YAExB,OAAOF;QACT;IACF;IAGF,OAAOR;AACT"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const pivotColorLegend: SpecPipe;
1
+ import type { PivotChartSpecPipe } from '../../../../../types';
2
+ export declare const pivotColorLegend: PivotChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { Color, Legend, SpecPipe } from 'src/types'\n\nexport const pivotColorLegend: 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 const max = Math.max(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMax))\n const { legend, color } = baseConfig\n const { colorScheme, linearColorScheme } = color\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends = {\n visible: enable,\n type: 'color',\n orient,\n position: legendPosition,\n\n colors: linearColorScheme || colorScheme || [],\n value: [min, max],\n min: min,\n max: max,\n\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n } as unknown\n return { ...result, legends } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotColorLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","max","Math","d","min","legend","color","colorScheme","linearColorScheme","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","legends"],"mappings":"AAGO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAC/B,MAAMI,MAAMC,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAMC,MAAMF,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAM,EAAEE,MAAM,EAAEC,KAAK,EAAE,GAAGP;IAC1B,MAAM,EAAEQ,WAAW,EAAEC,iBAAiB,EAAE,GAAGF;IAE3C,MAAM,EACJG,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACtB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMO,UAAU;QACd,SAASR;QACT,MAAM;QACNM;QACA,UAAUC;QAEV,QAAQR,qBAAqBD,eAAe,EAAE;QAC9C,OAAO;YAACH;YAAKH;SAAI;QACjB,KAAKG;QACL,KAAKH;QAEL,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMW,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAO;QAAE,GAAGlB,MAAM;QAAEqB;IAAQ;AAC9B"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { Color, Legend, PivotChartSpecPipe } from 'src/types'\n\nexport const pivotColorLegend: PivotChartSpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n const max = Math.max(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMax))\n const { legend, color } = baseConfig\n const { colorScheme, linearColorScheme } = color\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends = {\n visible: enable,\n type: 'color',\n orient,\n position: legendPosition,\n\n colors: linearColorScheme || colorScheme || [],\n value: [min, max],\n min: min,\n max: max,\n\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n } as unknown\n return { ...result, legends } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotColorLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","max","Math","d","min","legend","color","colorScheme","linearColorScheme","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","legends"],"mappings":"AAGO,MAAMA,mBAAuC,CAACC,MAAMC;IACzD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAC/B,MAAMI,MAAMC,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAMC,MAAMF,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAM,EAAEE,MAAM,EAAEC,KAAK,EAAE,GAAGP;IAC1B,MAAM,EAAEQ,WAAW,EAAEC,iBAAiB,EAAE,GAAGF;IAE3C,MAAM,EACJG,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACtB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMO,UAAU;QACd,SAASR;QACT,MAAM;QACNM;QACA,UAAUC;QAEV,QAAQR,qBAAqBD,eAAe,EAAE;QAC9C,OAAO;YAACH;YAAKH;SAAI;QACjB,KAAKG;QACL,KAAKH;QAEL,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMW,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAO;QAAE,GAAGlB,MAAM;QAAEqB;IAAQ;AAC9B"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const pivotDiscreteLegend: SpecPipe;
1
+ import type { PivotChartSpecPipe } from '../../../../../types';
2
+ export declare const pivotDiscreteLegend: PivotChartSpecPipe;
@@ -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,
@@ -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, { 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 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,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"}
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, PivotChartSpecPipe } from 'src/types'\nimport { createSpecifiedForColorMapping } from '../color/color'\n\nexport const pivotDiscreteLegend: PivotChartSpecPipe = (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,sBAA0C,CAACC,MAAMC;IAC5D,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"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const areaStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const areaStyle: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/areaStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/areaStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { AreaStyle, Datum, LineStyle, SpecPipe } from 'src/types'\nimport { groupBy, isEmpty, isNullish } from 'remeda'\nimport { getCurveTension, getCurveType } from './curve'\n\nexport const areaStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed\n const { areaStyle, lineStyle } = markStyle\n const { unfoldInfo } = datasetReshapeInfo[0]\n const result = {\n ...spec,\n area: {\n visible: true,\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(areaStyle) || isEmpty(areaStyle)) {\n return result\n }\n\n const areaStyles = (Array.isArray(areaStyle) ? areaStyle : [areaStyle]) as AreaStyle[]\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const group = unfoldInfo.encodingColorId\n\n const areaGroups = groupBy(dataset, (d) => d[group ?? ''] as string)\n\n const customMap = areaStyles.reduce<object>((result, style, index) => {\n const { areaColor, areaColorOpacity, areaVisible = true } = style\n\n const curveType = getCurveType(context.vseed, lineStyles[index]?.lineSmooth)\n const curveTension = getCurveTension(context.vseed, lineStyles[index]?.lineSmooth)\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n const lineData = areaGroups[datum[group ?? ''] as string]\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n curveType,\n curveTension,\n visible: areaVisible,\n fill: areaColor,\n fillOpacity: areaColorOpacity,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n area: {\n ...result.area,\n visible: true,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["areaStyle","spec","context","advancedVSeed","markStyle","datasetReshapeInfo","dataset","lineStyle","unfoldInfo","result","isNullish","isEmpty","areaStyles","Array","lineStyles","group","areaGroups","groupBy","d","customMap","style","index","areaColor","areaColorOpacity","areaVisible","curveType","getCurveType","curveTension","getCurveTension","datum","lineData","selector"],"mappings":";;;AAMO,MAAMA,sBAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,kBAAkB,EAAEC,OAAO,EAAE,GAAGH;IACnD,MAAM,EAAEH,SAAS,EAAEO,SAAS,EAAE,GAAGH;IACjC,MAAM,EAAEI,UAAU,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAC5C,MAAMI,SAAS;QACb,GAAGR,IAAI;QACP,MAAM;YACJ,SAAS;YACT,OAAO,CAAC;QACV;IACF;IAEA,IAAIS,UAAUV,cAAcW,QAAQX,YAClC,OAAOS;IAGT,MAAMG,aAAcC,MAAM,OAAO,CAACb,aAAaA,YAAY;QAACA;KAAU;IACtE,MAAMc,aAAcD,MAAM,OAAO,CAACN,aAAaA,YAAY;QAACA;KAAU;IAEtE,MAAMQ,QAAQP,WAAW,eAAe;IAExC,MAAMQ,aAAaC,QAAQX,SAAS,CAACY,IAAMA,CAAC,CAACH,SAAS,GAAG;IAEzD,MAAMI,YAAYP,WAAW,MAAM,CAAS,CAACH,QAAQW,OAAOC;QAC1D,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,cAAc,IAAI,EAAE,GAAGJ;QAE5D,MAAMK,YAAYC,aAAaxB,QAAQ,KAAK,EAAEY,UAAU,CAACO,MAAM,EAAE;QACjE,MAAMM,eAAeC,gBAAgB1B,QAAQ,KAAK,EAAEY,UAAU,CAACO,MAAM,EAAE;QAEvE,OAAO;YACL,GAAGZ,MAAM;YACT,CAAC,CAAC,MAAM,EAAEY,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACQ;oBACP,MAAMC,WAAWd,UAAU,CAACa,KAAK,CAACd,SAAS,GAAG,CAAW;oBACzD,KAAK,MAAMG,KAAKY,SACd,IAAIC,SAASb,GAAGE,MAAM,QAAQ,GAC5B,OAAO;oBAGX,OAAO;gBACT;gBACA,OAAO;oBACLK;oBACAE;oBACA,SAASH;oBACT,MAAMF;oBACN,aAAaC;gBACf;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGd,MAAM;QACT,MAAM;YACJ,GAAGA,OAAO,IAAI;YACd,SAAS;YACT,OAAO;gBACL,GAAGU,SAAS;YACd;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/areaStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/areaStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { AreaStyle, Datum, LineStyle, VChartSpecPipe } from 'src/types'\nimport { groupBy, isEmpty, isNullish } from 'remeda'\nimport { getCurveTension, getCurveType } from './curve'\n\nexport const areaStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed\n const { areaStyle, lineStyle } = markStyle\n const { unfoldInfo } = datasetReshapeInfo[0]\n const result = {\n ...spec,\n area: {\n visible: true,\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(areaStyle) || isEmpty(areaStyle)) {\n return result\n }\n\n const areaStyles = (Array.isArray(areaStyle) ? areaStyle : [areaStyle]) as AreaStyle[]\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const group = unfoldInfo.encodingColorId\n\n const areaGroups = groupBy(dataset, (d) => d[group ?? ''] as string)\n\n const customMap = areaStyles.reduce<object>((result, style, index) => {\n const { areaColor, areaColorOpacity, areaVisible = true } = style\n\n const curveType = getCurveType(context.vseed, lineStyles[index]?.lineSmooth)\n const curveTension = getCurveTension(context.vseed, lineStyles[index]?.lineSmooth)\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n const lineData = areaGroups[datum[group ?? ''] as string]\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n curveType,\n curveTension,\n visible: areaVisible,\n fill: areaColor,\n fillOpacity: areaColorOpacity,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n area: {\n ...result.area,\n visible: true,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["areaStyle","spec","context","advancedVSeed","markStyle","datasetReshapeInfo","dataset","lineStyle","unfoldInfo","result","isNullish","isEmpty","areaStyles","Array","lineStyles","group","areaGroups","groupBy","d","customMap","style","index","areaColor","areaColorOpacity","areaVisible","curveType","getCurveType","curveTension","getCurveTension","datum","lineData","selector"],"mappings":";;;AAMO,MAAMA,sBAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,kBAAkB,EAAEC,OAAO,EAAE,GAAGH;IACnD,MAAM,EAAEH,SAAS,EAAEO,SAAS,EAAE,GAAGH;IACjC,MAAM,EAAEI,UAAU,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAC5C,MAAMI,SAAS;QACb,GAAGR,IAAI;QACP,MAAM;YACJ,SAAS;YACT,OAAO,CAAC;QACV;IACF;IAEA,IAAIS,UAAUV,cAAcW,QAAQX,YAClC,OAAOS;IAGT,MAAMG,aAAcC,MAAM,OAAO,CAACb,aAAaA,YAAY;QAACA;KAAU;IACtE,MAAMc,aAAcD,MAAM,OAAO,CAACN,aAAaA,YAAY;QAACA;KAAU;IAEtE,MAAMQ,QAAQP,WAAW,eAAe;IAExC,MAAMQ,aAAaC,QAAQX,SAAS,CAACY,IAAMA,CAAC,CAACH,SAAS,GAAG;IAEzD,MAAMI,YAAYP,WAAW,MAAM,CAAS,CAACH,QAAQW,OAAOC;QAC1D,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,cAAc,IAAI,EAAE,GAAGJ;QAE5D,MAAMK,YAAYC,aAAaxB,QAAQ,KAAK,EAAEY,UAAU,CAACO,MAAM,EAAE;QACjE,MAAMM,eAAeC,gBAAgB1B,QAAQ,KAAK,EAAEY,UAAU,CAACO,MAAM,EAAE;QAEvE,OAAO;YACL,GAAGZ,MAAM;YACT,CAAC,CAAC,MAAM,EAAEY,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACQ;oBACP,MAAMC,WAAWd,UAAU,CAACa,KAAK,CAACd,SAAS,GAAG,CAAW;oBACzD,KAAK,MAAMG,KAAKY,SACd,IAAIC,SAASb,GAAGE,MAAM,QAAQ,GAC5B,OAAO;oBAGX,OAAO;gBACT;gBACA,OAAO;oBACLK;oBACAE;oBACA,SAASH;oBACT,MAAMF;oBACN,aAAaC;gBACf;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGd,MAAM;QACT,MAAM;YACJ,GAAGA,OAAO,IAAI;YACd,SAAS;YACT,OAAO;gBACL,GAAGU,SAAS;YACd;QACF;IACF;AACF"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const barStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const barStyle: VChartSpecPipe;
@@ -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, VChartSpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const barStyle: VChartSpecPipe = (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,oBAA2B,CAACC,MAAMC;IAC7C,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,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const cellStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const cellStyle: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/cellStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/cellStyle.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\nimport type { SpecPipe } from 'src/types'\n\nexport const cellStyle: SpecPipe = (spec, context) => {\n const result = {\n ...spec,\n cell: {\n style: {},\n },\n } as IHeatmapChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const cell = advancedVSeed.config?.[chartType as 'heatmap']?.cell\n\n return {\n ...result,\n cell: {\n style: {\n visible: (datum: any) => {\n return datum?.[DATUM_HIDE_KEY] !== true\n },\n shape: 'rect',\n stroke: cell?.stroke,\n lineWidth: cell?.lineWidth ?? 1,\n },\n },\n }\n}\n"],"names":["cellStyle","spec","context","result","advancedVSeed","vseed","chartType","cell","datum","DATUM_HIDE_KEY"],"mappings":";AAIO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAMC,SAAS;QACb,GAAGF,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IACA,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAME,OAAOH,cAAc,MAAM,EAAE,CAACE,UAAuB,EAAE;IAE7D,OAAO;QACL,GAAGH,MAAM;QACT,MAAM;YACJ,OAAO;gBACL,SAAS,CAACK,QACDA,OAAO,CAACC,eAAe,KAAK;gBAErC,OAAO;gBACP,QAAQF,MAAM;gBACd,WAAWA,MAAM,aAAa;YAChC;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/cellStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/cellStyle.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const cellStyle: VChartSpecPipe = (spec, context) => {\n const result = {\n ...spec,\n cell: {\n style: {},\n },\n } as IHeatmapChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const cell = advancedVSeed.config?.[chartType as 'heatmap']?.cell\n\n return {\n ...result,\n cell: {\n style: {\n visible: (datum: any) => {\n return datum?.[DATUM_HIDE_KEY] !== true\n },\n shape: 'rect',\n stroke: cell?.stroke,\n lineWidth: cell?.lineWidth ?? 1,\n },\n },\n }\n}\n"],"names":["cellStyle","spec","context","result","advancedVSeed","vseed","chartType","cell","datum","DATUM_HIDE_KEY"],"mappings":";AAIO,MAAMA,YAA4B,CAACC,MAAMC;IAC9C,MAAMC,SAAS;QACb,GAAGF,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IACA,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAME,OAAOH,cAAc,MAAM,EAAE,CAACE,UAAuB,EAAE;IAE7D,OAAO;QACL,GAAGH,MAAM;QACT,MAAM;YACJ,OAAO;gBACL,SAAS,CAACK,QACDA,OAAO,CAACC,eAAe,KAAK;gBAErC,OAAO;gBACP,QAAQF,MAAM;gBACd,WAAWA,MAAM,aAAa;YAChC;QACF;IACF;AACF"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const funnelStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const funnelStyle: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/funnelStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/funnelStyle.ts"],"sourcesContent":["import type { IFunnelChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const funnelStyle: SpecPipe = (spec) => {\n const result = {\n ...spec,\n funnel: {\n style: {},\n },\n } as IFunnelChartSpec\n\n return {\n ...result,\n funnel: {\n style: {\n cornerRadius: 0,\n },\n state: {\n hover: {\n fillOpacity: 0.6,\n },\n },\n },\n }\n}\n"],"names":["funnelStyle","spec","result"],"mappings":"AAGO,MAAMA,cAAwB,CAACC;IACpC,MAAMC,SAAS;QACb,GAAGD,IAAI;QACP,QAAQ;YACN,OAAO,CAAC;QACV;IACF;IAEA,OAAO;QACL,GAAGC,MAAM;QACT,QAAQ;YACN,OAAO;gBACL,cAAc;YAChB;YACA,OAAO;gBACL,OAAO;oBACL,aAAa;gBACf;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/funnelStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/funnelStyle.ts"],"sourcesContent":["import type { IFunnelChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const funnelStyle: VChartSpecPipe = (spec) => {\n const result = {\n ...spec,\n funnel: {\n style: {},\n },\n } as IFunnelChartSpec\n\n return {\n ...result,\n funnel: {\n style: {\n cornerRadius: 0,\n },\n state: {\n hover: {\n fillOpacity: 0.6,\n },\n },\n },\n }\n}\n"],"names":["funnelStyle","spec","result"],"mappings":"AAGO,MAAMA,cAA8B,CAACC;IAC1C,MAAMC,SAAS;QACb,GAAGD,IAAI;QACP,QAAQ;YACN,OAAO,CAAC;QACV;IACF;IAEA,OAAO;QACL,GAAGC,MAAM;QACT,QAAQ;YACN,OAAO;gBACL,cAAc;YAChB;YACA,OAAO;gBACL,OAAO;oBACL,aAAa;gBACf;YACF;QACF;IACF;AACF"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const funnelTransformStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const funnelTransformStyle: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.ts"],"sourcesContent":["import type { SpecPipe } from 'src/types'\n\nexport const funnelTransformStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const config = advancedVSeed.config?.[chartType as 'funnel']?.transform\n\n return {\n ...spec,\n transform: {\n style: {\n fill: config?.backgroundColor,\n },\n },\n transformLabel: {\n visible: true,\n style: {\n fill: config?.textColor,\n },\n },\n }\n}\n"],"names":["funnelTransformStyle","spec","context","advancedVSeed","vseed","chartType","config"],"mappings":"AAEO,MAAMA,uBAAiC,CAACC,MAAMC;IACnD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,SAASH,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAE9D,OAAO;QACL,GAAGJ,IAAI;QACP,WAAW;YACT,OAAO;gBACL,MAAMK,QAAQ;YAChB;QACF;QACA,gBAAgB;YACd,SAAS;YACT,OAAO;gBACL,MAAMA,QAAQ;YAChB;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.ts"],"sourcesContent":["import type { VChartSpecPipe } from 'src/types'\n\nexport const funnelTransformStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const config = advancedVSeed.config?.[chartType as 'funnel']?.transform\n\n return {\n ...spec,\n transform: {\n style: {\n fill: config?.backgroundColor,\n },\n },\n transformLabel: {\n visible: true,\n style: {\n fill: config?.textColor,\n },\n },\n }\n}\n"],"names":["funnelTransformStyle","spec","context","advancedVSeed","vseed","chartType","config"],"mappings":"AAEO,MAAMA,uBAAuC,CAACC,MAAMC;IACzD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,SAASH,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAE9D,OAAO;QACL,GAAGJ,IAAI;QACP,WAAW;YACT,OAAO;gBACL,MAAMK,QAAQ;YAChB;QACF;QACA,gBAAgB;YACd,SAAS;YACT,OAAO;gBACL,MAAMA,QAAQ;YAChB;QACF;IACF;AACF"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const lineStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const lineStyle: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/lineStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/lineStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, LineStyle, SpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\nimport { getCurveTension, getCurveType } from './curve'\n\nexport const lineStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle } = advancedVSeed\n const { lineStyle } = markStyle\n const result = {\n ...spec,\n line: {\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(lineStyle) || isEmpty(lineStyle)) {\n return result\n }\n\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const customMap = lineStyles.reduce<object>((result, style, index) => {\n const { lineColor, lineColorOpacity, lineSmooth, lineStyle, lineWidth = 2, lineVisible = true } = style\n\n const dashSegment = lineWidth * 2\n const dashGap = lineWidth\n\n const lineDash =\n lineStyle === 'dashed' ? [dashSegment, dashSegment] : lineStyle === 'dotted' ? [dashGap / 2, dashGap * 2] : [0, 0]\n\n const curveType = getCurveType(context.vseed, lineSmooth)\n const curveTension = getCurveTension(context.vseed, lineSmooth)\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (\n _: Datum,\n node: {\n renderNode: {\n context: {\n data: Datum[]\n }\n }\n },\n ) => {\n const lineData = node.renderNode.context.data\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n visible: lineVisible,\n curveType: curveType,\n curveTension: curveTension,\n strokeOpacity: lineColorOpacity,\n stroke: lineColor,\n lineWidth: lineWidth,\n lineDash: lineDash,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n line: {\n ...result.line,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["lineStyle","spec","context","advancedVSeed","markStyle","result","isNullish","isEmpty","lineStyles","Array","customMap","style","index","lineColor","lineColorOpacity","lineSmooth","lineWidth","lineVisible","dashSegment","dashGap","lineDash","curveType","getCurveType","curveTension","getCurveTension","_","node","lineData","d","selector"],"mappings":";;;AAMO,MAAMA,sBAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEH,SAAS,EAAE,GAAGI;IACtB,MAAMC,SAAS;QACb,GAAGJ,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IAEA,IAAIK,UAAUN,cAAcO,QAAQP,YAClC,OAAOK;IAGT,MAAMG,aAAcC,MAAM,OAAO,CAACT,aAAaA,YAAY;QAACA;KAAU;IAEtE,MAAMU,YAAYF,WAAW,MAAM,CAAS,CAACH,QAAQM,OAAOC;QAC1D,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,EAAEf,SAAS,EAAEgB,YAAY,CAAC,EAAEC,cAAc,IAAI,EAAE,GAAGN;QAElG,MAAMO,cAAcF,AAAY,IAAZA;QACpB,MAAMG,UAAUH;QAEhB,MAAMI,WACJpB,AAAc,aAAdA,YAAyB;YAACkB;YAAaA;SAAY,GAAGlB,AAAc,aAAdA,YAAyB;YAACmB,UAAU;YAAa,IAAVA;SAAY,GAAG;YAAC;YAAG;SAAE;QAEpH,MAAME,YAAYC,aAAapB,QAAQ,KAAK,EAAEa;QAC9C,MAAMQ,eAAeC,gBAAgBtB,QAAQ,KAAK,EAAEa;QAEpD,OAAO;YACL,GAAGV,MAAM;YACT,CAAC,CAAC,MAAM,EAAEO,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CACNa,GACAC;oBAQA,MAAMC,WAAWD,KAAK,UAAU,CAAC,OAAO,CAAC,IAAI;oBAC7C,KAAK,MAAME,KAAKD,SACd,IAAIE,SAASD,GAAGjB,MAAM,QAAQ,GAC5B,OAAO;oBAGX,OAAO;gBACT;gBACA,OAAO;oBACL,SAASM;oBACT,WAAWI;oBACX,cAAcE;oBACd,eAAeT;oBACf,QAAQD;oBACR,WAAWG;oBACX,UAAUI;gBACZ;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGf,MAAM;QACT,MAAM;YACJ,GAAGA,OAAO,IAAI;YACd,OAAO;gBACL,GAAGK,SAAS;YACd;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/lineStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/lineStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, LineStyle, VChartSpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\nimport { getCurveTension, getCurveType } from './curve'\n\nexport const lineStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle } = advancedVSeed\n const { lineStyle } = markStyle\n const result = {\n ...spec,\n line: {\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(lineStyle) || isEmpty(lineStyle)) {\n return result\n }\n\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const customMap = lineStyles.reduce<object>((result, style, index) => {\n const { lineColor, lineColorOpacity, lineSmooth, lineStyle, lineWidth = 2, lineVisible = true } = style\n\n const dashSegment = lineWidth * 2\n const dashGap = lineWidth\n\n const lineDash =\n lineStyle === 'dashed' ? [dashSegment, dashSegment] : lineStyle === 'dotted' ? [dashGap / 2, dashGap * 2] : [0, 0]\n\n const curveType = getCurveType(context.vseed, lineSmooth)\n const curveTension = getCurveTension(context.vseed, lineSmooth)\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (\n _: Datum,\n node: {\n renderNode: {\n context: {\n data: Datum[]\n }\n }\n },\n ) => {\n const lineData = node.renderNode.context.data\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n visible: lineVisible,\n curveType: curveType,\n curveTension: curveTension,\n strokeOpacity: lineColorOpacity,\n stroke: lineColor,\n lineWidth: lineWidth,\n lineDash: lineDash,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n line: {\n ...result.line,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["lineStyle","spec","context","advancedVSeed","markStyle","result","isNullish","isEmpty","lineStyles","Array","customMap","style","index","lineColor","lineColorOpacity","lineSmooth","lineWidth","lineVisible","dashSegment","dashGap","lineDash","curveType","getCurveType","curveTension","getCurveTension","_","node","lineData","d","selector"],"mappings":";;;AAMO,MAAMA,sBAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEH,SAAS,EAAE,GAAGI;IACtB,MAAMC,SAAS;QACb,GAAGJ,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IAEA,IAAIK,UAAUN,cAAcO,QAAQP,YAClC,OAAOK;IAGT,MAAMG,aAAcC,MAAM,OAAO,CAACT,aAAaA,YAAY;QAACA;KAAU;IAEtE,MAAMU,YAAYF,WAAW,MAAM,CAAS,CAACH,QAAQM,OAAOC;QAC1D,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,EAAEf,SAAS,EAAEgB,YAAY,CAAC,EAAEC,cAAc,IAAI,EAAE,GAAGN;QAElG,MAAMO,cAAcF,AAAY,IAAZA;QACpB,MAAMG,UAAUH;QAEhB,MAAMI,WACJpB,AAAc,aAAdA,YAAyB;YAACkB;YAAaA;SAAY,GAAGlB,AAAc,aAAdA,YAAyB;YAACmB,UAAU;YAAa,IAAVA;SAAY,GAAG;YAAC;YAAG;SAAE;QAEpH,MAAME,YAAYC,aAAapB,QAAQ,KAAK,EAAEa;QAC9C,MAAMQ,eAAeC,gBAAgBtB,QAAQ,KAAK,EAAEa;QAEpD,OAAO;YACL,GAAGV,MAAM;YACT,CAAC,CAAC,MAAM,EAAEO,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CACNa,GACAC;oBAQA,MAAMC,WAAWD,KAAK,UAAU,CAAC,OAAO,CAAC,IAAI;oBAC7C,KAAK,MAAME,KAAKD,SACd,IAAIE,SAASD,GAAGjB,MAAM,QAAQ,GAC5B,OAAO;oBAGX,OAAO;gBACT;gBACA,OAAO;oBACL,SAASM;oBACT,WAAWI;oBACX,cAAcE;oBACd,eAAeT;oBACf,QAAQD;oBACR,WAAWG;oBACX,UAAUI;gBACZ;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGf,MAAM;QACT,MAAM;YACJ,GAAGA,OAAO,IAAI;YACd,OAAO;gBACL,GAAGK,SAAS;YACd;QACF;IACF;AACF"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const pieStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const pieStyle: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pieStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pieStyle.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const pieStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { dataset } = advancedVSeed\n const showStroke = dataset.length <= 30\n const config = advancedVSeed.config?.[chartType as 'pie']\n\n const result = {\n ...spec,\n pie: {\n style: {\n stroke: config?.backgroundColor ?? '#ffffff',\n lineWidth: showStroke ? 1 : 0,\n },\n },\n } as Required<IPieChartSpec>\n\n if ((spec as IPieChartSpec).outerRadius) {\n result.pie.state = {\n hover: {\n outerRadius: ((spec as IPieChartSpec).outerRadius as number) * 1.1,\n },\n }\n }\n\n if (config?.cornerRadius) {\n result.pie.style!.cornerRadius = config.cornerRadius\n }\n\n return result\n}\n"],"names":["pieStyle","spec","context","advancedVSeed","vseed","chartType","dataset","showStroke","config","result"],"mappings":"AAGO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,OAAO,EAAE,GAAGH;IACpB,MAAMI,aAAaD,QAAQ,MAAM,IAAI;IACrC,MAAME,SAASL,cAAc,MAAM,EAAE,CAACE,UAAmB;IAEzD,MAAMI,SAAS;QACb,GAAGR,IAAI;QACP,KAAK;YACH,OAAO;gBACL,QAAQO,QAAQ,mBAAmB;gBACnC,WAAWD,aAAa,IAAI;YAC9B;QACF;IACF;IAEA,IAAKN,KAAuB,WAAW,EACrCQ,OAAO,GAAG,CAAC,KAAK,GAAG;QACjB,OAAO;YACL,aAAeR,AAAgD,MAAhDA,KAAuB,WAAW;QACnD;IACF;IAGF,IAAIO,QAAQ,cACVC,OAAO,GAAG,CAAC,KAAK,CAAE,YAAY,GAAGD,OAAO,YAAY;IAGtD,OAAOC;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pieStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pieStyle.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const pieStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { dataset } = advancedVSeed\n const showStroke = dataset.length <= 30\n const config = advancedVSeed.config?.[chartType as 'pie']\n\n const result = {\n ...spec,\n pie: {\n style: {\n stroke: config?.backgroundColor ?? '#ffffff',\n lineWidth: showStroke ? 1 : 0,\n },\n },\n } as Required<IPieChartSpec>\n\n if ((spec as IPieChartSpec).outerRadius) {\n result.pie.state = {\n hover: {\n outerRadius: ((spec as IPieChartSpec).outerRadius as number) * 1.1,\n },\n }\n }\n\n if (config?.cornerRadius) {\n result.pie.style!.cornerRadius = config.cornerRadius\n }\n\n return result\n}\n"],"names":["pieStyle","spec","context","advancedVSeed","vseed","chartType","dataset","showStroke","config","result"],"mappings":"AAGO,MAAMA,WAA2B,CAACC,MAAMC;IAC7C,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,OAAO,EAAE,GAAGH;IACpB,MAAMI,aAAaD,QAAQ,MAAM,IAAI;IACrC,MAAME,SAASL,cAAc,MAAM,EAAE,CAACE,UAAmB;IAEzD,MAAMI,SAAS;QACb,GAAGR,IAAI;QACP,KAAK;YACH,OAAO;gBACL,QAAQO,QAAQ,mBAAmB;gBACnC,WAAWD,aAAa,IAAI;YAC9B;QACF;IACF;IAEA,IAAKN,KAAuB,WAAW,EACrCQ,OAAO,GAAG,CAAC,KAAK,GAAG;QACjB,OAAO;YACL,aAAeR,AAAgD,MAAhDA,KAAuB,WAAW;QACnD;IACF;IAGF,IAAIO,QAAQ,cACVC,OAAO,GAAG,CAAC,KAAK,CAAE,YAAY,GAAGD,OAAO,YAAY;IAGtD,OAAOC;AACT"}
@@ -1,3 +1,3 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const pointStateDimensionHover: SpecPipe;
3
- export declare const pointStateHover: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const pointStateDimensionHover: VChartSpecPipe;
3
+ export declare const pointStateHover: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pointState.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pointState.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Datum, SpecPipe } from 'src/types'\n\nexport const pointStateDimensionHover: SpecPipe = (spec) => {\n const point = (spec as IScatterChartSpec).point || {}\n const result = {\n ...spec,\n point: {\n ...point,\n state: {\n ...(point.state || {}),\n dimension_hover: {\n scaleX: 1.4,\n scaleY: 1.4,\n outerBorder: {\n lineWidth: 4,\n strokeOpacity: 0.25,\n distance: 2,\n },\n },\n },\n },\n } as IScatterChartSpec\n return result\n}\n\nexport const pointStateHover: SpecPipe = (spec, context) => {\n const point = (spec as IScatterChartSpec).point || {}\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const result = {\n ...spec,\n point: {\n ...point,\n state: {\n ...(point.state || {}),\n hover: {\n scaleX: 1.4,\n scaleY: 1.4,\n stroke: (datum: Datum, context: unknown) => {\n const field = unfoldInfo.encodingColorId\n const color = (context as any).seriesColor(datum[field] as string)\n return color\n },\n fillOpacity: 0.6,\n lineWidth: 1,\n },\n },\n },\n } as IScatterChartSpec\n return result\n}\n"],"names":["pointStateDimensionHover","spec","point","result","pointStateHover","context","advancedVSeed","datasetReshapeInfo","unfoldInfo","datum","field","color"],"mappings":"AAIO,MAAMA,2BAAqC,CAACC;IACjD,MAAMC,QAASD,KAA2B,KAAK,IAAI,CAAC;IACpD,MAAME,SAAS;QACb,GAAGF,IAAI;QACP,OAAO;YACL,GAAGC,KAAK;YACR,OAAO;gBACL,GAAIA,MAAM,KAAK,IAAI,CAAC,CAAC;gBACrB,iBAAiB;oBACf,QAAQ;oBACR,QAAQ;oBACR,aAAa;wBACX,WAAW;wBACX,eAAe;wBACf,UAAU;oBACZ;gBACF;YACF;QACF;IACF;IACA,OAAOC;AACT;AAEO,MAAMC,kBAA4B,CAACH,MAAMI;IAC9C,MAAMH,QAASD,KAA2B,KAAK,IAAI,CAAC;IACpD,MAAM,EAAEK,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;IAC5C,MAAMJ,SAAS;QACb,GAAGF,IAAI;QACP,OAAO;YACL,GAAGC,KAAK;YACR,OAAO;gBACL,GAAIA,MAAM,KAAK,IAAI,CAAC,CAAC;gBACrB,OAAO;oBACL,QAAQ;oBACR,QAAQ;oBACR,QAAQ,CAACO,OAAcJ;wBACrB,MAAMK,QAAQF,WAAW,eAAe;wBACxC,MAAMG,QAASN,QAAgB,WAAW,CAACI,KAAK,CAACC,MAAM;wBACvD,OAAOC;oBACT;oBACA,aAAa;oBACb,WAAW;gBACb;YACF;QACF;IACF;IACA,OAAOR;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pointState.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pointState.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Datum, VChartSpecPipe } from 'src/types'\n\nexport const pointStateDimensionHover: VChartSpecPipe = (spec) => {\n const point = (spec as IScatterChartSpec).point || {}\n const result = {\n ...spec,\n point: {\n ...point,\n state: {\n ...(point.state || {}),\n dimension_hover: {\n scaleX: 1.4,\n scaleY: 1.4,\n outerBorder: {\n lineWidth: 4,\n strokeOpacity: 0.25,\n distance: 2,\n },\n },\n },\n },\n } as IScatterChartSpec\n return result\n}\n\nexport const pointStateHover: VChartSpecPipe = (spec, context) => {\n const point = (spec as IScatterChartSpec).point || {}\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const result = {\n ...spec,\n point: {\n ...point,\n state: {\n ...(point.state || {}),\n hover: {\n scaleX: 1.4,\n scaleY: 1.4,\n stroke: (datum: Datum, context: unknown) => {\n const field = unfoldInfo.encodingColorId\n const color = (context as any).seriesColor(datum[field] as string)\n return color\n },\n fillOpacity: 0.6,\n lineWidth: 1,\n },\n },\n },\n } as IScatterChartSpec\n return result\n}\n"],"names":["pointStateDimensionHover","spec","point","result","pointStateHover","context","advancedVSeed","datasetReshapeInfo","unfoldInfo","datum","field","color"],"mappings":"AAIO,MAAMA,2BAA2C,CAACC;IACvD,MAAMC,QAASD,KAA2B,KAAK,IAAI,CAAC;IACpD,MAAME,SAAS;QACb,GAAGF,IAAI;QACP,OAAO;YACL,GAAGC,KAAK;YACR,OAAO;gBACL,GAAIA,MAAM,KAAK,IAAI,CAAC,CAAC;gBACrB,iBAAiB;oBACf,QAAQ;oBACR,QAAQ;oBACR,aAAa;wBACX,WAAW;wBACX,eAAe;wBACf,UAAU;oBACZ;gBACF;YACF;QACF;IACF;IACA,OAAOC;AACT;AAEO,MAAMC,kBAAkC,CAACH,MAAMI;IACpD,MAAMH,QAASD,KAA2B,KAAK,IAAI,CAAC;IACpD,MAAM,EAAEK,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;IAC5C,MAAMJ,SAAS;QACb,GAAGF,IAAI;QACP,OAAO;YACL,GAAGC,KAAK;YACR,OAAO;gBACL,GAAIA,MAAM,KAAK,IAAI,CAAC,CAAC;gBACrB,OAAO;oBACL,QAAQ;oBACR,QAAQ;oBACR,QAAQ,CAACO,OAAcJ;wBACrB,MAAMK,QAAQF,WAAW,eAAe;wBACxC,MAAMG,QAASN,QAAgB,WAAW,CAACI,KAAK,CAACC,MAAM;wBACvD,OAAOC;oBACT;oBACA,aAAa;oBACb,WAAW;gBACb;YACF;QACF;IACF;IACA,OAAOR;AACT"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const pointStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const pointStyle: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pointStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pointStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, PointStyle, SpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const pointStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle } = advancedVSeed\n const { pointStyle } = markStyle\n const result = {\n ...spec,\n point: {\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(pointStyle) || isEmpty(pointStyle)) {\n return result\n }\n\n const pointStyles = (Array.isArray(pointStyle) ? pointStyle : [pointStyle]) as PointStyle[]\n\n const customMap = pointStyles.reduce<object>((result, style, index) => {\n const {\n pointBorderColor,\n pointBorderStyle,\n pointBorderWidth = 1,\n pointColor,\n pointColorOpacity,\n pointSize,\n pointVisible = true,\n } = style\n\n const lineDash = pointBorderStyle === 'dashed' ? [5, 2] : pointBorderStyle === '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: pointVisible,\n size: pointSize,\n fill: pointColor,\n fillOpacity: pointColorOpacity,\n innerBorder: {\n stroke: pointBorderColor,\n lineWidth: pointBorderWidth,\n distance: (pointBorderWidth || 0) / 2,\n lineDash: lineDash,\n },\n },\n },\n }\n }, {})\n\n return {\n ...result,\n point: {\n ...result.point,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["pointStyle","spec","context","advancedVSeed","markStyle","result","isNullish","isEmpty","pointStyles","Array","customMap","style","index","pointBorderColor","pointBorderStyle","pointBorderWidth","pointColor","pointColorOpacity","pointSize","pointVisible","lineDash","datum","selector"],"mappings":";;AAKO,MAAMA,wBAAuB,CAACC,MAAMC;IACzC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEH,UAAU,EAAE,GAAGI;IACvB,MAAMC,SAAS;QACb,GAAGJ,IAAI;QACP,OAAO;YACL,OAAO,CAAC;QACV;IACF;IAEA,IAAIK,UAAUN,eAAeO,QAAQP,aACnC,OAAOK;IAGT,MAAMG,cAAeC,MAAM,OAAO,CAACT,cAAcA,aAAa;QAACA;KAAW;IAE1E,MAAMU,YAAYF,YAAY,MAAM,CAAS,CAACH,QAAQM,OAAOC;QAC3D,MAAM,EACJC,gBAAgB,EAChBC,gBAAgB,EAChBC,mBAAmB,CAAC,EACpBC,UAAU,EACVC,iBAAiB,EACjBC,SAAS,EACTC,eAAe,IAAI,EACpB,GAAGR;QAEJ,MAAMS,WAAWN,AAAqB,aAArBA,mBAAgC;YAAC;YAAG;SAAE,GAAGA,AAAqB,aAArBA,mBAAgC;YAAC;YAAG;SAAE,GAAG;YAAC;YAAG;SAAE;QACzG,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,MAAMD;oBACN,MAAMF;oBACN,aAAaC;oBACb,aAAa;wBACX,QAAQJ;wBACR,WAAWE;wBACX,UAAWA,AAAAA,CAAAA,oBAAoB,KAAK;wBACpC,UAAUK;oBACZ;gBACF;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGf,MAAM;QACT,OAAO;YACL,GAAGA,OAAO,KAAK;YACf,OAAO;gBACL,GAAGK,SAAS;YACd;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pointStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pointStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, PointStyle, VChartSpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const pointStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle } = advancedVSeed\n const { pointStyle } = markStyle\n const result = {\n ...spec,\n point: {\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(pointStyle) || isEmpty(pointStyle)) {\n return result\n }\n\n const pointStyles = (Array.isArray(pointStyle) ? pointStyle : [pointStyle]) as PointStyle[]\n\n const customMap = pointStyles.reduce<object>((result, style, index) => {\n const {\n pointBorderColor,\n pointBorderStyle,\n pointBorderWidth = 1,\n pointColor,\n pointColorOpacity,\n pointSize,\n pointVisible = true,\n } = style\n\n const lineDash = pointBorderStyle === 'dashed' ? [5, 2] : pointBorderStyle === '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: pointVisible,\n size: pointSize,\n fill: pointColor,\n fillOpacity: pointColorOpacity,\n innerBorder: {\n stroke: pointBorderColor,\n lineWidth: pointBorderWidth,\n distance: (pointBorderWidth || 0) / 2,\n lineDash: lineDash,\n },\n },\n },\n }\n }, {})\n\n return {\n ...result,\n point: {\n ...result.point,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["pointStyle","spec","context","advancedVSeed","markStyle","result","isNullish","isEmpty","pointStyles","Array","customMap","style","index","pointBorderColor","pointBorderStyle","pointBorderWidth","pointColor","pointColorOpacity","pointSize","pointVisible","lineDash","datum","selector"],"mappings":";;AAKO,MAAMA,wBAA6B,CAACC,MAAMC;IAC/C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEH,UAAU,EAAE,GAAGI;IACvB,MAAMC,SAAS;QACb,GAAGJ,IAAI;QACP,OAAO;YACL,OAAO,CAAC;QACV;IACF;IAEA,IAAIK,UAAUN,eAAeO,QAAQP,aACnC,OAAOK;IAGT,MAAMG,cAAeC,MAAM,OAAO,CAACT,cAAcA,aAAa;QAACA;KAAW;IAE1E,MAAMU,YAAYF,YAAY,MAAM,CAAS,CAACH,QAAQM,OAAOC;QAC3D,MAAM,EACJC,gBAAgB,EAChBC,gBAAgB,EAChBC,mBAAmB,CAAC,EACpBC,UAAU,EACVC,iBAAiB,EACjBC,SAAS,EACTC,eAAe,IAAI,EACpB,GAAGR;QAEJ,MAAMS,WAAWN,AAAqB,aAArBA,mBAAgC;YAAC;YAAG;SAAE,GAAGA,AAAqB,aAArBA,mBAAgC;YAAC;YAAG;SAAE,GAAG;YAAC;YAAG;SAAE;QACzG,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,MAAMD;oBACN,MAAMF;oBACN,aAAaC;oBACb,aAAa;wBACX,QAAQJ;wBACR,WAAWE;wBACX,UAAWA,AAAAA,CAAAA,oBAAoB,KAAK;wBACpC,UAAUK;oBACZ;gBACF;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGf,MAAM;QACT,OAAO;YACL,GAAGA,OAAO,KAAK;YACf,OAAO;gBACL,GAAGK,SAAS;YACd;QACF;IACF;AACF"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const roseStyle: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const roseStyle: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/roseStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/roseStyle.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const roseStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { dataset } = advancedVSeed\n const showStroke = dataset.length <= 30\n\n const result = {\n ...spec,\n rose: {\n style: {},\n },\n } as Required<IRoseChartSpec>\n\n return {\n ...result,\n rose: {\n style: {\n stroke: '#ffffff',\n lineWidth: showStroke ? 1 : 0,\n },\n state: {\n hover: {\n lineWidth: 1,\n fillOpacity: 0.6,\n },\n },\n },\n }\n}\n"],"names":["roseStyle","spec","context","advancedVSeed","dataset","showStroke","result"],"mappings":"AAGO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,OAAO,EAAE,GAAGD;IACpB,MAAME,aAAaD,QAAQ,MAAM,IAAI;IAErC,MAAME,SAAS;QACb,GAAGL,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IAEA,OAAO;QACL,GAAGK,MAAM;QACT,MAAM;YACJ,OAAO;gBACL,QAAQ;gBACR,WAAWD,aAAa,IAAI;YAC9B;YACA,OAAO;gBACL,OAAO;oBACL,WAAW;oBACX,aAAa;gBACf;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/roseStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/roseStyle.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const roseStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { dataset } = advancedVSeed\n const showStroke = dataset.length <= 30\n\n const result = {\n ...spec,\n rose: {\n style: {},\n },\n } as Required<IRoseChartSpec>\n\n return {\n ...result,\n rose: {\n style: {\n stroke: '#ffffff',\n lineWidth: showStroke ? 1 : 0,\n },\n state: {\n hover: {\n lineWidth: 1,\n fillOpacity: 0.6,\n },\n },\n },\n }\n}\n"],"names":["roseStyle","spec","context","advancedVSeed","dataset","showStroke","result"],"mappings":"AAGO,MAAMA,YAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,OAAO,EAAE,GAAGD;IACpB,MAAME,aAAaD,QAAQ,MAAM,IAAI;IAErC,MAAME,SAAS;QACb,GAAGL,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IAEA,OAAO;QACL,GAAGK,MAAM;QACT,MAAM;YACJ,OAAO;gBACL,QAAQ;gBACR,WAAWD,aAAa,IAAI;YAC9B;YACA,OAAO;gBACL,OAAO;oBACL,WAAW;oBACX,aAAa;gBACf;YACF;QACF;IACF;AACF"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const percent: SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const percent: VChartSpecPipe;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/percent/percent.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/percent/percent.ts"],"sourcesContent":["import type { IAreaChartSpec, IBarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const percent: SpecPipe = (spec) => {\n const result = { ...spec } as IAreaChartSpec | IBarChartSpec\n result.percent = true\n return result\n}\n"],"names":["percent","spec","result"],"mappings":"AAGO,MAAMA,UAAoB,CAACC;IAChC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IACzBC,OAAO,OAAO,GAAG;IACjB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/percent/percent.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/percent/percent.ts"],"sourcesContent":["import type { IAreaChartSpec, IBarChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const percent: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IAreaChartSpec | IBarChartSpec\n result.percent = true\n return result\n}\n"],"names":["percent","spec","result"],"mappings":"AAGO,MAAMA,UAA0B,CAACC;IACtC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IACzBC,OAAO,OAAO,GAAG;IACjB,OAAOA;AACT"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe, SpecPipeline } from '../../../../../types';
2
- export declare const pivotAdapter: (pipeline: SpecPipeline, pivotPipeline: SpecPipeline) => SpecPipe;
1
+ import type { PivotChartSpecPipeline, SpecPipe, VChartSpecPipeline } from '../../../../../types';
2
+ export declare const pivotAdapter: (pipeline: VChartSpecPipeline, pivotPipeline: PivotChartSpecPipeline) => SpecPipe;
@@ -1,10 +1,13 @@
1
1
  import { execPipeline, isPivotChart } from "../../../../utils/index.js";
2
- const pivotAdapter = (pipeline, pivotPipeline)=>(spec, context)=>{
2
+ const pivotAdapter = (pipeline, pivotPipeline)=>{
3
+ const adapted = (spec, context)=>{
3
4
  const { vseed } = context;
4
5
  const usePivotChart = isPivotChart(vseed);
5
6
  if (usePivotChart) return execPipeline(pivotPipeline, context, spec);
6
7
  return execPipeline(pipeline, context, spec);
7
8
  };
9
+ return adapted;
10
+ };
8
11
  export { pivotAdapter };
9
12
 
10
13
  //# sourceMappingURL=pivotAdapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotAdapter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.ts"],"sourcesContent":["import type { Spec, SpecPipe, SpecPipeline, SpecPipelineContext } from 'src/types'\nimport { execPipeline, isPivotChart } from '../../../../utils'\n\nexport const pivotAdapter = (pipeline: SpecPipeline, pivotPipeline: SpecPipeline): SpecPipe => {\n return (spec, context) => {\n const { vseed } = context\n const usePivotChart = isPivotChart(vseed)\n\n if (usePivotChart) {\n return execPipeline<Spec, SpecPipelineContext>(pivotPipeline, context, spec)\n }\n\n return execPipeline<Spec, SpecPipelineContext>(pipeline, context, spec)\n }\n}\n"],"names":["pivotAdapter","pipeline","pivotPipeline","spec","context","vseed","usePivotChart","isPivotChart","execPipeline"],"mappings":";AAGO,MAAMA,eAAe,CAACC,UAAwBC,gBAC5C,CAACC,MAAMC;QACZ,MAAM,EAAEC,KAAK,EAAE,GAAGD;QAClB,MAAME,gBAAgBC,aAAaF;QAEnC,IAAIC,eACF,OAAOE,aAAwCN,eAAeE,SAASD;QAGzE,OAAOK,aAAwCP,UAAUG,SAASD;IACpE"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotAdapter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.ts"],"sourcesContent":["import type {\n PivotChartSpecPipe,\n PivotChartSpecPipeline,\n SpecPipe,\n SpecPipelineContext,\n VChartSpecPipe,\n VChartSpecPipeline,\n} from 'src/types'\nimport type { ISpec } from '@visactor/vchart'\nimport type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { execPipeline, isPivotChart } from '../../../../utils'\n\nexport const pivotAdapter = (pipeline: VChartSpecPipeline, pivotPipeline: PivotChartSpecPipeline): SpecPipe => {\n const adapted = ((spec: unknown, context: SpecPipelineContext) => {\n const { vseed } = context\n const usePivotChart = isPivotChart(vseed)\n if (usePivotChart) {\n return execPipeline<PivotChartConstructorOptions, SpecPipelineContext>(\n pivotPipeline,\n context,\n spec as Partial<PivotChartConstructorOptions>,\n )\n }\n return execPipeline<ISpec, SpecPipelineContext>(pipeline, context, spec as Partial<ISpec>)\n }) as VChartSpecPipe & PivotChartSpecPipe\n\n return adapted as unknown as SpecPipe\n}\n"],"names":["pivotAdapter","pipeline","pivotPipeline","adapted","spec","context","vseed","usePivotChart","isPivotChart","execPipeline"],"mappings":";AAYO,MAAMA,eAAe,CAACC,UAA8BC;IACzD,MAAMC,UAAW,CAACC,MAAeC;QAC/B,MAAM,EAAEC,KAAK,EAAE,GAAGD;QAClB,MAAME,gBAAgBC,aAAaF;QACnC,IAAIC,eACF,OAAOE,aACLP,eACAG,SACAD;QAGJ,OAAOK,aAAyCR,UAAUI,SAASD;IACrE;IAEA,OAAOD;AACT"}
@@ -1,2 +1,2 @@
1
- import type { SpecPipe } from '../../../../../types';
2
- export declare const pivotAxisStyle: (axisStyle: SpecPipe) => SpecPipe;
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const pivotAxisStyle: (axisStyle: VChartSpecPipe) => VChartSpecPipe;