@visactor/vseed 0.3.2 → 0.3.4

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 (287) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/builder.d.ts +1176 -0
  4. package/dist/esm/dataReshape/dataReshapeByEncoding.d.ts +1 -1
  5. package/dist/esm/dataReshape/dataReshapeByEncoding.js.map +1 -1
  6. package/dist/esm/dataReshape/foldMeasures.js +12 -11
  7. package/dist/esm/dataReshape/foldMeasures.js.map +1 -1
  8. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js +3 -1
  9. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js.map +1 -1
  10. package/dist/esm/pipeline/advanced/chart/pipes/config/column.js +1 -0
  11. package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -1
  12. package/dist/esm/pipeline/advanced/chart/pipes/config/heatmap.d.ts +2 -0
  13. package/dist/esm/pipeline/advanced/chart/pipes/config/heatmap.js +31 -0
  14. package/dist/esm/pipeline/advanced/chart/pipes/config/heatmap.js.map +1 -0
  15. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +1 -0
  16. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
  17. package/dist/esm/pipeline/advanced/chart/pipes/config/index.d.ts +2 -2
  18. package/dist/esm/pipeline/advanced/chart/pipes/config/index.js +1 -1
  19. package/dist/esm/pipeline/advanced/chart/pipes/config/index.js.map +1 -1
  20. package/dist/esm/pipeline/advanced/chart/pipes/config/line.js +1 -0
  21. package/dist/esm/pipeline/advanced/chart/pipes/config/line.js.map +1 -1
  22. package/dist/esm/pipeline/advanced/chart/pipes/config/pie.js +2 -1
  23. package/dist/esm/pipeline/advanced/chart/pipes/config/pie.js.map +1 -1
  24. package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js +1 -0
  25. package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js.map +1 -1
  26. package/dist/esm/pipeline/advanced/chart/pipes/dimensions/addPivotDimensionsForScatter.d.ts +2 -0
  27. package/dist/esm/pipeline/advanced/chart/pipes/dimensions/addPivotDimensionsForScatter.js +29 -0
  28. package/dist/esm/pipeline/advanced/chart/pipes/dimensions/addPivotDimensionsForScatter.js.map +1 -0
  29. package/dist/esm/pipeline/advanced/chart/pipes/dimensions/index.d.ts +1 -0
  30. package/dist/esm/pipeline/advanced/chart/pipes/dimensions/index.js +1 -0
  31. package/dist/esm/pipeline/advanced/chart/pipes/encoding/heatmap.js +2 -6
  32. package/dist/esm/pipeline/advanced/chart/pipes/encoding/heatmap.js.map +1 -1
  33. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js +13 -4
  34. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js.map +1 -1
  35. package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasuresForScatter.js +16 -24
  36. package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasuresForScatter.js.map +1 -1
  37. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
  38. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  39. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +2 -1
  40. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
  41. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +10 -6
  42. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
  43. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js.map +1 -1
  44. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js +5 -2
  45. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
  46. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +4 -2
  47. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
  48. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +2 -1
  49. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -1
  50. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js +5 -2
  51. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
  52. package/dist/esm/pipeline/advanced/table/pipes/default/defaultDimensions.js.map +1 -1
  53. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js.map +1 -1
  54. package/dist/esm/pipeline/spec/chart/pipeline/area.js +3 -1
  55. package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
  56. package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js +3 -1
  57. package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
  58. package/dist/esm/pipeline/spec/chart/pipeline/bar.js +3 -1
  59. package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
  60. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +3 -1
  61. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
  62. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +3 -1
  63. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
  64. package/dist/esm/pipeline/spec/chart/pipeline/column.js +3 -1
  65. package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
  66. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +3 -1
  67. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
  68. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +3 -1
  69. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
  70. package/dist/esm/pipeline/spec/chart/pipeline/donut.js +5 -2
  71. package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
  72. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js +3 -2
  73. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
  74. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js +8 -5
  75. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
  76. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +3 -1
  77. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
  78. package/dist/esm/pipeline/spec/chart/pipeline/line.js +3 -1
  79. package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
  80. package/dist/esm/pipeline/spec/chart/pipeline/pie.js +5 -2
  81. package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
  82. package/dist/esm/pipeline/spec/chart/pipeline/rose.js +3 -2
  83. package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
  84. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +3 -2
  85. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
  86. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +3 -1
  87. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
  88. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js +13 -13
  89. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js.map +1 -1
  90. package/dist/esm/pipeline/spec/chart/pipes/brush/brush.d.ts +2 -0
  91. package/dist/esm/pipeline/spec/chart/pipes/brush/brush.js +39 -0
  92. package/dist/esm/pipeline/spec/chart/pipes/brush/brush.js.map +1 -0
  93. package/dist/esm/pipeline/spec/chart/pipes/brush/index.d.ts +1 -0
  94. package/dist/esm/pipeline/spec/chart/pipes/brush/index.js +1 -0
  95. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js +3 -3
  96. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js.map +1 -1
  97. package/dist/esm/pipeline/spec/chart/pipes/color/index.d.ts +0 -1
  98. package/dist/esm/pipeline/spec/chart/pipes/color/index.js +1 -2
  99. package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
  100. package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
  101. package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +1 -0
  102. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +2 -0
  103. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  104. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js +2 -2
  105. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
  106. package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js.map +1 -1
  107. package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js +2 -1
  108. package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js.map +1 -1
  109. package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.js +17 -8
  110. package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.js.map +1 -1
  111. package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.js.map +1 -1
  112. package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js +2 -1
  113. package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js.map +1 -1
  114. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/heatmapColorDomain.d.ts +2 -0
  115. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/heatmapColorDomain.js +18 -0
  116. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/heatmapColorDomain.js.map +1 -0
  117. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.d.ts +1 -0
  118. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.js +2 -1
  119. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js +13 -7
  120. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
  121. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js +12 -3
  122. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
  123. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +2 -2
  124. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  125. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
  126. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js +12 -3
  127. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js.map +1 -1
  128. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotTitle.js +4 -2
  129. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotTitle.js.map +1 -1
  130. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.d.ts +1 -1
  131. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +8 -7
  132. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
  133. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +1 -1
  134. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
  135. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.d.ts +1 -1
  136. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js +9 -2
  137. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
  138. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js +4 -1
  139. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js.map +1 -1
  140. package/dist/esm/pipeline/spec/table/pipes/init/table.js +4 -1
  141. package/dist/esm/pipeline/spec/table/pipes/init/table.js.map +1 -1
  142. package/dist/esm/pipeline/utils/chatType.js +24 -4
  143. package/dist/esm/pipeline/utils/chatType.js.map +1 -1
  144. package/dist/esm/pipeline/utils/measures/typeGuard.d.ts +1 -1
  145. package/dist/esm/pipeline/utils/measures/typeGuard.js +30 -6
  146. package/dist/esm/pipeline/utils/measures/typeGuard.js.map +1 -1
  147. package/dist/esm/theme/common/brush.d.ts +3 -0
  148. package/dist/esm/theme/common/brush.js +21 -0
  149. package/dist/esm/theme/common/brush.js.map +1 -0
  150. package/dist/esm/theme/common/heatmapCell.js +4 -2
  151. package/dist/esm/theme/common/heatmapCell.js.map +1 -1
  152. package/dist/esm/theme/common/index.d.ts +1 -0
  153. package/dist/esm/theme/common/index.js +1 -0
  154. package/dist/esm/theme/common/label.d.ts +18 -0
  155. package/dist/esm/theme/common/label.js +9 -1
  156. package/dist/esm/theme/common/label.js.map +1 -1
  157. package/dist/esm/theme/dark/dark.js +4 -2
  158. package/dist/esm/theme/dark/dark.js.map +1 -1
  159. package/dist/esm/theme/light/light.js +4 -2
  160. package/dist/esm/theme/light/light.js.map +1 -1
  161. package/dist/esm/types/advancedVSeed.d.ts +392 -0
  162. package/dist/esm/types/chartType/area/area.d.ts +6 -1
  163. package/dist/esm/types/chartType/area/zArea.d.ts +24 -0
  164. package/dist/esm/types/chartType/area/zArea.js +2 -1
  165. package/dist/esm/types/chartType/area/zArea.js.map +1 -1
  166. package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +6 -1
  167. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +24 -0
  168. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js +2 -1
  169. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
  170. package/dist/esm/types/chartType/bar/bar.d.ts +6 -1
  171. package/dist/esm/types/chartType/bar/zBar.d.ts +24 -0
  172. package/dist/esm/types/chartType/bar/zBar.js +2 -1
  173. package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
  174. package/dist/esm/types/chartType/barParallel/barParallel.d.ts +6 -1
  175. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +24 -0
  176. package/dist/esm/types/chartType/barParallel/zBarParallel.js +2 -1
  177. package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
  178. package/dist/esm/types/chartType/barPercent/barPercent.d.ts +6 -1
  179. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +24 -0
  180. package/dist/esm/types/chartType/barPercent/zBarPercent.js +2 -1
  181. package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
  182. package/dist/esm/types/chartType/boxPlot/boxPlot.d.ts +6 -1
  183. package/dist/esm/types/chartType/boxPlot/zBoxPlot.d.ts +24 -0
  184. package/dist/esm/types/chartType/boxPlot/zBoxPlot.js +2 -1
  185. package/dist/esm/types/chartType/boxPlot/zBoxPlot.js.map +1 -1
  186. package/dist/esm/types/chartType/column/column.d.ts +6 -1
  187. package/dist/esm/types/chartType/column/zColumn.d.ts +24 -0
  188. package/dist/esm/types/chartType/column/zColumn.js +2 -1
  189. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  190. package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +6 -1
  191. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +24 -0
  192. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +2 -1
  193. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
  194. package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +6 -1
  195. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +24 -0
  196. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +2 -1
  197. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
  198. package/dist/esm/types/chartType/donut/donut.d.ts +6 -0
  199. package/dist/esm/types/chartType/donut/zDonut.d.ts +24 -0
  200. package/dist/esm/types/chartType/donut/zDonut.js +2 -1
  201. package/dist/esm/types/chartType/donut/zDonut.js.map +1 -1
  202. package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +6 -1
  203. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +24 -0
  204. package/dist/esm/types/chartType/dualAxis/zDualAxis.js +2 -1
  205. package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
  206. package/dist/esm/types/chartType/funnel/funnel.d.ts +6 -0
  207. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +24 -0
  208. package/dist/esm/types/chartType/funnel/zFunnel.js +2 -1
  209. package/dist/esm/types/chartType/funnel/zFunnel.js.map +1 -1
  210. package/dist/esm/types/chartType/heatmap/heatmap.d.ts +6 -0
  211. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +24 -0
  212. package/dist/esm/types/chartType/heatmap/zHeatmap.js +2 -1
  213. package/dist/esm/types/chartType/heatmap/zHeatmap.js.map +1 -1
  214. package/dist/esm/types/chartType/histogram/histogram.d.ts +6 -1
  215. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +24 -0
  216. package/dist/esm/types/chartType/histogram/zHistogram.js +2 -1
  217. package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
  218. package/dist/esm/types/chartType/line/line.d.ts +6 -1
  219. package/dist/esm/types/chartType/line/zLine.d.ts +24 -0
  220. package/dist/esm/types/chartType/line/zLine.js +2 -1
  221. package/dist/esm/types/chartType/line/zLine.js.map +1 -1
  222. package/dist/esm/types/chartType/pie/pie.d.ts +6 -0
  223. package/dist/esm/types/chartType/pie/zPie.d.ts +24 -0
  224. package/dist/esm/types/chartType/pie/zPie.js +2 -1
  225. package/dist/esm/types/chartType/pie/zPie.js.map +1 -1
  226. package/dist/esm/types/chartType/radar/radar.d.ts +6 -0
  227. package/dist/esm/types/chartType/radar/zRadar.d.ts +24 -0
  228. package/dist/esm/types/chartType/radar/zRadar.js +2 -1
  229. package/dist/esm/types/chartType/radar/zRadar.js.map +1 -1
  230. package/dist/esm/types/chartType/rose/rose.d.ts +6 -0
  231. package/dist/esm/types/chartType/rose/zRose.d.ts +24 -0
  232. package/dist/esm/types/chartType/rose/zRose.js +2 -1
  233. package/dist/esm/types/chartType/rose/zRose.js.map +1 -1
  234. package/dist/esm/types/chartType/roseParallel/roseParallel.d.ts +6 -0
  235. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +24 -0
  236. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js +2 -1
  237. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js.map +1 -1
  238. package/dist/esm/types/chartType/scatter/scatter.d.ts +6 -1
  239. package/dist/esm/types/chartType/scatter/zScatter.d.ts +24 -0
  240. package/dist/esm/types/chartType/scatter/zScatter.js +2 -1
  241. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  242. package/dist/esm/types/properties/brush/brush.d.ts +69 -0
  243. package/dist/esm/types/properties/brush/brush.js +0 -0
  244. package/dist/esm/types/properties/brush/index.d.ts +4 -0
  245. package/dist/esm/types/properties/brush/index.js +2 -0
  246. package/dist/esm/types/properties/brush/zBrush.d.ts +39 -0
  247. package/dist/esm/types/properties/brush/zBrush.js +30 -0
  248. package/dist/esm/types/properties/brush/zBrush.js.map +1 -0
  249. package/dist/esm/types/properties/config/area.d.ts +26 -0
  250. package/dist/esm/types/properties/config/area.js +3 -1
  251. package/dist/esm/types/properties/config/area.js.map +1 -1
  252. package/dist/esm/types/properties/config/bar.d.ts +39 -0
  253. package/dist/esm/types/properties/config/bar.js +3 -1
  254. package/dist/esm/types/properties/config/bar.js.map +1 -1
  255. package/dist/esm/types/properties/config/column.d.ts +39 -0
  256. package/dist/esm/types/properties/config/column.js +3 -1
  257. package/dist/esm/types/properties/config/column.js.map +1 -1
  258. package/dist/esm/types/properties/config/config.d.ts +196 -0
  259. package/dist/esm/types/properties/config/heatmap/heatmap.d.ts +4 -0
  260. package/dist/esm/types/properties/config/heatmap/zHeatmap.d.ts +1 -0
  261. package/dist/esm/types/properties/config/heatmap/zHeatmap.js +2 -1
  262. package/dist/esm/types/properties/config/heatmap/zHeatmap.js.map +1 -1
  263. package/dist/esm/types/properties/config/heatmap.d.ts +14 -0
  264. package/dist/esm/types/properties/config/heatmap.js +3 -1
  265. package/dist/esm/types/properties/config/heatmap.js.map +1 -1
  266. package/dist/esm/types/properties/config/histogram.d.ts +13 -0
  267. package/dist/esm/types/properties/config/histogram.js +3 -1
  268. package/dist/esm/types/properties/config/histogram.js.map +1 -1
  269. package/dist/esm/types/properties/config/line.d.ts +13 -0
  270. package/dist/esm/types/properties/config/line.js +3 -1
  271. package/dist/esm/types/properties/config/line.js.map +1 -1
  272. package/dist/esm/types/properties/config/pie.d.ts +39 -0
  273. package/dist/esm/types/properties/config/pie.js +3 -1
  274. package/dist/esm/types/properties/config/pie.js.map +1 -1
  275. package/dist/esm/types/properties/config/scatter.d.ts +13 -0
  276. package/dist/esm/types/properties/config/scatter.js +3 -1
  277. package/dist/esm/types/properties/config/scatter.js.map +1 -1
  278. package/dist/esm/types/properties/index.d.ts +1 -0
  279. package/dist/esm/types/properties/index.js +1 -0
  280. package/dist/esm/types/properties/theme/customTheme.d.ts +392 -0
  281. package/dist/esm/types/zVseed.d.ts +480 -0
  282. package/dist/umd/index.js +500 -179
  283. package/dist/umd/index.js.map +1 -1
  284. package/package.json +4 -4
  285. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.d.ts +0 -2
  286. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js +0 -17
  287. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/line.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n xBand,\n yLinear,\n initLine,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n lineStyle,\n verticalCrosshairLine,\n pointStateDimensionHover,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorLineStyleFill,\n colorPointStyleFill,\n pivotColorLegend,\n pivotTitle,\n pivotAxisStyle,\n splitLine,\n dimensionLinkage,\n} from '../pipes'\n\nconst line: VChartSpecPipeline = [\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n yLinear,\n verticalCrosshairLine,\n colorAdapter(discreteLegend, colorLegend),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n]\n\nconst pivotLine: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n pivotAxisStyle(yLinear),\n verticalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const lineSpecPipeline = [pivotAdapter(line, pivotLine)]\n"],"names":["line","initLine","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","xBand","yLinear","verticalCrosshairLine","discreteLegend","colorLegend","colorPointStyleFill","pointStyle","pointStateDimensionHover","colorLineStyleFill","lineStyle","label","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","splitLine","pivotLine","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","lineSpecPipeline","pivotAdapter"],"mappings":";AAyCA,MAAMA,OAA2B;IAC/BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAR,aAAaS,gBAAgBC;IAC7BC,oBAAoBC;IACpBC;IACAC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,YAAoC;IACxCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd7B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAuB,eAAetB;QACfC;QACAG,oBAAoBC;QACpBC;QACAC,mBAAmBC;QACnBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDQ;IACAC;IACAC;IACAhC,aAAaiC,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,mBAAmB;IAACC,aAAavC,MAAMyB;CAAW"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/line.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n xBand,\n yLinear,\n initLine,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n lineStyle,\n verticalCrosshairLine,\n pointStateDimensionHover,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorLineStyleFill,\n colorPointStyleFill,\n pivotColorLegend,\n pivotTitle,\n pivotAxisStyle,\n splitLine,\n dimensionLinkage,\n brush,\n} from '../pipes'\n\nconst line: VChartSpecPipeline = [\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n yLinear,\n brush,\n verticalCrosshairLine,\n colorAdapter(discreteLegend, colorLegend),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n]\n\nconst pivotLine: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n pivotAxisStyle(yLinear),\n brush,\n verticalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const lineSpecPipeline = [pivotAdapter(line, pivotLine)]\n"],"names":["line","initLine","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","xBand","yLinear","brush","verticalCrosshairLine","discreteLegend","colorLegend","colorPointStyleFill","pointStyle","pointStateDimensionHover","colorLineStyleFill","lineStyle","label","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","splitLine","pivotLine","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","lineSpecPipeline","pivotAdapter"],"mappings":";AA0CA,MAAMA,OAA2B;IAC/BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,gBAAgBC;IAC7BC,oBAAoBC;IACpBC;IACAC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,YAAoC;IACxCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd9B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAwB,eAAevB;QACfC;QACAC;QACAG,oBAAoBC;QACpBC;QACAC,mBAAmBC;QACnBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDQ;IACAC;IACAC;IACAjC,aAAakC,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,mBAAmB;IAACC,aAAaxC,MAAM0B;CAAW"}
@@ -1,10 +1,11 @@
1
- import { addRegionPadding, annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorPieStyleFill, datasetPivot, datasetXY, discreteLegend, initPie, initPivot, labelPie, linearColor, pieStyle, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotHideIndicatorName, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, progressive, tooltip } from "../pipes/index.js";
1
+ import { addRegionPadding, annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, brush, color, colorAdapter, colorLegend, colorPieStyleFill, datasetPivot, datasetXY, dimensionLinkage, discreteLegend, initPie, initPivot, labelPie, linearColor, pieStyle, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotHideIndicatorName, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, progressive, tooltip } from "../pipes/index.js";
2
2
  const pie = [
3
3
  initPie,
4
4
  colorAdapter(color, linearColor),
5
5
  backgroundColor,
6
6
  datasetXY,
7
7
  progressive,
8
+ brush,
8
9
  colorPieStyleFill(pieStyle),
9
10
  colorAdapter(discreteLegend, colorLegend),
10
11
  labelPie,
@@ -26,6 +27,7 @@ const pivotPie = [
26
27
  backgroundColor,
27
28
  datasetXY,
28
29
  progressive,
30
+ brush,
29
31
  colorPieStyleFill(pieStyle),
30
32
  labelPie,
31
33
  tooltip,
@@ -38,7 +40,8 @@ const pivotPie = [
38
40
  pivotRowDimensions,
39
41
  pivotColumnDimensions,
40
42
  pivotTitle,
41
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
43
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
44
+ dimensionLinkage
42
45
  ];
43
46
  const pieSpecPipeline = [
44
47
  pivotAdapter(pie, pivotPie)
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/pie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/pie.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n backgroundColor,\n color,\n datasetXY,\n datasetPivot,\n initPie,\n initPivot,\n discreteLegend,\n pivotAdapter,\n pivotColumnDimensions,\n pivotGridStyle,\n pivotIndicators,\n pivotIndicatorsAsRow,\n pivotDiscreteLegend,\n pivotRowDimensions,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n progressive,\n pieStyle,\n colorPieStyleFill,\n linearColor,\n colorAdapter,\n colorLegend,\n pivotColorLegend,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n} from '../pipes'\n\nconst pie: VChartSpecPipeline = [\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n colorPieStyleFill(pieStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotPie: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n colorPieStyleFill(pieStyle),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n addRegionPadding,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const pieSpecPipeline = [pivotAdapter(pie, pivotPie)]\n"],"names":["pie","initPie","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","colorPieStyleFill","pieStyle","discreteLegend","colorLegend","labelPie","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotPie","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","pieSpecPipeline","pivotAdapter"],"mappings":";AAkCA,MAAMA,MAA0B;IAC9BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC,kBAAkBC;IAClBP,aAAaQ,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,WAAmC;IACvCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdvB;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC,kBAAkBC;QAClBG;QACAC;QACAC;QACAC;QACAC;QACAC;QACAQ;KACD;IACDC;IACAC;IACAC;IACA1B,aAAa2B,qBAAqBC;CACnC;AAEM,MAAMC,kBAAkB;IAACC,aAAahC,KAAKkB;CAAU"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/pie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/pie.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n backgroundColor,\n color,\n datasetXY,\n datasetPivot,\n initPie,\n initPivot,\n discreteLegend,\n pivotAdapter,\n pivotColumnDimensions,\n pivotGridStyle,\n pivotIndicators,\n pivotIndicatorsAsRow,\n pivotDiscreteLegend,\n pivotRowDimensions,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n progressive,\n pieStyle,\n colorPieStyleFill,\n linearColor,\n colorAdapter,\n colorLegend,\n pivotColorLegend,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n brush,\n dimensionLinkage,\n} from '../pipes'\n\nconst pie: VChartSpecPipeline = [\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n brush,\n colorPieStyleFill(pieStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotPie: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n brush,\n colorPieStyleFill(pieStyle),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n addRegionPadding,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const pieSpecPipeline = [pivotAdapter(pie, pivotPie)]\n"],"names":["pie","initPie","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","brush","colorPieStyleFill","pieStyle","discreteLegend","colorLegend","labelPie","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotPie","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","pieSpecPipeline","pivotAdapter"],"mappings":";AAoCA,MAAMA,MAA0B;IAC9BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,kBAAkBC;IAClBR,aAAaS,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,WAAmC;IACvCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdxB;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC,kBAAkBC;QAClBG;QACAC;QACAC;QACAC;QACAC;QACAC;QACAQ;KACD;IACDC;IACAC;IACAC;IACA3B,aAAa4B,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,kBAAkB;IAACC,aAAalC,KAAKmB;CAAU"}
@@ -1,4 +1,4 @@
1
- import { addRegionPadding, backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, discreteLegend, initPivot, initRose, labelPie, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotHideIndicatorName, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, progressive, radiusAxis, roseStyle, stackCornerRadius, stackInverse, tooltip, verticalCrosshairRect } from "../pipes/index.js";
1
+ import { addRegionPadding, backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, dimensionLinkage, discreteLegend, initPivot, initRose, labelPie, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotHideIndicatorName, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, progressive, radiusAxis, roseStyle, stackCornerRadius, stackInverse, tooltip, verticalCrosshairRect } from "../pipes/index.js";
2
2
  const rose = [
3
3
  initRose,
4
4
  stackCornerRadius,
@@ -38,7 +38,8 @@ const pivotRose = [
38
38
  pivotRowDimensions,
39
39
  pivotColumnDimensions,
40
40
  pivotTitle,
41
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
41
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
42
+ dimensionLinkage
42
43
  ];
43
44
  const roseSpecPipeline = [
44
45
  pivotAdapter(rose, pivotRose)
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/rose.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/rose.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n stackInverse,\n verticalCrosshairRect,\n stackCornerRadius,\n initRose,\n radiusAxis,\n progressive,\n linearColor,\n colorAdapter,\n pivotColorLegend,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n} from '../pipes'\n\nconst rose: VChartSpecPipeline = [\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n]\n\nconst pivotRose: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRose,\n addRegionPadding,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n labelPie,\n tooltip,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const roseSpecPipeline = [pivotAdapter(rose, pivotRose)]\n"],"names":["rose","initRose","stackCornerRadius","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","verticalCrosshairRect","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","labelPie","tooltip","pivotRose","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","roseSpecPipeline","pivotAdapter"],"mappings":";AAkCA,MAAMA,OAA2B;IAC/BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBT,aAAaU,gBAAgBC;IAC7BC;IACAC;CACD;AAED,MAAMC,YAAoC;IACxCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdvB;QACAwB;QACAvB;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC,mBAAmBC;QACnBG;QACAC;KACD;IACDS;IACAC;IACAC;IACAxB,aAAayB,qBAAqBC;CACnC;AAEM,MAAMC,mBAAmB;IAACC,aAAahC,MAAMkB;CAAW"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/rose.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/rose.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n stackInverse,\n verticalCrosshairRect,\n stackCornerRadius,\n initRose,\n radiusAxis,\n progressive,\n linearColor,\n colorAdapter,\n pivotColorLegend,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n dimensionLinkage,\n} from '../pipes'\n\nconst rose: VChartSpecPipeline = [\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n]\n\nconst pivotRose: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRose,\n addRegionPadding,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n labelPie,\n tooltip,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const roseSpecPipeline = [pivotAdapter(rose, pivotRose)]\n"],"names":["rose","initRose","stackCornerRadius","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","verticalCrosshairRect","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","labelPie","tooltip","pivotRose","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","roseSpecPipeline","pivotAdapter"],"mappings":";AAmCA,MAAMA,OAA2B;IAC/BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBT,aAAaU,gBAAgBC;IAC7BC;IACAC;CACD;AAED,MAAMC,YAAoC;IACxCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdvB;QACAwB;QACAvB;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC,mBAAmBC;QACnBG;QACAC;KACD;IACDS;IACAC;IACAC;IACAxB,aAAayB,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,mBAAmB;IAACC,aAAajC,MAAMkB;CAAW"}
@@ -1,4 +1,4 @@
1
- import { addRegionPadding, annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, discreteLegend, initPivot, initRoseParallel, labelPie, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotHideIndicatorName, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, progressive, radiusAxis, roseStyle, stackCornerRadius, tooltip, verticalCrosshairRect } from "../pipes/index.js";
1
+ import { addRegionPadding, annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, dimensionLinkage, discreteLegend, initPivot, initRoseParallel, labelPie, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotHideIndicatorName, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, progressive, radiusAxis, roseStyle, stackCornerRadius, tooltip, verticalCrosshairRect } from "../pipes/index.js";
2
2
  const roseParallel = [
3
3
  initRoseParallel,
4
4
  stackCornerRadius,
@@ -44,7 +44,8 @@ const pivotRoseParallel = [
44
44
  pivotRowDimensions,
45
45
  pivotColumnDimensions,
46
46
  pivotTitle,
47
- colorAdapter(pivotDiscreteLegend, pivotColorLegend)
47
+ colorAdapter(pivotDiscreteLegend, pivotColorLegend),
48
+ dimensionLinkage
48
49
  ];
49
50
  const roseParallelSpecPipeline = [
50
51
  pivotAdapter(roseParallel, pivotRoseParallel)
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/roseParallel.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pivotIndicators,\n initPivot,\n datasetPivot,\n pivotAdapter,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n verticalCrosshairRect,\n stackCornerRadius,\n initRoseParallel,\n radiusAxis,\n progressive,\n pivotColorLegend,\n colorAdapter,\n linearColor,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n} from '../pipes'\n\nconst roseParallel: VChartSpecPipeline = [\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotRoseParallel: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRoseParallel,\n addRegionPadding,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const roseParallelSpecPipeline = [pivotAdapter(roseParallel, pivotRoseParallel)]\n"],"names":["roseParallel","initRoseParallel","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","labelPie","tooltip","verticalCrosshairRect","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotRoseParallel","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","roseParallelSpecPipeline","pivotAdapter"],"mappings":";AAqCA,MAAMA,eAAmC;IACvCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBR,aAAaS,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,oBAA4C;IAChDC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd1B;QACA2B;QACA1B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAO;QACAN,mBAAmBC;QACnBG;QACAC;QACAE;QACAC;QACAC;QACAC;KACD;IACDS;IACAC;IACAC;IACA5B,aAAa6B,qBAAqBC;CACnC;AAEM,MAAMC,2BAA2B;IAACC,aAAanC,cAAcqB;CAAmB"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/roseParallel.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pivotIndicators,\n initPivot,\n datasetPivot,\n pivotAdapter,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n verticalCrosshairRect,\n stackCornerRadius,\n initRoseParallel,\n radiusAxis,\n progressive,\n pivotColorLegend,\n colorAdapter,\n linearColor,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n dimensionLinkage,\n} from '../pipes'\n\nconst roseParallel: VChartSpecPipeline = [\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotRoseParallel: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRoseParallel,\n addRegionPadding,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const roseParallelSpecPipeline = [pivotAdapter(roseParallel, pivotRoseParallel)]\n"],"names":["roseParallel","initRoseParallel","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","labelPie","tooltip","verticalCrosshairRect","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotRoseParallel","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","roseParallelSpecPipeline","pivotAdapter"],"mappings":";AAsCA,MAAMA,eAAmC;IACvCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBR,aAAaS,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,oBAA4C;IAChDC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd1B;QACA2B;QACA1B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAO;QACAN,mBAAmBC;QACnBG;QACAC;QACAE;QACAC;QACAC;QACAC;KACD;IACDS;IACAC;IACAC;IACA5B,aAAa6B,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,2BAA2B;IAACC,aAAapC,cAAcqB;CAAmB"}
@@ -1,4 +1,4 @@
1
- import { annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorPointStyleFill, datasetPivot, datasetScatter, dimensionLinkage, discreteLegend, horizontalCrosshairLine, initPivot, initScatter, labelScatter, linearColor, linearRegressionLine, logisticRegressionLine, lowessRegressionLine, pivotAdapter, pivotAxisStyle, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, pointStateHover, pointStyle, polynomialRegressionLine, progressive, scatterSize, tooltipScatter, verticalCrosshairLine, xLinear, yLinear } from "../pipes/index.js";
1
+ import { annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, brush, color, colorAdapter, colorLegend, colorPointStyleFill, datasetPivot, datasetScatter, dimensionLinkage, discreteLegend, horizontalCrosshairLine, initPivot, initScatter, labelScatter, linearColor, linearRegressionLine, logisticRegressionLine, lowessRegressionLine, pivotAdapter, pivotAxisStyle, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, pointStateHover, pointStyle, polynomialRegressionLine, progressive, scatterSize, tooltipScatter, verticalCrosshairLine, xLinear, yLinear } from "../pipes/index.js";
2
2
  const scatter = [
3
3
  initScatter,
4
4
  colorAdapter(color, linearColor),
@@ -7,6 +7,7 @@ const scatter = [
7
7
  progressive,
8
8
  xLinear,
9
9
  yLinear,
10
+ brush,
10
11
  scatterSize,
11
12
  labelScatter,
12
13
  tooltipScatter,
@@ -37,6 +38,7 @@ const pivotScatter = [
37
38
  progressive,
38
39
  xLinear,
39
40
  pivotAxisStyle(yLinear),
41
+ brush,
40
42
  scatterSize,
41
43
  labelScatter,
42
44
  tooltipScatter,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/scatter.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n yLinear,\n backgroundColor,\n tooltipScatter,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n verticalCrosshairLine,\n xLinear,\n horizontalCrosshairLine,\n pointStateHover,\n initScatter,\n progressive,\n datasetScatter,\n linearColor,\n colorAdapter,\n colorPointStyleFill,\n colorLegend,\n pivotColorLegend,\n labelScatter,\n scatterSize,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n pivotAxisStyle,\n pivotTitle,\n dimensionLinkage,\n} from '../pipes'\n\nconst scatter: VChartSpecPipeline = [\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n]\n\nconst pivotScatter: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n pivotAxisStyle(yLinear),\n scatterSize,\n labelScatter,\n tooltipScatter,\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const scatterSpecPipeline = [pivotAdapter(scatter, pivotScatter)]\n"],"names":["scatter","initScatter","colorAdapter","color","linearColor","backgroundColor","datasetScatter","progressive","xLinear","yLinear","scatterSize","labelScatter","tooltipScatter","discreteLegend","colorLegend","verticalCrosshairLine","horizontalCrosshairLine","colorPointStyleFill","pointStyle","pointStateHover","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","linearRegressionLine","lowessRegressionLine","polynomialRegressionLine","logisticRegressionLine","pivotScatter","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","scatterSpecPipeline","pivotAdapter"],"mappings":";AA4CA,MAAMA,UAA8B;IAClCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAV,aAAaW,gBAAgBC;IAC7BC;IACAC;IACAC,oBAAoBC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAAuC;IAC3CC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdhC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACA0B,eAAezB;QACfC;QACAC;QACAC;QACAG;QACAC;QACAC,oBAAoBC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDQ;IACAC;IACAC;IACAnC,aAAaoC,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,sBAAsB;IAACC,aAAa1C,SAAS4B;CAAc"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/scatter.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n yLinear,\n backgroundColor,\n tooltipScatter,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n verticalCrosshairLine,\n xLinear,\n horizontalCrosshairLine,\n pointStateHover,\n initScatter,\n progressive,\n datasetScatter,\n linearColor,\n colorAdapter,\n colorPointStyleFill,\n colorLegend,\n pivotColorLegend,\n labelScatter,\n scatterSize,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n pivotAxisStyle,\n pivotTitle,\n dimensionLinkage,\n brush,\n} from '../pipes'\n\nconst scatter: VChartSpecPipeline = [\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n brush,\n scatterSize,\n labelScatter,\n tooltipScatter,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n]\n\nconst pivotScatter: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n pivotAxisStyle(yLinear),\n brush,\n scatterSize,\n labelScatter,\n tooltipScatter,\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const scatterSpecPipeline = [pivotAdapter(scatter, pivotScatter)]\n"],"names":["scatter","initScatter","colorAdapter","color","linearColor","backgroundColor","datasetScatter","progressive","xLinear","yLinear","brush","scatterSize","labelScatter","tooltipScatter","discreteLegend","colorLegend","verticalCrosshairLine","horizontalCrosshairLine","colorPointStyleFill","pointStyle","pointStateHover","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","linearRegressionLine","lowessRegressionLine","polynomialRegressionLine","logisticRegressionLine","pivotScatter","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","scatterSpecPipeline","pivotAdapter"],"mappings":";AA6CA,MAAMA,UAA8B;IAClCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAX,aAAaY,gBAAgBC;IAC7BC;IACAC;IACAC,oBAAoBC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAAuC;IAC3CC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdjC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACA2B,eAAe1B;QACfC;QACAC;QACAC;QACAC;QACAG;QACAC;QACAC,oBAAoBC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDQ;IACAC;IACAC;IACApC,aAAaqC,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,sBAAsB;IAACC,aAAa3C,SAAS6B;CAAc"}
@@ -44,19 +44,6 @@ const generateAnnotationPointPipe = (options)=>{
44
44
  confine: true,
45
45
  text: {
46
46
  text: text,
47
- style: {
48
- opacity: 0.95,
49
- visible: true,
50
- textAlign: textAlign,
51
- textBaseline: textBaseline,
52
- fill: textColor,
53
- stroke: textBackgroundColor,
54
- lineWidth: 1,
55
- fontSize: textFontSize,
56
- fontWeight: textFontWeight,
57
- dx,
58
- dy
59
- },
60
47
  labelBackground: {
61
48
  visible: textBackgroundVisible,
62
49
  padding: textBackgroundPadding,
@@ -70,6 +57,19 @@ const generateAnnotationPointPipe = (options)=>{
70
57
  dy
71
58
  }
72
59
  }
60
+ },
61
+ style: {
62
+ opacity: 0.95,
63
+ visible: true,
64
+ textAlign: textAlign,
65
+ textBaseline: textBaseline,
66
+ fill: textColor,
67
+ stroke: textBackgroundColor,
68
+ lineWidth: 1,
69
+ fontSize: textFontSize,
70
+ fontWeight: textFontWeight,
71
+ dx,
72
+ dy
73
73
  }
74
74
  }
75
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPointCommon.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/annotationPointCommon.ts"],"sourcesContent":["import type { ISpec, IMarkPointSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, Selector, Selectors, SpecPipelineContext, VChartSpecPipe, VSeed } from 'src/types'\nimport { isSubset } from './utils'\nimport { ANNOTATION_Z_INDEX } from '../../../../utils/constant'\nimport { isBarLikeChart } from 'src/pipeline/utils/chatType'\n\nexport const generateAnnotationPointPipe = (options: {\n findSelectedDatas?: (\n dataset: Datum[],\n selector: Selector | Selectors | undefined | null,\n spec: ISpec,\n context: SpecPipelineContext,\n ) => Datum[]\n generateMarkPoint?: (datum: Datum, spec: ISpec, context: SpecPipelineContext) => IMarkPointSpec[] | undefined\n}) => {\n const findSelectedDatas = options.findSelectedDatas ?? ((dataset, s) => dataset.filter((datum) => selector(datum, s)))\n const generateMarkPoint =\n options.generateMarkPoint ??\n ((datum: Datum) => {\n return [\n {\n coordinate: (data: Datum[]) => {\n return data.find((item) => isSubset(datum, item))\n },\n },\n ]\n })\n\n return ((spec: ISpec, context: SpecPipelineContext) => {\n const { advancedVSeed, vseed } = context\n const { annotation, config } = advancedVSeed\n\n if (!annotation || !annotation.annotationPoint) {\n return spec\n }\n\n const theme = config?.[vseed.chartType as 'column']?.annotation?.annotationPoint\n const { annotationPoint } = annotation\n const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [annotationPoint]\n const isHorizontalBar = isBarLikeChart(advancedVSeed as VSeed)\n const defaultStyle = isHorizontalBar\n ? {\n textAlign: 'right',\n textBaseline: 'middle',\n }\n : {\n textAlign: 'center',\n textBaseline: 'top',\n }\n\n const markPoint = annotationPointList.flatMap((annotationPoint) => {\n const {\n selector: selectorPoint,\n text = '',\n textColor = theme?.textColor ?? '#ffffff',\n textFontSize = theme?.textFontSize ?? 12,\n textFontWeight = theme?.textFontWeight ?? 400,\n textAlign = defaultStyle.textAlign,\n textBaseline = defaultStyle.textBaseline,\n textBackgroundBorderColor = theme?.textBackgroundBorderColor,\n textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4,\n textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1,\n textBackgroundColor = theme?.textBackgroundColor ?? '#212121',\n textBackgroundPadding = theme?.textBackgroundPadding ?? 2,\n textBackgroundVisible = theme?.textBackgroundVisible ?? true,\n offsetX = theme?.offsetX ?? 0,\n offsetY = theme?.offsetY ?? 0,\n } = annotationPoint\n\n const dataset = advancedVSeed.dataset.flat()\n const selectedData = selectorPoint ? findSelectedDatas(dataset, selectorPoint, spec, context) : []\n const dx = -10 - (isHorizontalBar ? (textFontSize as number) : 0) // 由于vchart tag实现问题,需要设置这个强制偏移量\n const dy = isHorizontalBar ? 0 : (textFontSize as number)\n const markPointStyle = {\n zIndex: ANNOTATION_Z_INDEX,\n regionRelative: true,\n itemLine: {\n visible: false,\n },\n itemContent: {\n offsetY,\n offsetX,\n confine: true,\n text: {\n text: text,\n style: {\n opacity: 0.95,\n visible: true,\n textAlign: textAlign,\n textBaseline: textBaseline,\n fill: textColor,\n stroke: textBackgroundColor,\n lineWidth: 1,\n fontSize: textFontSize,\n fontWeight: textFontWeight,\n dx,\n dy,\n },\n labelBackground: {\n visible: textBackgroundVisible,\n padding: textBackgroundPadding,\n style: {\n opacity: 0.95,\n cornerRadius: textBackgroundBorderRadius ?? 4,\n fill: textBackgroundColor,\n stroke: textBackgroundBorderColor,\n lineWidth: textBackgroundBorderWidth,\n dx,\n dy,\n },\n },\n },\n },\n } as Partial<IMarkPointSpec>\n\n return selectedData.reduce((res: IMarkPointSpec[], datum) => {\n const marks = generateMarkPoint(datum, spec, context)\n\n if (marks && marks.length) {\n marks.forEach((mark) => {\n res.push({\n ...markPointStyle,\n ...mark,\n } as IMarkPointSpec)\n })\n }\n\n return res\n }, [])\n }) as unknown as IMarkPointSpec[]\n\n return {\n ...spec,\n markPoint,\n } as ISpec\n }) as VChartSpecPipe\n}\n"],"names":["generateAnnotationPointPipe","options","findSelectedDatas","dataset","s","datum","selector","generateMarkPoint","data","item","isSubset","spec","context","advancedVSeed","vseed","annotation","config","theme","annotationPoint","annotationPointList","Array","isHorizontalBar","isBarLikeChart","defaultStyle","markPoint","selectorPoint","text","textColor","textFontSize","textFontWeight","textAlign","textBaseline","textBackgroundBorderColor","textBackgroundBorderRadius","textBackgroundBorderWidth","textBackgroundColor","textBackgroundPadding","textBackgroundVisible","offsetX","offsetY","selectedData","dx","dy","markPointStyle","ANNOTATION_Z_INDEX","res","marks","mark"],"mappings":"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"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPointCommon.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/annotationPointCommon.ts"],"sourcesContent":["import type { ISpec, IMarkPointSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, Selector, Selectors, SpecPipelineContext, VChartSpecPipe, VSeed } from 'src/types'\nimport { isSubset } from './utils'\nimport { ANNOTATION_Z_INDEX } from '../../../../utils/constant'\nimport { isBarLikeChart } from 'src/pipeline/utils/chatType'\n\nexport const generateAnnotationPointPipe = (options: {\n findSelectedDatas?: (\n dataset: Datum[],\n selector: Selector | Selectors | undefined | null,\n spec: ISpec,\n context: SpecPipelineContext,\n ) => Datum[]\n generateMarkPoint?: (datum: Datum, spec: ISpec, context: SpecPipelineContext) => IMarkPointSpec[] | undefined\n}) => {\n const findSelectedDatas = options.findSelectedDatas ?? ((dataset, s) => dataset.filter((datum) => selector(datum, s)))\n const generateMarkPoint =\n options.generateMarkPoint ??\n ((datum: Datum) => {\n return [\n {\n coordinate: (data: Datum[]) => {\n return data.find((item) => isSubset(datum, item))\n },\n },\n ]\n })\n\n return ((spec: ISpec, context: SpecPipelineContext) => {\n const { advancedVSeed, vseed } = context\n const { annotation, config } = advancedVSeed\n\n if (!annotation || !annotation.annotationPoint) {\n return spec\n }\n\n const theme = config?.[vseed.chartType as 'column']?.annotation?.annotationPoint\n const { annotationPoint } = annotation\n const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [annotationPoint]\n const isHorizontalBar = isBarLikeChart(advancedVSeed as VSeed)\n const defaultStyle = isHorizontalBar\n ? {\n textAlign: 'right',\n textBaseline: 'middle',\n }\n : {\n textAlign: 'center',\n textBaseline: 'top',\n }\n\n const markPoint = annotationPointList.flatMap((annotationPoint) => {\n const {\n selector: selectorPoint,\n text = '',\n textColor = theme?.textColor ?? '#ffffff',\n textFontSize = theme?.textFontSize ?? 12,\n textFontWeight = theme?.textFontWeight ?? 400,\n textAlign = defaultStyle.textAlign,\n textBaseline = defaultStyle.textBaseline,\n textBackgroundBorderColor = theme?.textBackgroundBorderColor,\n textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4,\n textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1,\n textBackgroundColor = theme?.textBackgroundColor ?? '#212121',\n textBackgroundPadding = theme?.textBackgroundPadding ?? 2,\n textBackgroundVisible = theme?.textBackgroundVisible ?? true,\n offsetX = theme?.offsetX ?? 0,\n offsetY = theme?.offsetY ?? 0,\n } = annotationPoint\n\n const dataset = advancedVSeed.dataset.flat()\n const selectedData = selectorPoint ? findSelectedDatas(dataset, selectorPoint, spec, context) : []\n const dx = -10 - (isHorizontalBar ? (textFontSize as number) : 0) // 由于vchart tag实现问题,需要设置这个强制偏移量\n const dy = isHorizontalBar ? 0 : (textFontSize as number)\n const markPointStyle = {\n zIndex: ANNOTATION_Z_INDEX,\n regionRelative: true,\n itemLine: {\n visible: false,\n },\n itemContent: {\n offsetY,\n offsetX,\n confine: true,\n text: {\n text: text,\n labelBackground: {\n visible: textBackgroundVisible,\n padding: textBackgroundPadding,\n style: {\n opacity: 0.95,\n cornerRadius: textBackgroundBorderRadius ?? 4,\n fill: textBackgroundColor,\n stroke: textBackgroundBorderColor,\n lineWidth: textBackgroundBorderWidth,\n dx,\n dy,\n },\n },\n },\n style: {\n opacity: 0.95,\n visible: true,\n textAlign: textAlign,\n textBaseline: textBaseline,\n fill: textColor,\n stroke: textBackgroundColor,\n lineWidth: 1,\n fontSize: textFontSize,\n fontWeight: textFontWeight,\n dx,\n dy,\n },\n },\n } as Partial<IMarkPointSpec>\n\n return selectedData.reduce((res: IMarkPointSpec[], datum) => {\n const marks = generateMarkPoint(datum, spec, context)\n\n if (marks && marks.length) {\n marks.forEach((mark) => {\n res.push({\n ...markPointStyle,\n ...mark,\n } as IMarkPointSpec)\n })\n }\n\n return res\n }, [])\n }) as unknown as IMarkPointSpec[]\n\n return {\n ...spec,\n markPoint,\n } as ISpec\n }) as VChartSpecPipe\n}\n"],"names":["generateAnnotationPointPipe","options","findSelectedDatas","dataset","s","datum","selector","generateMarkPoint","data","item","isSubset","spec","context","advancedVSeed","vseed","annotation","config","theme","annotationPoint","annotationPointList","Array","isHorizontalBar","isBarLikeChart","defaultStyle","markPoint","selectorPoint","text","textColor","textFontSize","textFontWeight","textAlign","textBaseline","textBackgroundBorderColor","textBackgroundBorderRadius","textBackgroundBorderWidth","textBackgroundColor","textBackgroundPadding","textBackgroundVisible","offsetX","offsetY","selectedData","dx","dy","markPointStyle","ANNOTATION_Z_INDEX","res","marks","mark"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const brush: VChartSpecPipe;
@@ -0,0 +1,39 @@
1
+ const brush_brush = (spec, context)=>{
2
+ const result = {
3
+ ...spec
4
+ };
5
+ const { advancedVSeed, vseed } = context;
6
+ const { brush = {}, chartType } = vseed;
7
+ const theme = advancedVSeed.config?.[chartType]?.brush ?? {};
8
+ const enable = brush.enable ?? theme?.enable;
9
+ if (false === enable) return result;
10
+ result.brush = {
11
+ visible: true,
12
+ removeOnClick: brush.removeOnClick,
13
+ brushMode: brush?.brushMode || 'single',
14
+ brushType: brush?.brushType || 'rect',
15
+ inBrush: {
16
+ opacity: theme.inBrushStyle?.opacity,
17
+ stroke: theme.inBrushStyle?.stroke,
18
+ lineWidth: theme.inBrushStyle?.lineWidth
19
+ },
20
+ outOfBrush: {
21
+ opacity: theme.outOfBrushStyle?.opacity,
22
+ stroke: theme.outOfBrushStyle?.stroke,
23
+ lineWidth: theme.outOfBrushStyle?.lineWidth
24
+ }
25
+ };
26
+ if (result.label && false !== result.label.visible) {
27
+ if (!result.label.state) result.label.state = {};
28
+ result.label.state.outOfBrush = {
29
+ opacity: result.brush.outOfBrush.opacity
30
+ };
31
+ result.label.state.inBrush = {
32
+ opacity: result.brush.inBrush.opacity
33
+ };
34
+ }
35
+ return result;
36
+ };
37
+ export { brush_brush as brush };
38
+
39
+ //# sourceMappingURL=brush.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/brush/brush.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/brush/brush.ts"],"sourcesContent":["import type { Column, VChartSpecPipe } from 'src/types'\nimport type { BrushConfig } from 'src/types/properties/brush/zBrush'\n\nexport const brush: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as any\n const { advancedVSeed, vseed } = context\n const { brush = {}, chartType } = vseed as Column\n\n const theme = (advancedVSeed.config as any)?.[chartType]?.brush ?? ({} as BrushConfig)\n\n const enable = brush.enable ?? theme?.enable\n\n if (enable === false) {\n return result\n }\n\n result.brush = {\n visible: true,\n removeOnClick: brush.removeOnClick,\n brushMode: brush?.brushMode || 'single',\n brushType: brush?.brushType || 'rect',\n inBrush: {\n opacity: theme.inBrushStyle?.opacity,\n stroke: theme.inBrushStyle?.stroke,\n lineWidth: theme.inBrushStyle?.lineWidth,\n },\n outOfBrush: {\n opacity: theme.outOfBrushStyle?.opacity,\n stroke: theme.outOfBrushStyle?.stroke,\n lineWidth: theme.outOfBrushStyle?.lineWidth,\n },\n }\n\n if (result.label && result.label.visible !== false) {\n if (!result.label.state) {\n result.label.state = {}\n }\n\n result.label.state.outOfBrush = {\n opacity: result.brush.outOfBrush.opacity,\n }\n result.label.state.inBrush = {\n opacity: result.brush.inBrush.opacity,\n }\n }\n\n return result\n}\n"],"names":["brush","spec","context","result","advancedVSeed","vseed","chartType","theme","enable"],"mappings":"AAGO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEF,QAAQ,CAAC,CAAC,EAAEM,SAAS,EAAE,GAAGD;IAElC,MAAME,QAASH,cAAc,MAAM,EAAU,CAACE,UAAU,EAAE,SAAU,CAAC;IAErE,MAAME,SAASR,MAAM,MAAM,IAAIO,OAAO;IAEtC,IAAIC,AAAW,UAAXA,QACF,OAAOL;IAGTA,OAAO,KAAK,GAAG;QACb,SAAS;QACT,eAAeH,MAAM,aAAa;QAClC,WAAWA,OAAO,aAAa;QAC/B,WAAWA,OAAO,aAAa;QAC/B,SAAS;YACP,SAASO,MAAM,YAAY,EAAE;YAC7B,QAAQA,MAAM,YAAY,EAAE;YAC5B,WAAWA,MAAM,YAAY,EAAE;QACjC;QACA,YAAY;YACV,SAASA,MAAM,eAAe,EAAE;YAChC,QAAQA,MAAM,eAAe,EAAE;YAC/B,WAAWA,MAAM,eAAe,EAAE;QACpC;IACF;IAEA,IAAIJ,OAAO,KAAK,IAAIA,AAAyB,UAAzBA,OAAO,KAAK,CAAC,OAAO,EAAY;QAClD,IAAI,CAACA,OAAO,KAAK,CAAC,KAAK,EACrBA,OAAO,KAAK,CAAC,KAAK,GAAG,CAAC;QAGxBA,OAAO,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG;YAC9B,SAASA,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO;QAC1C;QACAA,OAAO,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG;YAC3B,SAASA,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO;QACvC;IACF;IAEA,OAAOA;AACT"}
@@ -0,0 +1 @@
1
+ export * from './brush';
@@ -0,0 +1 @@
1
+ export * from "./brush.js";
@@ -6,10 +6,10 @@ function colorAdapter(ordinalPipe, linearPipe) {
6
6
  };
7
7
  }
8
8
  const isLinearColor = (advancedVSeed, vseed)=>{
9
- const { encoding } = advancedVSeed;
9
+ const { encoding, chartType } = advancedVSeed;
10
10
  const measureIdList = (vseed.measures || advancedVSeed.measures).map((measure)=>measure.id);
11
- const { color } = encoding;
12
- return color?.length === 1 && measureIdList.includes(color[0]);
11
+ const { color = [] } = encoding;
12
+ return 'heatmap' === chartType ? color.length >= 1 && color.every((c)=>measureIdList.includes(c)) : 1 === color.length && measureIdList.includes(color[0]);
13
13
  };
14
14
  const getColorMeasureId = (advancedVSeed, vseed)=>{
15
15
  if (isLinearColor(advancedVSeed, vseed)) {
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/color/colorAdapter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorAdapter.ts"],"sourcesContent":["import type { AdvancedVSeed, PivotChartSpecPipe, VChartSpecPipe, VSeed, Pipe, SpecPipelineContext } from 'src/types'\n\nexport function colorAdapter(ordinalPipe: PivotChartSpecPipe, linearPipe: PivotChartSpecPipe): PivotChartSpecPipe\nexport function colorAdapter(ordinalPipe: VChartSpecPipe, linearPipe: VChartSpecPipe): VChartSpecPipe\nexport function colorAdapter<TSpec>(\n ordinalPipe: Pipe<TSpec, SpecPipelineContext>,\n linearPipe: Pipe<TSpec, SpecPipelineContext>,\n) {\n return (spec: Partial<TSpec>, context: SpecPipelineContext) => {\n const { advancedVSeed, vseed } = context\n if (isLinearColor(advancedVSeed, vseed)) {\n return linearPipe(spec, context)\n }\n return ordinalPipe(spec, context)\n }\n}\n\nexport const isLinearColor = <T extends AdvancedVSeed, U extends VSeed>(advancedVSeed: T, vseed: U) => {\n const { encoding } = advancedVSeed\n const measureIdList = (vseed.measures || advancedVSeed.measures)!.map((measure) => measure.id)\n const { color } = encoding\n return color?.length === 1 && measureIdList.includes(color[0])\n}\n\nexport const getColorMeasureId = <T extends AdvancedVSeed, U extends VSeed>(\n advancedVSeed: T,\n vseed: U,\n): string | undefined => {\n if (isLinearColor(advancedVSeed, vseed)) {\n const { encoding } = advancedVSeed\n const { color } = encoding\n return color?.[0]\n }\n return undefined\n}\n"],"names":["colorAdapter","ordinalPipe","linearPipe","spec","context","advancedVSeed","vseed","isLinearColor","encoding","measureIdList","measure","color","getColorMeasureId"],"mappings":"AAIO,SAASA,aACdC,WAA6C,EAC7CC,UAA4C;IAE5C,OAAO,CAACC,MAAsBC;QAC5B,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;QACjC,IAAIG,cAAcF,eAAeC,QAC/B,OAAOJ,WAAWC,MAAMC;QAE1B,OAAOH,YAAYE,MAAMC;IAC3B;AACF;AAEO,MAAMG,gBAAgB,CAA2CF,eAAkBC;IACxF,MAAM,EAAEE,QAAQ,EAAE,GAAGH;IACrB,MAAMI,gBAAiBH,AAAAA,CAAAA,MAAM,QAAQ,IAAID,cAAc,QAAO,EAAI,GAAG,CAAC,CAACK,UAAYA,QAAQ,EAAE;IAC7F,MAAM,EAAEC,KAAK,EAAE,GAAGH;IAClB,OAAOG,OAAO,WAAW,KAAKF,cAAc,QAAQ,CAACE,KAAK,CAAC,EAAE;AAC/D;AAEO,MAAMC,oBAAoB,CAC/BP,eACAC;IAEA,IAAIC,cAAcF,eAAeC,QAAQ;QACvC,MAAM,EAAEE,QAAQ,EAAE,GAAGH;QACrB,MAAM,EAAEM,KAAK,EAAE,GAAGH;QAClB,OAAOG,OAAO,CAAC,EAAE;IACnB;AAEF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorAdapter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorAdapter.ts"],"sourcesContent":["import type {\n AdvancedVSeed,\n PivotChartSpecPipe,\n VChartSpecPipe,\n VSeed,\n Pipe,\n SpecPipelineContext,\n Measure,\n} from 'src/types'\n\nexport function colorAdapter(ordinalPipe: PivotChartSpecPipe, linearPipe: PivotChartSpecPipe): PivotChartSpecPipe\nexport function colorAdapter(ordinalPipe: VChartSpecPipe, linearPipe: VChartSpecPipe): VChartSpecPipe\nexport function colorAdapter<TSpec>(\n ordinalPipe: Pipe<TSpec, SpecPipelineContext>,\n linearPipe: Pipe<TSpec, SpecPipelineContext>,\n) {\n return (spec: Partial<TSpec>, context: SpecPipelineContext) => {\n const { advancedVSeed, vseed } = context\n if (isLinearColor(advancedVSeed, vseed)) {\n return linearPipe(spec, context)\n }\n return ordinalPipe(spec, context)\n }\n}\n\nexport const isLinearColor = <T extends AdvancedVSeed, U extends VSeed>(advancedVSeed: T, vseed: U) => {\n const { encoding, chartType } = advancedVSeed\n const measureIdList = (vseed.measures || advancedVSeed.measures)!.map((measure: Measure) => measure.id)\n const { color = [] } = encoding\n return chartType === 'heatmap'\n ? color!.length >= 1 && color!.every((c: string) => measureIdList.includes(c))\n : color!.length === 1 && measureIdList.includes(color![0])\n}\n\nexport const getColorMeasureId = <T extends AdvancedVSeed, U extends VSeed>(\n advancedVSeed: T,\n vseed: U,\n): string | undefined => {\n if (isLinearColor(advancedVSeed, vseed)) {\n const { encoding } = advancedVSeed\n const { color } = encoding\n return color?.[0]\n }\n return undefined\n}\n"],"names":["colorAdapter","ordinalPipe","linearPipe","spec","context","advancedVSeed","vseed","isLinearColor","encoding","chartType","measureIdList","measure","color","c","getColorMeasureId"],"mappings":"AAYO,SAASA,aACdC,WAA6C,EAC7CC,UAA4C;IAE5C,OAAO,CAACC,MAAsBC;QAC5B,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;QACjC,IAAIG,cAAcF,eAAeC,QAC/B,OAAOJ,WAAWC,MAAMC;QAE1B,OAAOH,YAAYE,MAAMC;IAC3B;AACF;AAEO,MAAMG,gBAAgB,CAA2CF,eAAkBC;IACxF,MAAM,EAAEE,QAAQ,EAAEC,SAAS,EAAE,GAAGJ;IAChC,MAAMK,gBAAiBJ,AAAAA,CAAAA,MAAM,QAAQ,IAAID,cAAc,QAAO,EAAI,GAAG,CAAC,CAACM,UAAqBA,QAAQ,EAAE;IACtG,MAAM,EAAEC,QAAQ,EAAE,EAAE,GAAGJ;IACvB,OAAOC,AAAc,cAAdA,YACHG,MAAO,MAAM,IAAI,KAAKA,MAAO,KAAK,CAAC,CAACC,IAAcH,cAAc,QAAQ,CAACG,MACzED,AAAkB,MAAlBA,MAAO,MAAM,IAAUF,cAAc,QAAQ,CAACE,KAAM,CAAC,EAAE;AAC7D;AAEO,MAAME,oBAAoB,CAC/BT,eACAC;IAEA,IAAIC,cAAcF,eAAeC,QAAQ;QACvC,MAAM,EAAEE,QAAQ,EAAE,GAAGH;QACrB,MAAM,EAAEO,KAAK,EAAE,GAAGJ;QAClB,OAAOI,OAAO,CAAC,EAAE;IACnB;AAEF"}
@@ -6,7 +6,6 @@ export { colorBarStyleFill } from './colorBarStyleFill';
6
6
  export { colorLineStyleFill } from './colorLineStyleFill';
7
7
  export { colorPointStyleFill } from './colorPointStyleFill';
8
8
  export { colorAreaStyleFill } from './colorAreaStyleFill';
9
- export { colorCellStyleFill } from './colorCellStyleFill';
10
9
  export { colorFunnelStyleFill } from './colorFunnelStyleFill';
11
10
  export { colorPieStyleFill } from './colorPieStyleFill';
12
11
  export { colorRoseStyleFill } from './colorRoseStyleFill';
@@ -6,9 +6,8 @@ import { colorBarStyleFill } from "./colorBarStyleFill.js";
6
6
  import { colorLineStyleFill } from "./colorLineStyleFill.js";
7
7
  import { colorPointStyleFill } from "./colorPointStyleFill.js";
8
8
  import { colorAreaStyleFill } from "./colorAreaStyleFill.js";
9
- import { colorCellStyleFill } from "./colorCellStyleFill.js";
10
9
  import { colorFunnelStyleFill } from "./colorFunnelStyleFill.js";
11
10
  import { colorPieStyleFill } from "./colorPieStyleFill.js";
12
11
  import { colorRoseStyleFill } from "./colorRoseStyleFill.js";
13
12
  import { colorBoxPlotStyleFill } from "./colorBoxPlotStyleFill.js";
14
- export { color, colorAdapter, colorAreaStyleFill, colorBarStyleFill, colorBoxPlotStyleFill, colorCellStyleFill, colorFunnelStyleFill, colorLineStyleFill, colorPieStyleFill, colorPointStyleFill, colorRoseStyleFill, getColorMeasureId, isLinearColor, linearColor, linearColorForDualAxis };
13
+ export { color, colorAdapter, colorAreaStyleFill, colorBarStyleFill, colorBoxPlotStyleFill, colorFunnelStyleFill, colorLineStyleFill, colorPieStyleFill, colorPointStyleFill, colorRoseStyleFill, getColorMeasureId, isLinearColor, linearColor, linearColorForDualAxis };
@@ -12,6 +12,7 @@ export * from './pivotChart';
12
12
  export * from './markStyle';
13
13
  export * from './annotation';
14
14
  export * from './crosshair';
15
+ export * from './brush';
15
16
  export * from './series';
16
17
  export * from './dual';
17
18
  export * from './size';
@@ -12,6 +12,7 @@ export * from "./pivotChart/index.js";
12
12
  export * from "./markStyle/index.js";
13
13
  export * from "./annotation/index.js";
14
14
  export * from "./crosshair/index.js";
15
+ export * from "./brush/index.js";
15
16
  export * from "./series/index.js";
16
17
  export * from "./dual/index.js";
17
18
  export * from "./size/index.js";
@@ -6,6 +6,7 @@ export declare const buildLabel: (label: Label, vseedMeasures: Measures | undefi
6
6
  visible: boolean;
7
7
  dataFilter: (data: Datum[]) => Record<string | number, any>[];
8
8
  formatMethod: (_: unknown, datum: Datum) => string | (string | number)[];
9
+ syncState: boolean;
9
10
  position: "inside" | "outside" | undefined;
10
11
  style: {
11
12
  stroke: string | undefined;
@@ -70,6 +70,7 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
70
70
  if (wrap) return result;
71
71
  return result.join(' ');
72
72
  },
73
+ syncState: true,
73
74
  position: labelPosition,
74
75
  style: {
75
76
  stroke: labelStroke,
@@ -80,6 +81,7 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
80
81
  },
81
82
  smartInvert: labelColorSmartInvert
82
83
  };
84
+ if (labelColorSmartInvert) result.style.lineWidth = 2;
83
85
  if (labelOverlap) result.overlap = {
84
86
  hideOnHit: true,
85
87
  clampForce: true
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimension,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n VChartSpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { selector } from 'src/dataSelector'\nimport { MeasureId } from 'src/dataReshape/constant'\n\nexport const label: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions!,\n advancedVSeed.measures!,\n encoding as Encoding,\n [foldInfo],\n ) as unknown as ILineChartSpec['label']\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: (Pick<FoldInfo, 'measureId' | 'measureValue'> & Partial<Pick<FoldInfo, 'statistics'>>)[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelStroke,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureId && d.encoding !== 'row' && d.encoding !== 'column')\n : [],\n (item: Dimension) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item: Measure) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n dataFilter: (data: Datum[]) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true && selector(entry.data as Datum, label.selector, 'Or')\n })\n },\n formatMethod: (_: unknown, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item: Dimension) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item: Measure) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n if (isNumber(datum['__VCHART_ARC_RATIO'])) {\n // 饼图/环图需要使用实际占比数据\n result.push(generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter))\n } else if (statistics && isNumber(statistics.sum)) {\n result.push(\n generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter),\n )\n }\n }\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n stroke: labelStroke,\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n }\n\n if (labelOverlap) {\n ;(result as any).overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelStroke","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureId","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","selector","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","isNumber"],"mappings":"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"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimension,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n VChartSpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { selector } from 'src/dataSelector'\nimport { MeasureId } from 'src/dataReshape/constant'\n\nexport const label: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions!,\n advancedVSeed.measures!,\n encoding as Encoding,\n [foldInfo],\n ) as unknown as ILineChartSpec['label']\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: (Pick<FoldInfo, 'measureId' | 'measureValue'> & Partial<Pick<FoldInfo, 'statistics'>>)[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelStroke,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureId && d.encoding !== 'row' && d.encoding !== 'column')\n : [],\n (item: Dimension) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item: Measure) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n dataFilter: (data: Datum[]) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true && selector(entry.data as Datum, label.selector, 'Or')\n })\n },\n formatMethod: (_: unknown, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item: Dimension) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item: Measure) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n if (isNumber(datum['__VCHART_ARC_RATIO'])) {\n // 饼图/环图需要使用实际占比数据\n result.push(generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter))\n } else if (statistics && isNumber(statistics.sum)) {\n result.push(\n generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter),\n )\n }\n }\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n syncState: true,\n position: labelPosition,\n style: {\n stroke: labelStroke,\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n }\n\n if (labelColorSmartInvert) {\n ;(result.style as any).lineWidth = 2 // label 边框线宽度,不设置这个会导致智能反色失败\n }\n\n if (labelOverlap) {\n ;(result as any).overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelStroke","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureId","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","selector","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","isNumber"],"mappings":"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"}
@@ -7,8 +7,8 @@ const pivotColorLegend = (spec, context)=>{
7
7
  const baseConfig = advancedVSeed.config[chartType];
8
8
  if (!baseConfig || !baseConfig.legend) return result;
9
9
  const { datasetReshapeInfo } = advancedVSeed;
10
- const max = Math.max(...datasetReshapeInfo.map((d)=>d.foldInfo.statistics.colorMin));
11
- const min = Math.min(...datasetReshapeInfo.map((d)=>d.foldInfo.statistics.colorMax));
10
+ const max = Math.max(...datasetReshapeInfo.map((d)=>d.foldInfo.statistics.colorMax));
11
+ const min = Math.min(...datasetReshapeInfo.map((d)=>d.foldInfo.statistics.colorMin));
12
12
  const { legend, color } = baseConfig;
13
13
  const { colorScheme, linearColorScheme } = color;
14
14
  const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight = 400 } = legend || {};
@@ -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, 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
+ {"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.colorMax))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\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 +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, 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
+ {"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\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;IAE5C,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"}
@@ -4,7 +4,8 @@ const boxPlotStyle_boxPlotStyle = (spec, context)=>{
4
4
  const { advancedVSeed, vseed } = context;
5
5
  const { markStyle, config } = advancedVSeed;
6
6
  const { boxPlotStyle } = markStyle;
7
- const theme = config?.[vseed.chartType]?.boxPlotStyle;
7
+ const { chartType } = vseed;
8
+ const theme = config?.[chartType]?.boxPlotStyle;
8
9
  const result = {
9
10
  ...spec,
10
11
  boxPlot: {
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.ts"],"sourcesContent":["import type { IBoxPlotChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BoxPlotStyle, Datum, VChartSpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const boxPlotStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { markStyle, config } = advancedVSeed\n const { boxPlotStyle } = markStyle\n const theme = config?.[vseed.chartType as 'boxPlot']?.boxPlotStyle\n\n const result = {\n ...spec,\n boxPlot: {\n style: {\n shaftShape: 'filled-line',\n visible: true,\n shaftWidth: '50%',\n stroke: theme?.whiskerBorderColor,\n boxStroke: theme?.boxBorderColor,\n boxCornerRadius: theme?.boxCornerRadius,\n medianStroke: theme?.medianBorderColor ?? theme?.boxBorderColor,\n },\n },\n } as IBoxPlotChartSpec\n\n if (isNullish(boxPlotStyle) || isEmpty(boxPlotStyle)) {\n return result\n }\n\n const boxPlotStyles = (Array.isArray(boxPlotStyle) ? boxPlotStyle : [boxPlotStyle]) as BoxPlotStyle[]\n\n const customMap = boxPlotStyles.reduce<object>((result, style, index) => {\n const {\n boxColor,\n boxColorOpacity,\n boxBorderColor,\n boxBorderWidth = 1,\n boxVisible = true,\n boxBorderOpacity,\n medianBorderColor,\n whiskerBorderColor,\n boxCornerRadius,\n } = style\n\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: boxVisible,\n fill: boxColor,\n fillOpacity: boxColorOpacity,\n lineWidth: boxBorderWidth,\n stroke: whiskerBorderColor,\n boxStroke: boxBorderColor,\n boxCornerRadius: boxCornerRadius,\n strokeOpacity: boxBorderOpacity,\n medianStroke: medianBorderColor ?? boxBorderColor,\n },\n },\n }\n }, {})\n\n result.boxPlot!.state = {\n ...result.boxPlot!.state,\n ...customMap,\n }\n\n return result\n}\n"],"names":["boxPlotStyle","spec","context","advancedVSeed","vseed","markStyle","config","theme","result","isNullish","isEmpty","boxPlotStyles","Array","customMap","style","index","boxColor","boxColorOpacity","boxBorderColor","boxBorderWidth","boxVisible","boxBorderOpacity","medianBorderColor","whiskerBorderColor","boxCornerRadius","datum","selector"],"mappings":";;AAKO,MAAMA,4BAA+B,CAACC,MAAMC;IACjD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAEC,MAAM,EAAE,GAAGH;IAC9B,MAAM,EAAEH,YAAY,EAAE,GAAGK;IACzB,MAAME,QAAQD,QAAQ,CAACF,MAAM,SAAS,CAAc,EAAE;IAEtD,MAAMI,SAAS;QACb,GAAGP,IAAI;QACP,SAAS;YACP,OAAO;gBACL,YAAY;gBACZ,SAAS;gBACT,YAAY;gBACZ,QAAQM,OAAO;gBACf,WAAWA,OAAO;gBAClB,iBAAiBA,OAAO;gBACxB,cAAcA,OAAO,qBAAqBA,OAAO;YACnD;QACF;IACF;IAEA,IAAIE,UAAUT,iBAAiBU,QAAQV,eACrC,OAAOQ;IAGT,MAAMG,gBAAiBC,MAAM,OAAO,CAACZ,gBAAgBA,eAAe;QAACA;KAAa;IAElF,MAAMa,YAAYF,cAAc,MAAM,CAAS,CAACH,QAAQM,OAAOC;QAC7D,MAAM,EACJC,QAAQ,EACRC,eAAe,EACfC,cAAc,EACdC,iBAAiB,CAAC,EAClBC,aAAa,IAAI,EACjBC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,eAAe,EAChB,GAAGV;QAEJ,OAAO;YACL,GAAGN,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,SAASM;oBACT,MAAMJ;oBACN,aAAaC;oBACb,WAAWE;oBACX,QAAQI;oBACR,WAAWL;oBACX,iBAAiBM;oBACjB,eAAeH;oBACf,cAAcC,qBAAqBJ;gBACrC;YACF;QACF;IACF,GAAG,CAAC;IAEJV,OAAO,OAAO,CAAE,KAAK,GAAG;QACtB,GAAGA,OAAO,OAAO,CAAE,KAAK;QACxB,GAAGK,SAAS;IACd;IAEA,OAAOL;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.ts"],"sourcesContent":["import type { IBoxPlotChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BoxPlotStyle, Datum, VChartSpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const boxPlotStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { markStyle, config } = advancedVSeed\n const { boxPlotStyle } = markStyle\n const { chartType } = vseed\n const theme = config?.[chartType as 'boxPlot']?.boxPlotStyle\n\n const result = {\n ...spec,\n boxPlot: {\n style: {\n shaftShape: 'filled-line',\n visible: true,\n shaftWidth: '50%',\n stroke: theme?.whiskerBorderColor,\n boxStroke: theme?.boxBorderColor,\n boxCornerRadius: theme?.boxCornerRadius,\n medianStroke: theme?.medianBorderColor ?? theme?.boxBorderColor,\n },\n },\n } as IBoxPlotChartSpec\n\n if (isNullish(boxPlotStyle) || isEmpty(boxPlotStyle)) {\n return result\n }\n\n const boxPlotStyles = (Array.isArray(boxPlotStyle) ? boxPlotStyle : [boxPlotStyle]) as BoxPlotStyle[]\n\n const customMap = boxPlotStyles.reduce<object>((result, style, index) => {\n const {\n boxColor,\n boxColorOpacity,\n boxBorderColor,\n boxBorderWidth = 1,\n boxVisible = true,\n boxBorderOpacity,\n medianBorderColor,\n whiskerBorderColor,\n boxCornerRadius,\n } = style\n\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: boxVisible,\n fill: boxColor,\n fillOpacity: boxColorOpacity,\n lineWidth: boxBorderWidth,\n stroke: whiskerBorderColor,\n boxStroke: boxBorderColor,\n boxCornerRadius: boxCornerRadius,\n strokeOpacity: boxBorderOpacity,\n medianStroke: medianBorderColor ?? boxBorderColor,\n },\n },\n }\n }, {})\n\n result.boxPlot!.state = {\n ...result.boxPlot!.state,\n ...customMap,\n }\n\n return result\n}\n"],"names":["boxPlotStyle","spec","context","advancedVSeed","vseed","markStyle","config","chartType","theme","result","isNullish","isEmpty","boxPlotStyles","Array","customMap","style","index","boxColor","boxColorOpacity","boxBorderColor","boxBorderWidth","boxVisible","boxBorderOpacity","medianBorderColor","whiskerBorderColor","boxCornerRadius","datum","selector"],"mappings":";;AAKO,MAAMA,4BAA+B,CAACC,MAAMC;IACjD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAEC,MAAM,EAAE,GAAGH;IAC9B,MAAM,EAAEH,YAAY,EAAE,GAAGK;IACzB,MAAM,EAAEE,SAAS,EAAE,GAAGH;IACtB,MAAMI,QAAQF,QAAQ,CAACC,UAAuB,EAAE;IAEhD,MAAME,SAAS;QACb,GAAGR,IAAI;QACP,SAAS;YACP,OAAO;gBACL,YAAY;gBACZ,SAAS;gBACT,YAAY;gBACZ,QAAQO,OAAO;gBACf,WAAWA,OAAO;gBAClB,iBAAiBA,OAAO;gBACxB,cAAcA,OAAO,qBAAqBA,OAAO;YACnD;QACF;IACF;IAEA,IAAIE,UAAUV,iBAAiBW,QAAQX,eACrC,OAAOS;IAGT,MAAMG,gBAAiBC,MAAM,OAAO,CAACb,gBAAgBA,eAAe;QAACA;KAAa;IAElF,MAAMc,YAAYF,cAAc,MAAM,CAAS,CAACH,QAAQM,OAAOC;QAC7D,MAAM,EACJC,QAAQ,EACRC,eAAe,EACfC,cAAc,EACdC,iBAAiB,CAAC,EAClBC,aAAa,IAAI,EACjBC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,eAAe,EAChB,GAAGV;QAEJ,OAAO;YACL,GAAGN,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,SAASM;oBACT,MAAMJ;oBACN,aAAaC;oBACb,WAAWE;oBACX,QAAQI;oBACR,WAAWL;oBACX,iBAAiBM;oBACjB,eAAeH;oBACf,cAAcC,qBAAqBJ;gBACrC;YACF;QACF;IACF,GAAG,CAAC;IAEJV,OAAO,OAAO,CAAE,KAAK,GAAG;QACtB,GAAGA,OAAO,OAAO,CAAE,KAAK;QACxB,GAAGK,SAAS;IACd;IAEA,OAAOL;AACT"}