@visactor/vseed 0.2.0 → 0.2.2

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 (504) hide show
  1. package/dist/cjs/index.cjs +2 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/advanced/colorItems.js.map +1 -1
  4. package/dist/esm/builder/builder/build.js.map +1 -1
  5. package/dist/esm/builder/builder/buildAdvanced.js.map +1 -1
  6. package/dist/esm/builder/builder/buildSpec.js.map +1 -1
  7. package/dist/esm/builder/builder/builder.d.ts +12 -0
  8. package/dist/esm/builder/builder/builder.js.map +1 -1
  9. package/dist/esm/builder/register/all.js +2 -2
  10. package/dist/esm/builder/register/all.js.map +1 -1
  11. package/dist/esm/builder/register/chartType/area.js.map +1 -1
  12. package/dist/esm/builder/register/chartType/areaPercent.js.map +1 -1
  13. package/dist/esm/builder/register/chartType/bar.js.map +1 -1
  14. package/dist/esm/builder/register/chartType/barParallel.js.map +1 -1
  15. package/dist/esm/builder/register/chartType/barPercent.js.map +1 -1
  16. package/dist/esm/builder/register/chartType/boxplot.d.ts +1 -1
  17. package/dist/esm/builder/register/chartType/boxplot.js +2 -2
  18. package/dist/esm/builder/register/chartType/boxplot.js.map +1 -1
  19. package/dist/esm/builder/register/chartType/column.js.map +1 -1
  20. package/dist/esm/builder/register/chartType/columnParallel.js.map +1 -1
  21. package/dist/esm/builder/register/chartType/columnPercent.js.map +1 -1
  22. package/dist/esm/builder/register/chartType/donut.js.map +1 -1
  23. package/dist/esm/builder/register/chartType/dualAxis.js.map +1 -1
  24. package/dist/esm/builder/register/chartType/funnel.js.map +1 -1
  25. package/dist/esm/builder/register/chartType/heatmap.js.map +1 -1
  26. package/dist/esm/builder/register/chartType/histogram.js.map +1 -1
  27. package/dist/esm/builder/register/chartType/index.d.ts +1 -1
  28. package/dist/esm/builder/register/chartType/index.js +2 -2
  29. package/dist/esm/builder/register/chartType/line.js.map +1 -1
  30. package/dist/esm/builder/register/chartType/pie.js.map +1 -1
  31. package/dist/esm/builder/register/chartType/pivotTable.js.map +1 -1
  32. package/dist/esm/builder/register/chartType/radar.js.map +1 -1
  33. package/dist/esm/builder/register/chartType/rose.js.map +1 -1
  34. package/dist/esm/builder/register/chartType/roseParallel.js.map +1 -1
  35. package/dist/esm/builder/register/chartType/scatter.js.map +1 -1
  36. package/dist/esm/builder/register/chartType/table.js.map +1 -1
  37. package/dist/esm/builder/register/custom.js.map +1 -1
  38. package/dist/esm/builder/register/theme/custom.js.map +1 -1
  39. package/dist/esm/builder/register/theme/dark.js.map +1 -1
  40. package/dist/esm/builder/register/theme/light.js.map +1 -1
  41. package/dist/esm/dataReshape/constant.js.map +1 -1
  42. package/dist/esm/dataReshape/dataReshapeByEncoding.js.map +1 -1
  43. package/dist/esm/dataReshape/foldMeasures.js.map +1 -1
  44. package/dist/esm/dataReshape/unfoldDimensions.js.map +1 -1
  45. package/dist/esm/dataSelector/selector.js.map +1 -1
  46. package/dist/esm/i18n/i18n.js.map +1 -1
  47. package/dist/esm/i18n/i18nData.js +9 -9
  48. package/dist/esm/i18n/i18nData.js.map +1 -1
  49. package/dist/esm/index.d.ts +1 -1
  50. package/dist/esm/index.js +2 -2
  51. package/dist/esm/pipeline/advanced/chart/pipeline/area.js.map +1 -1
  52. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js.map +1 -1
  53. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js.map +1 -1
  54. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js.map +1 -1
  55. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js.map +1 -1
  56. package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js.map +1 -1
  57. package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
  58. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js.map +1 -1
  59. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js.map +1 -1
  60. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
  61. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js.map +1 -1
  62. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js.map +1 -1
  63. package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js.map +1 -1
  64. package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
  65. package/dist/esm/pipeline/advanced/chart/pipeline/line.js.map +1 -1
  66. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
  67. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js.map +1 -1
  68. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js.map +1 -1
  69. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js.map +1 -1
  70. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js.map +1 -1
  71. package/dist/esm/pipeline/advanced/chart/pipes/analysis/common.js.map +1 -1
  72. package/dist/esm/pipeline/advanced/chart/pipes/analysis/sortLegend.js.map +1 -1
  73. package/dist/esm/pipeline/advanced/chart/pipes/analysis/sortXBand.js.map +1 -1
  74. package/dist/esm/pipeline/advanced/chart/pipes/analysis/sortYBand.js.map +1 -1
  75. package/dist/esm/pipeline/advanced/chart/pipes/annotation/annotation.js.map +1 -1
  76. package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js +2 -0
  77. package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js.map +1 -1
  78. package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -1
  79. package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js.map +1 -1
  80. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +17 -0
  81. package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
  82. package/dist/esm/pipeline/advanced/chart/pipes/config/index.js.map +1 -1
  83. package/dist/esm/pipeline/advanced/chart/pipes/config/line.js.map +1 -1
  84. package/dist/esm/pipeline/advanced/chart/pipes/config/pie.js.map +1 -1
  85. package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js.map +1 -1
  86. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultDimensions.js.map +1 -1
  87. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasureId.js.map +1 -1
  88. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js +2 -2
  89. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js.map +1 -1
  90. package/dist/esm/pipeline/advanced/chart/pipes/dimensions/pickDimensionsForReshape.js.map +1 -1
  91. package/dist/esm/pipeline/advanced/chart/pipes/encoding/adapter/encodingAdapter.js.map +1 -1
  92. package/dist/esm/pipeline/advanced/chart/pipes/encoding/bar.js.map +1 -1
  93. package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js.map +1 -1
  94. package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/addColorToEncoding.js.map +1 -1
  95. package/dist/esm/pipeline/advanced/chart/pipes/encoding/column.js.map +1 -1
  96. package/dist/esm/pipeline/advanced/chart/pipes/encoding/dualAxis.js.map +1 -1
  97. package/dist/esm/pipeline/advanced/chart/pipes/encoding/funnel.js.map +1 -1
  98. package/dist/esm/pipeline/advanced/chart/pipes/encoding/heatmap.js.map +1 -1
  99. package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js.map +1 -1
  100. package/dist/esm/pipeline/advanced/chart/pipes/encoding/line.js.map +1 -1
  101. package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js.map +1 -1
  102. package/dist/esm/pipeline/advanced/chart/pipes/encoding/radar.js.map +1 -1
  103. package/dist/esm/pipeline/advanced/chart/pipes/encoding/rose.js.map +1 -1
  104. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js.map +1 -1
  105. package/dist/esm/pipeline/advanced/chart/pipes/init/initAdvancedVSeed.js.map +1 -1
  106. package/dist/esm/pipeline/advanced/chart/pipes/markStyle/markStyle.js.map +1 -1
  107. package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js +3 -0
  108. package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js.map +1 -1
  109. package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasuresForDualAxis.js.map +1 -1
  110. package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasuresForScatter.js.map +1 -1
  111. package/dist/esm/pipeline/advanced/chart/pipes/measures/pickMeasuresForReshape.js.map +1 -1
  112. package/dist/esm/pipeline/advanced/chart/pipes/measures/utils.js.map +1 -1
  113. package/dist/esm/pipeline/advanced/chart/pipes/pivot/pivotAdapter.js.map +1 -1
  114. package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -1
  115. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
  116. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
  117. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  118. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
  119. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
  120. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js.map +1 -1
  121. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
  122. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
  123. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -1
  124. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
  125. package/dist/esm/pipeline/advanced/chart/pipes/theme/theme.js.map +1 -1
  126. package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js.map +1 -1
  127. package/dist/esm/pipeline/advanced/table/pipeline/table.js.map +1 -1
  128. package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js.map +1 -1
  129. package/dist/esm/pipeline/advanced/table/pipes/config/pivotTableConfig.js.map +1 -1
  130. package/dist/esm/pipeline/advanced/table/pipes/config/tableConfig.js.map +1 -1
  131. package/dist/esm/pipeline/advanced/table/pipes/default/defaultDimensions.js.map +1 -1
  132. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.js.map +1 -1
  133. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js.map +1 -1
  134. package/dist/esm/pipeline/advanced/table/pipes/encoding/pivotTable.js.map +1 -1
  135. package/dist/esm/pipeline/advanced/table/pipes/init/initAdvancedVSeed.js.map +1 -1
  136. package/dist/esm/pipeline/advanced/table/pipes/records/records.js.map +1 -1
  137. package/dist/esm/pipeline/advanced/table/pipes/reshape/reshapePivotTable.js.map +1 -1
  138. package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
  139. package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
  140. package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
  141. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
  142. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
  143. package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +5 -1
  144. package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -1
  145. package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
  146. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
  147. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
  148. package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
  149. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
  150. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
  151. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
  152. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +3 -3
  153. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
  154. package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
  155. package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
  156. package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
  157. package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
  158. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
  159. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
  160. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js.map +1 -1
  161. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
  162. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
  163. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js +3 -76
  164. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
  165. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.d.ts +6 -0
  166. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js +95 -0
  167. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js.map +1 -0
  168. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js +16 -84
  169. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js.map +1 -1
  170. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.d.ts +2 -0
  171. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.js +23 -0
  172. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.js.map +1 -0
  173. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
  174. package/dist/esm/pipeline/spec/chart/pipes/annotation/index.d.ts +1 -0
  175. package/dist/esm/pipeline/spec/chart/pipes/annotation/index.js +2 -1
  176. package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js.map +1 -1
  177. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
  178. package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.js.map +1 -1
  179. package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.js.map +1 -1
  180. package/dist/esm/pipeline/spec/chart/pipes/axes/radarRadius.js.map +1 -1
  181. package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js.map +1 -1
  182. package/dist/esm/pipeline/spec/chart/pipes/axes/title/defaultTitleText.js.map +1 -1
  183. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
  184. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
  185. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
  186. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
  187. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js.map +1 -1
  188. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js.map +1 -1
  189. package/dist/esm/pipeline/spec/chart/pipes/backgroundColor/background.js.map +1 -1
  190. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.js.map +1 -1
  191. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.js.map +1 -1
  192. package/dist/esm/pipeline/spec/chart/pipes/boxWidth/boxGapInGroup.d.ts +2 -0
  193. package/dist/esm/pipeline/spec/chart/pipes/boxWidth/boxGapInGroup.js +14 -0
  194. package/dist/esm/pipeline/spec/chart/pipes/boxWidth/boxGapInGroup.js.map +1 -0
  195. package/dist/esm/pipeline/spec/chart/pipes/boxWidth/boxMaxWidth.d.ts +2 -0
  196. package/dist/esm/pipeline/spec/chart/pipes/boxWidth/boxMaxWidth.js +14 -0
  197. package/dist/esm/pipeline/spec/chart/pipes/boxWidth/boxMaxWidth.js.map +1 -0
  198. package/dist/esm/pipeline/spec/chart/pipes/boxWidth/index.d.ts +2 -0
  199. package/dist/esm/pipeline/spec/chart/pipes/boxWidth/index.js +2 -0
  200. package/dist/esm/pipeline/spec/chart/pipes/color/color.js.map +1 -1
  201. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js.map +1 -1
  202. package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js.map +1 -1
  203. package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js.map +1 -1
  204. package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.js.map +1 -1
  205. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js.map +1 -1
  206. package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js.map +1 -1
  207. package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js.map +1 -1
  208. package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js.map +1 -1
  209. package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js.map +1 -1
  210. package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js.map +1 -1
  211. package/dist/esm/pipeline/spec/chart/pipes/color/linearColor.js.map +1 -1
  212. package/dist/esm/pipeline/spec/chart/pipes/color/linearColorForDualAxis.js.map +1 -1
  213. package/dist/esm/pipeline/spec/chart/pipes/crosshair/histogramCrosshair.js.map +1 -1
  214. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.js.map +1 -1
  215. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js.map +1 -1
  216. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.js.map +1 -1
  217. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js.map +1 -1
  218. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js.map +1 -1
  219. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetDualAxis.js.map +1 -1
  220. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js.map +1 -1
  221. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetPivot.js.map +1 -1
  222. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetScatter.js.map +1 -1
  223. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetXY.js.map +1 -1
  224. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetYX.js.map +1 -1
  225. package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js.map +1 -1
  226. package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.js.map +1 -1
  227. package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
  228. package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
  229. package/dist/esm/pipeline/spec/chart/pipes/init/area.js.map +1 -1
  230. package/dist/esm/pipeline/spec/chart/pipes/init/bar.js.map +1 -1
  231. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js.map +1 -1
  232. package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -1
  233. package/dist/esm/pipeline/spec/chart/pipes/init/column.js.map +1 -1
  234. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js.map +1 -1
  235. package/dist/esm/pipeline/spec/chart/pipes/init/donut.js.map +1 -1
  236. package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js.map +1 -1
  237. package/dist/esm/pipeline/spec/chart/pipes/init/funnel.js.map +1 -1
  238. package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.js.map +1 -1
  239. package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js.map +1 -1
  240. package/dist/esm/pipeline/spec/chart/pipes/init/line.js.map +1 -1
  241. package/dist/esm/pipeline/spec/chart/pipes/init/pie.js.map +1 -1
  242. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
  243. package/dist/esm/pipeline/spec/chart/pipes/init/radar.js.map +1 -1
  244. package/dist/esm/pipeline/spec/chart/pipes/init/rose.js.map +1 -1
  245. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js.map +1 -1
  246. package/dist/esm/pipeline/spec/chart/pipes/init/scatter.js.map +1 -1
  247. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  248. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
  249. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -1
  250. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
  251. package/dist/esm/pipeline/spec/chart/pipes/legend/boxLegend.js.map +1 -1
  252. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js.map +1 -1
  253. package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js.map +1 -1
  254. package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.js.map +1 -1
  255. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
  256. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
  257. package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js.map +1 -1
  258. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js.map +1 -1
  259. package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js.map +1 -1
  260. package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.js.map +1 -1
  261. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.js.map +1 -1
  262. package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelStyle.js.map +1 -1
  263. package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.js.map +1 -1
  264. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js.map +1 -1
  265. package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js.map +1 -1
  266. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pieStyle.js.map +1 -1
  267. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.js.map +1 -1
  268. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.js.map +1 -1
  269. package/dist/esm/pipeline/spec/chart/pipes/markStyle/roseStyle.js.map +1 -1
  270. package/dist/esm/pipeline/spec/chart/pipes/percent/percent.js.map +1 -1
  271. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.js.map +1 -1
  272. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.js.map +1 -1
  273. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.js.map +1 -1
  274. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.js.map +1 -1
  275. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js.map +1 -1
  276. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.js.map +1 -1
  277. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
  278. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
  279. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  280. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js +7 -3
  281. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js.map +1 -1
  282. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
  283. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js.map +1 -1
  284. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotTitle.js.map +1 -1
  285. package/dist/esm/pipeline/spec/chart/pipes/region/addRegionPadding.js.map +1 -1
  286. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js +3 -1
  287. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js.map +1 -1
  288. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js.map +1 -1
  289. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
  290. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
  291. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.d.ts +1 -1
  292. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js +7 -6
  293. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js.map +1 -1
  294. package/dist/esm/pipeline/spec/chart/pipes/series/series.js.map +1 -1
  295. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js.map +1 -1
  296. package/dist/esm/pipeline/spec/chart/pipes/stack/stack.js.map +1 -1
  297. package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
  298. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
  299. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
  300. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
  301. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js.map +1 -1
  302. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +8 -7
  303. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -1
  304. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
  305. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js.map +1 -1
  306. package/dist/esm/pipeline/spec/chart/utils/histogram.d.ts +1 -0
  307. package/dist/esm/pipeline/spec/chart/utils/histogram.js +6 -2
  308. package/dist/esm/pipeline/spec/chart/utils/histogram.js.map +1 -1
  309. package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js.map +1 -1
  310. package/dist/esm/pipeline/spec/table/pipeline/table.js.map +1 -1
  311. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js.map +1 -1
  312. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -1
  313. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -1
  314. package/dist/esm/pipeline/spec/table/pipes/columns/dimensionsToColumns.js.map +1 -1
  315. package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.js.map +1 -1
  316. package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.js.map +1 -1
  317. package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.js.map +1 -1
  318. package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js.map +1 -1
  319. package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js.map +1 -1
  320. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js.map +1 -1
  321. package/dist/esm/pipeline/spec/table/pipes/init/table.js.map +1 -1
  322. package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js.map +1 -1
  323. package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js.map +1 -1
  324. package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js.map +1 -1
  325. package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js.map +1 -1
  326. package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js.map +1 -1
  327. package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js.map +1 -1
  328. package/dist/esm/pipeline/spec/table/pipes/theme/scrollStyle.js.map +1 -1
  329. package/dist/esm/pipeline/spec/table/pipes/theme/selectionStyle.js.map +1 -1
  330. package/dist/esm/pipeline/utils/chatType.js.map +1 -1
  331. package/dist/esm/pipeline/utils/constant.js.map +1 -1
  332. package/dist/esm/pipeline/utils/dimensions/delete.js.map +1 -1
  333. package/dist/esm/pipeline/utils/dimensions/typeGuard.js.map +1 -1
  334. package/dist/esm/pipeline/utils/format/createFormatter.js.map +1 -1
  335. package/dist/esm/pipeline/utils/format/createFormatterByMeasure.js.map +1 -1
  336. package/dist/esm/pipeline/utils/format/createNumFormatter.js +1 -1
  337. package/dist/esm/pipeline/utils/format/createNumFormatter.js.map +1 -1
  338. package/dist/esm/pipeline/utils/measures/delete.js.map +1 -1
  339. package/dist/esm/pipeline/utils/measures/depth.js.map +1 -1
  340. package/dist/esm/pipeline/utils/measures/find.js.map +1 -1
  341. package/dist/esm/pipeline/utils/measures/typeGuard.js.map +1 -1
  342. package/dist/esm/pipeline/utils/pipeline.js.map +1 -1
  343. package/dist/esm/pipeline/utils/replaceNullToUndefined.js.map +1 -1
  344. package/dist/esm/pipeline/utils/tree/traverse.js.map +1 -1
  345. package/dist/esm/pipeline/utils/valid/checkVSeed.js.map +1 -1
  346. package/dist/esm/theme/common/annotaion.js.map +1 -1
  347. package/dist/esm/theme/common/axes.js.map +1 -1
  348. package/dist/esm/theme/common/boxPlot.js.map +1 -1
  349. package/dist/esm/theme/common/color.js.map +1 -1
  350. package/dist/esm/theme/common/crosshair.js.map +1 -1
  351. package/dist/esm/theme/common/funnelTransform.js.map +1 -1
  352. package/dist/esm/theme/common/heatmapCell.js.map +1 -1
  353. package/dist/esm/theme/common/label.js.map +1 -1
  354. package/dist/esm/theme/common/legend.js.map +1 -1
  355. package/dist/esm/theme/common/regressionLine.js.map +1 -1
  356. package/dist/esm/theme/common/table.js.map +1 -1
  357. package/dist/esm/theme/common/tooltip.js.map +1 -1
  358. package/dist/esm/theme/dark/dark.js.map +1 -1
  359. package/dist/esm/theme/light/light.js.map +1 -1
  360. package/dist/esm/types/advancedVSeed.d.ts +4 -0
  361. package/dist/esm/types/advancedVSeed.js.map +1 -1
  362. package/dist/esm/types/builder/builder.js.map +1 -1
  363. package/dist/esm/types/chartType/area/area.d.ts +2 -2
  364. package/dist/esm/types/chartType/area/zArea.js.map +1 -1
  365. package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +3 -5
  366. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
  367. package/dist/esm/types/chartType/bar/bar.d.ts +3 -3
  368. package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
  369. package/dist/esm/types/chartType/barParallel/barParallel.d.ts +3 -3
  370. package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
  371. package/dist/esm/types/chartType/barPercent/barPercent.d.ts +3 -3
  372. package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
  373. package/dist/esm/types/chartType/{boxplot/boxplot.d.ts → boxPlot/boxPlot.d.ts} +12 -4
  374. package/dist/esm/types/chartType/boxPlot/index.d.ts +2 -0
  375. package/dist/esm/types/chartType/boxPlot/index.js +1 -0
  376. package/dist/esm/types/chartType/{boxplot/zBoxplot.d.ts → boxPlot/zBoxPlot.d.ts} +3 -1
  377. package/dist/esm/types/chartType/{boxplot/zBoxplot.js → boxPlot/zBoxPlot.js} +7 -5
  378. package/dist/esm/types/chartType/boxPlot/zBoxPlot.js.map +1 -0
  379. package/dist/esm/types/chartType/column/column.d.ts +4 -4
  380. package/dist/esm/types/chartType/column/zColumn.d.ts +2 -2
  381. package/dist/esm/types/chartType/column/zColumn.js +1 -1
  382. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  383. package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +3 -5
  384. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
  385. package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +3 -3
  386. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
  387. package/dist/esm/types/chartType/donut/zDonut.js.map +1 -1
  388. package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +3 -3
  389. package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
  390. package/dist/esm/types/chartType/funnel/zFunnel.js.map +1 -1
  391. package/dist/esm/types/chartType/heatmap/zHeatmap.js.map +1 -1
  392. package/dist/esm/types/chartType/histogram/histogram.d.ts +6 -6
  393. package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
  394. package/dist/esm/types/chartType/index.d.ts +1 -1
  395. package/dist/esm/types/chartType/index.js +1 -1
  396. package/dist/esm/types/chartType/line/line.d.ts +3 -5
  397. package/dist/esm/types/chartType/line/zLine.js.map +1 -1
  398. package/dist/esm/types/chartType/pie/zPie.js.map +1 -1
  399. package/dist/esm/types/chartType/pivotTable/pivotTable.d.ts +1 -1
  400. package/dist/esm/types/chartType/pivotTable/zPivotTable.js.map +1 -1
  401. package/dist/esm/types/chartType/radar/zRadar.js.map +1 -1
  402. package/dist/esm/types/chartType/rose/zRose.js.map +1 -1
  403. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js.map +1 -1
  404. package/dist/esm/types/chartType/scatter/scatter.d.ts +7 -7
  405. package/dist/esm/types/chartType/scatter/zScatter.d.ts +8 -8
  406. package/dist/esm/types/chartType/scatter/zScatter.js +4 -4
  407. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  408. package/dist/esm/types/chartType/table/table.d.ts +1 -1
  409. package/dist/esm/types/chartType/table/zTable.js.map +1 -1
  410. package/dist/esm/types/dataSelector/selector.js.map +1 -1
  411. package/dist/esm/types/i18n/i18n.js.map +1 -1
  412. package/dist/esm/types/properties/analysis/analysis.js.map +1 -1
  413. package/dist/esm/types/properties/analysis/sort.js.map +1 -1
  414. package/dist/esm/types/properties/analysis/sortLegend.js.map +1 -1
  415. package/dist/esm/types/properties/annotation/annotation.js.map +1 -1
  416. package/dist/esm/types/properties/annotation/zAnnotationArea.js.map +1 -1
  417. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js.map +1 -1
  418. package/dist/esm/types/properties/annotation/zAnnotationPoint.js.map +1 -1
  419. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js.map +1 -1
  420. package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -1
  421. package/dist/esm/types/properties/cellStyle/cellStyle.js.map +1 -1
  422. package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
  423. package/dist/esm/types/properties/chartType/dualChartType.js.map +1 -1
  424. package/dist/esm/types/properties/config/annotation/zAnnotaion.js.map +1 -1
  425. package/dist/esm/types/properties/config/area.js.map +1 -1
  426. package/dist/esm/types/properties/config/axes/zBandAxis.js.map +1 -1
  427. package/dist/esm/types/properties/config/axes/zLinearAxis.js.map +1 -1
  428. package/dist/esm/types/properties/config/backgroundColor/backgroundColor.js.map +1 -1
  429. package/dist/esm/types/properties/config/bar.js.map +1 -1
  430. package/dist/esm/types/properties/config/barWidth/index.js.map +1 -1
  431. package/dist/esm/types/properties/config/boxWidth/boxWidth.d.ts +8 -0
  432. package/dist/esm/types/properties/config/boxWidth/boxWidth.js +0 -0
  433. package/dist/esm/types/properties/config/boxWidth/index.d.ts +2 -0
  434. package/dist/esm/types/properties/config/boxWidth/index.js +1 -0
  435. package/dist/esm/types/properties/config/boxWidth/zBoxWidth.d.ts +3 -0
  436. package/dist/esm/types/properties/config/boxWidth/zBoxWidth.js +6 -0
  437. package/dist/esm/types/properties/config/boxWidth/zBoxWidth.js.map +1 -0
  438. package/dist/esm/types/properties/config/boxplot.d.ts +2 -0
  439. package/dist/esm/types/properties/config/boxplot.js +4 -1
  440. package/dist/esm/types/properties/config/boxplot.js.map +1 -1
  441. package/dist/esm/types/properties/config/color/color.js.map +1 -1
  442. package/dist/esm/types/properties/config/column.js.map +1 -1
  443. package/dist/esm/types/properties/config/config.d.ts +2 -0
  444. package/dist/esm/types/properties/config/config.js.map +1 -1
  445. package/dist/esm/types/properties/config/crosshair/zCrosshair.js.map +1 -1
  446. package/dist/esm/types/properties/config/dimensionLinkage/dimensionLinkage.js.map +1 -1
  447. package/dist/esm/types/properties/config/dualAxis.js.map +1 -1
  448. package/dist/esm/types/properties/config/funnel.js.map +1 -1
  449. package/dist/esm/types/properties/config/funnelTransform/zFunnelTransform.js.map +1 -1
  450. package/dist/esm/types/properties/config/heatmap/zHeatmap.js.map +1 -1
  451. package/dist/esm/types/properties/config/heatmap.js.map +1 -1
  452. package/dist/esm/types/properties/config/histogram.js.map +1 -1
  453. package/dist/esm/types/properties/config/index.d.ts +1 -0
  454. package/dist/esm/types/properties/config/index.js +1 -0
  455. package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
  456. package/dist/esm/types/properties/config/label/zPieLabel.js.map +1 -1
  457. package/dist/esm/types/properties/config/legend/legend.js.map +1 -1
  458. package/dist/esm/types/properties/config/line.js.map +1 -1
  459. package/dist/esm/types/properties/config/pie.js.map +1 -1
  460. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js.map +1 -1
  461. package/dist/esm/types/properties/config/pivotTable.js.map +1 -1
  462. package/dist/esm/types/properties/config/rose.js.map +1 -1
  463. package/dist/esm/types/properties/config/scatter.js.map +1 -1
  464. package/dist/esm/types/properties/config/stackCornerRadius/stackCornerRadius.js.map +1 -1
  465. package/dist/esm/types/properties/config/table.js.map +1 -1
  466. package/dist/esm/types/properties/config/tooltip/tooltip.js.map +1 -1
  467. package/dist/esm/types/properties/config/whiskers/index.js.map +1 -1
  468. package/dist/esm/types/properties/dataset/dataset.js.map +1 -1
  469. package/dist/esm/types/properties/datasetReshapeInfo/zDatasetReshapeInfo.js.map +1 -1
  470. package/dist/esm/types/properties/dimensions/zDimensions.js.map +1 -1
  471. package/dist/esm/types/properties/encoding/zDimensionEncoding.js.map +1 -1
  472. package/dist/esm/types/properties/encoding/zEncoding.js +1 -1
  473. package/dist/esm/types/properties/encoding/zEncoding.js.map +1 -1
  474. package/dist/esm/types/properties/encoding/zMeasureEncoding.js.map +1 -1
  475. package/dist/esm/types/properties/format/numFormat.js.map +1 -1
  476. package/dist/esm/types/properties/markStyle/barStyle.js.map +1 -1
  477. package/dist/esm/types/properties/markStyle/boxPlotStyle.js.map +1 -1
  478. package/dist/esm/types/properties/markStyle/lineStyle.js.map +1 -1
  479. package/dist/esm/types/properties/markStyle/markStyle.js.map +1 -1
  480. package/dist/esm/types/properties/markStyle/outlierStyle.js.map +1 -1
  481. package/dist/esm/types/properties/markStyle/pointStyle.js.map +1 -1
  482. package/dist/esm/types/properties/markStyle/zAreaStyle.js.map +1 -1
  483. package/dist/esm/types/properties/measures/zDualMeasures.js.map +1 -1
  484. package/dist/esm/types/properties/measures/zMeasures.js.map +1 -1
  485. package/dist/esm/types/properties/measures/zScatterMeasures.js.map +1 -1
  486. package/dist/esm/types/properties/regressionLine/linearRegressionLine.d.ts +4 -0
  487. package/dist/esm/types/properties/regressionLine/logisticRegressionLine.d.ts +4 -0
  488. package/dist/esm/types/properties/regressionLine/lowessRegressionLine.d.ts +4 -0
  489. package/dist/esm/types/properties/regressionLine/polynomialRegressionLine.d.ts +4 -0
  490. package/dist/esm/types/properties/regressionLine/zRegressionLine.js.map +1 -1
  491. package/dist/esm/types/properties/theme/customTheme.d.ts +4 -0
  492. package/dist/esm/types/properties/theme/customTheme.js.map +1 -1
  493. package/dist/esm/types/properties/theme/theme.js.map +1 -1
  494. package/dist/esm/types/vseed.d.ts +3 -2
  495. package/dist/esm/types/zVseed.d.ts +12 -10
  496. package/dist/esm/types/zVseed.js +2 -2
  497. package/dist/esm/types/zVseed.js.map +1 -1
  498. package/dist/umd/index.js +503 -424
  499. package/dist/umd/index.js.map +1 -1
  500. package/package.json +3 -3
  501. package/dist/esm/types/chartType/boxplot/index.d.ts +0 -2
  502. package/dist/esm/types/chartType/boxplot/index.js +0 -1
  503. package/dist/esm/types/chartType/boxplot/zBoxplot.js.map +0 -1
  504. /package/dist/esm/types/chartType/{boxplot/boxplot.js → boxPlot/boxPlot.js} +0 -0
@@ -0,0 +1,95 @@
1
+ import { selector } from "../../../../../dataSelector/index.js";
2
+ import { isSubset } from "./utils.js";
3
+ import { ANNOTATION_Z_INDEX } from "../../../../utils/constant.js";
4
+ import { isBarLikeChart } from "../../../../utils/chatType.js";
5
+ const generateAnnotationPointPipe = (options)=>{
6
+ const findSelectedDatas = options.findSelectedDatas ?? ((dataset, s)=>dataset.filter((datum)=>selector(datum, s)));
7
+ const generateMarkPoint = options.generateMarkPoint ?? ((datum)=>[
8
+ {
9
+ coordinate: (data)=>data.find((item)=>isSubset(datum, item))
10
+ }
11
+ ]);
12
+ return (spec, context)=>{
13
+ const { advancedVSeed, vseed } = context;
14
+ const { annotation, config } = advancedVSeed;
15
+ if (!annotation || !annotation.annotationPoint) return spec;
16
+ const theme = config?.[vseed.chartType]?.annotation?.annotationPoint;
17
+ const { annotationPoint } = annotation;
18
+ const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
19
+ annotationPoint
20
+ ];
21
+ const isHorizontalBar = isBarLikeChart(advancedVSeed);
22
+ const defaultStyle = isHorizontalBar ? {
23
+ textAlign: 'right',
24
+ textBaseline: 'middle'
25
+ } : {
26
+ textAlign: 'center',
27
+ textBaseline: 'top'
28
+ };
29
+ const markPoint = annotationPointList.flatMap((annotationPoint)=>{
30
+ const { selector: selectorPoint, text = '', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = defaultStyle.textAlign, textBaseline = defaultStyle.textBaseline, textBackgroundBorderColor = theme?.textBackgroundBorderColor, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundPadding = theme?.textBackgroundPadding ?? 2, textBackgroundVisible = theme?.textBackgroundVisible ?? true, offsetX = theme?.offsetX ?? 0, offsetY = theme?.offsetY ?? 0 } = annotationPoint;
31
+ const dataset = advancedVSeed.dataset.flat();
32
+ const selectedData = selectorPoint ? findSelectedDatas(dataset, selectorPoint, spec, context) : [];
33
+ const dx = -10 - (isHorizontalBar ? textFontSize : 0);
34
+ const dy = isHorizontalBar ? 0 : textFontSize;
35
+ const markPointStyle = {
36
+ zIndex: ANNOTATION_Z_INDEX,
37
+ regionRelative: true,
38
+ itemLine: {
39
+ visible: false
40
+ },
41
+ itemContent: {
42
+ offsetY,
43
+ offsetX,
44
+ confine: true,
45
+ text: {
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
+ labelBackground: {
61
+ visible: textBackgroundVisible,
62
+ padding: textBackgroundPadding,
63
+ style: {
64
+ opacity: 0.95,
65
+ cornerRadius: textBackgroundBorderRadius ?? 4,
66
+ fill: textBackgroundColor,
67
+ stroke: textBackgroundBorderColor,
68
+ lineWidth: textBackgroundBorderWidth,
69
+ dx,
70
+ dy
71
+ }
72
+ }
73
+ }
74
+ }
75
+ };
76
+ return selectedData.reduce((res, datum)=>{
77
+ const marks = generateMarkPoint(datum, spec, context);
78
+ if (marks && marks.length) marks.forEach((mark)=>{
79
+ res.push({
80
+ ...markPointStyle,
81
+ ...mark
82
+ });
83
+ });
84
+ return res;
85
+ }, []);
86
+ });
87
+ return {
88
+ ...spec,
89
+ markPoint
90
+ };
91
+ };
92
+ };
93
+ export { generateAnnotationPointPipe };
94
+
95
+ //# sourceMappingURL=annotationPointCommon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPointCommon.js","sources":["../../../../../../../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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B,OAAO,yBAAyB,CAAC,EACzDoB,wBAAwBpB,OAAO,yBAAyB,IAAI,EAC5DqB,UAAUrB,OAAO,WAAW,CAAC,EAC7BsB,UAAUtB,OAAO,WAAW,CAAC,EAC9B,GAAGC;YAEJ,MAAMf,UAAUU,cAAc,OAAO,CAAC,IAAI;YAC1C,MAAM2B,eAAef,gBAAgBvB,kBAAkBC,SAASsB,eAAed,MAAMC,WAAW,EAAE;YAClG,MAAM6B,KAAK,MAAOpB,CAAAA,kBAAmBO,eAA0B;YAC/D,MAAMc,KAAKrB,kBAAkB,IAAKO;YAClC,MAAMe,iBAAiB;gBACrB,QAAQC;gBACR,gBAAgB;gBAChB,UAAU;oBACR,SAAS;gBACX;gBACA,aAAa;oBACXL;oBACAD;oBACA,SAAS;oBACT,MAAM;wBACJ,MAAMZ;wBACN,OAAO;4BACL,SAAS;4BACT,SAAS;4BACT,WAAWI;4BACX,cAAcC;4BACd,MAAMJ;4BACN,QAAQQ;4BACR,WAAW;4BACX,UAAUP;4BACV,YAAYC;4BACZY;4BACAC;wBACF;wBACA,iBAAiB;4BACf,SAASL;4BACT,SAASD;4BACT,OAAO;gCACL,SAAS;gCACT,cAAcH,8BAA8B;gCAC5C,MAAME;gCACN,QAAQH;gCACR,WAAWE;gCACXO;gCACAC;4BACF;wBACF;oBACF;gBACF;YACF;YAEA,OAAOF,aAAa,MAAM,CAAC,CAACK,KAAuBxC;gBACjD,MAAMyC,QAAQvC,kBAAkBF,OAAOM,MAAMC;gBAE7C,IAAIkC,SAASA,MAAM,MAAM,EACvBA,MAAM,OAAO,CAAC,CAACC;oBACbF,IAAI,IAAI,CAAC;wBACP,GAAGF,cAAc;wBACjB,GAAGI,IAAI;oBACT;gBACF;gBAGF,OAAOF;YACT,GAAG,EAAE;QACP;QAEA,OAAO;YACL,GAAGlC,IAAI;YACPa;QACF;IACF;AACF"}
@@ -1,94 +1,26 @@
1
1
  import { selector } from "../../../../../dataSelector/index.js";
2
2
  import { isSubset } from "./utils.js";
3
- import { ANNOTATION_Z_INDEX } from "../../../../utils/constant.js";
4
- import { isBarLikeChart } from "../../../../utils/chatType.js";
5
3
  import { findAllMeasures } from "../../../../utils/index.js";
6
4
  import { MeasureId } from "../../../../../dataReshape/constant.js";
7
5
  import { pickWithout } from "@visactor/vutils";
8
- const annotationPointOfDualAxis = (spec, context)=>{
9
- const { advancedVSeed, vseed } = context;
10
- const { annotation, config } = advancedVSeed;
11
- if (!annotation || !annotation.annotationPoint) return spec;
12
- const theme = config?.[vseed.chartType]?.annotation?.annotationPoint;
13
- const { annotationPoint } = annotation;
14
- const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
15
- annotationPoint
16
- ];
17
- const isHorizontalBar = isBarLikeChart(advancedVSeed);
18
- const defaultStyle = isHorizontalBar ? {
19
- textAlign: 'right',
20
- textBaseline: 'middle'
21
- } : {
22
- textAlign: 'center',
23
- textBaseline: 'top'
24
- };
25
- const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m)=>m.id);
26
- const markPoint = annotationPointList.flatMap((annotationPoint)=>{
27
- const { selector: selectorPoint, text = '', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = defaultStyle.textAlign, textBaseline = defaultStyle.textBaseline, textBackgroundBorderColor = theme?.textBackgroundBorderColor, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundPadding = theme?.textBackgroundPadding ?? 2, textBackgroundVisible = theme?.textBackgroundVisible ?? true, offsetX = theme?.offsetX ?? 0, offsetY = theme?.offsetY ?? 0 } = annotationPoint;
28
- const dataset = advancedVSeed.dataset.flat();
29
- const selectedData = selectorPoint ? dataset.reduce((res, d)=>{
6
+ import { generateAnnotationPointPipe } from "./annotationPointCommon.js";
7
+ const annotationPointOfDualAxis = generateAnnotationPointPipe({
8
+ findSelectedDatas: (dataset, s, spec, context)=>dataset.reduce((res, d)=>{
9
+ const { advancedVSeed } = context;
10
+ const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m)=>m.id);
30
11
  const pickedDatum = pickWithout(d, allMeasureIds.filter((id)=>id !== d[MeasureId]));
31
- if (selector(pickedDatum, selectorPoint)) res.push(pickedDatum);
12
+ if (selector(pickedDatum, s)) res.push(pickedDatum);
32
13
  return res;
33
- }, []) : [];
34
- const dx = -10 - (isHorizontalBar ? textFontSize : 0);
35
- const dy = isHorizontalBar ? 0 : textFontSize;
36
- const baseConfig = {
37
- zIndex: ANNOTATION_Z_INDEX,
38
- itemLine: {
39
- visible: false
40
- },
41
- itemContent: {
42
- offsetY,
43
- offsetX,
44
- confine: true,
45
- text: {
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
- labelBackground: {
61
- visible: textBackgroundVisible,
62
- padding: textBackgroundPadding,
63
- style: {
64
- opacity: 0.95,
65
- cornerRadius: textBackgroundBorderRadius ?? 4,
66
- fill: textBackgroundColor,
67
- stroke: textBackgroundBorderColor,
68
- lineWidth: textBackgroundBorderWidth,
69
- dx,
70
- dy
71
- }
72
- }
73
- }
74
- }
75
- };
76
- return spec.series?.reduce((res, s, index)=>{
77
- selectedData.forEach((datum)=>{
78
- res.push({
79
- ...baseConfig,
80
- relativeSeriesIndex: index,
81
- coordinate: (data)=>data.find((item)=>isSubset(datum, item, allMeasureIds.filter((id)=>id !== item[MeasureId])))
82
- });
83
- });
84
- return res;
85
- }, []);
86
- });
87
- return {
88
- ...spec,
89
- markPoint
90
- };
91
- };
14
+ }, []),
15
+ generateMarkPoint: (datum, spec, context)=>{
16
+ const { advancedVSeed } = context;
17
+ const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m)=>m.id);
18
+ return spec.series?.map((s, index)=>({
19
+ relativeSeriesIndex: index,
20
+ coordinate: (data)=>data.find((item)=>isSubset(datum, item, allMeasureIds.filter((id)=>id !== item[MeasureId])))
21
+ }));
22
+ }
23
+ });
92
24
  export { annotationPointOfDualAxis };
93
25
 
94
26
  //# sourceMappingURL=annotationPointOfDualAxis.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, VChartSpecPipe, VSeed } from 'src/types'\nimport { isSubset } from './utils'\nimport { ANNOTATION_Z_INDEX } from '../../../../utils/constant'\nimport { isBarLikeChart } from 'src/pipeline/utils/chatType'\nimport { findAllMeasures } from 'src/pipeline/utils'\nimport { MeasureId } from 'src/dataReshape/constant'\nimport { pickWithout } from '@visactor/vutils'\n\nexport const annotationPointOfDualAxis: VChartSpecPipe = (spec, context) => {\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 const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m) => m.id)\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\n ? dataset.reduce((res: Datum[], d: Datum) => {\n const pickedDatum = pickWithout(\n d,\n allMeasureIds.filter((id) => id !== d[MeasureId]),\n )\n\n if (selector(pickedDatum, selectorPoint)) {\n res.push(pickedDatum)\n }\n\n return res\n }, [])\n : []\n\n const dx = -10 - (isHorizontalBar ? (textFontSize as number) : 0) // 由于vchart tag实现问题,需要设置这个强制偏移量\n const dy = isHorizontalBar ? 0 : (textFontSize as number)\n const baseConfig = {\n zIndex: ANNOTATION_Z_INDEX,\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 }\n\n return spec.series?.reduce((res: any[], s: any, index: number) => {\n selectedData.forEach((datum: Datum) => {\n res.push({\n ...baseConfig,\n relativeSeriesIndex: index,\n coordinate: (data: Datum[]) => {\n return data.find((item) => {\n return isSubset(\n datum,\n item,\n allMeasureIds.filter((id) => id !== item[MeasureId]),\n )\n })\n },\n })\n })\n\n return res\n }, [] as any[])\n }) as ILineChartSpec['markPoint']\n\n return {\n ...spec,\n markPoint,\n }\n}\n"],"names":["annotationPointOfDualAxis","spec","context","advancedVSeed","vseed","annotation","config","theme","annotationPoint","annotationPointList","Array","isHorizontalBar","isBarLikeChart","defaultStyle","allMeasureIds","findAllMeasures","m","markPoint","selectorPoint","text","textColor","textFontSize","textFontWeight","textAlign","textBaseline","textBackgroundBorderColor","textBackgroundBorderRadius","textBackgroundBorderWidth","textBackgroundColor","textBackgroundPadding","textBackgroundVisible","offsetX","offsetY","dataset","selectedData","res","d","pickedDatum","pickWithout","id","MeasureId","selector","dx","dy","baseConfig","ANNOTATION_Z_INDEX","s","index","datum","data","item","isSubset"],"mappings":";;;;;;;AAUO,MAAMA,4BAA4C,CAACC,MAAMC;IAC9D,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,UAAU,EAAEC,MAAM,EAAE,GAAGH;IAE/B,IAAI,CAACE,cAAc,CAACA,WAAW,eAAe,EAC5C,OAAOJ;IAGT,MAAMM,QAAQD,QAAQ,CAACF,MAAM,SAAS,CAAa,EAAE,YAAY;IACjE,MAAM,EAAEI,eAAe,EAAE,GAAGH;IAC5B,MAAMI,sBAAsBC,MAAM,OAAO,CAACF,mBAAmBA,kBAAkB;QAACA;KAAgB;IAChG,MAAMG,kBAAkBC,eAAeT;IACvC,MAAMU,eAAeF,kBACjB;QACE,WAAW;QACX,cAAc;IAChB,IACA;QACE,WAAW;QACX,cAAc;IAChB;IACJ,MAAMG,gBAAgBC,gBAAgBZ,cAAc,eAAe,IAAIA,cAAc,QAAQ,EAAE,GAAG,CAAC,CAACa,I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;wBACV,YAAYC;wBACZoB;wBACAC;oBACF;oBACA,iBAAiB;wBACf,SAASb;wBACT,SAASD;wBACT,OAAO;4BACL,SAAS;4BACT,cAAcH,8BAA8B;4BAC5C,MAAME;4BACN,QAAQH;4BACR,WAAWE;4BACXe;4BACAC;wBACF;oBACF;gBACF;YACF;QACF;QAEA,OAAO1C,KAAK,MAAM,EAAE,OAAO,CAACkC,KAAYW,GAAQC;YAC9Cb,aAAa,OAAO,CAAC,CAACc;gBACpBb,IAAI,IAAI,CAAC;oBACP,GAAGS,UAAU;oBACb,qBAAqBG;oBACrB,YAAY,CAACE,OACJA,KAAK,IAAI,CAAC,CAACC,OACTC,SACLH,OACAE,MACApC,cAAc,MAAM,CAAC,CAACyB,KAAOA,OAAOW,IAAI,CAACV,UAAU;gBAI3D;YACF;YAEA,OAAOL;QACT,GAAG,EAAE;IACP;IAEA,OAAO;QACL,GAAGlC,IAAI;QACPgB;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.ts"],"sourcesContent":["import type { IMarkPointSpec, ISpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, SpecPipelineContext, VChartSpecPipe } from 'src/types'\nimport { isSubset } from './utils'\nimport { findAllMeasures } from 'src/pipeline/utils'\nimport { MeasureId } from 'src/dataReshape/constant'\nimport { pickWithout } from '@visactor/vutils'\nimport { generateAnnotationPointPipe } from './annotationPointCommon'\n\nexport const annotationPointOfDualAxis: VChartSpecPipe = generateAnnotationPointPipe({\n findSelectedDatas: (dataset, s, spec: ISpec, context: SpecPipelineContext) => {\n return dataset.reduce((res: Datum[], d: Datum) => {\n const { advancedVSeed } = context\n const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m) => m.id)\n const pickedDatum = pickWithout(\n d,\n allMeasureIds.filter((id) => id !== d[MeasureId]),\n )\n\n if (selector(pickedDatum, s)) {\n res.push(pickedDatum)\n }\n\n return res\n }, [])\n },\n generateMarkPoint: (datum: Datum, spec: ISpec, context: SpecPipelineContext) => {\n const { advancedVSeed } = context\n const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m) => m.id)\n return spec.series?.map((s: any, index: number) => {\n return {\n relativeSeriesIndex: index,\n coordinate: (data: Datum[]) => {\n return data.find((item) => {\n return isSubset(\n datum,\n item,\n allMeasureIds.filter((id) => id !== item[MeasureId]),\n )\n })\n },\n } as IMarkPointSpec\n })\n },\n})\n"],"names":["annotationPointOfDualAxis","generateAnnotationPointPipe","dataset","s","spec","context","res","d","advancedVSeed","allMeasureIds","findAllMeasures","m","pickedDatum","pickWithout","id","MeasureId","selector","datum","index","data","item","isSubset"],"mappings":";;;;;;AASO,MAAMA,4BAA4CC,4BAA4B;IACnF,mBAAmB,CAACC,SAASC,GAAGC,MAAaC,UACpCH,QAAQ,MAAM,CAAC,CAACI,KAAcC;YACnC,MAAM,EAAEC,aAAa,EAAE,GAAGH;YAC1B,MAAMI,gBAAgBC,gBAAgBF,cAAc,eAAe,IAAIA,cAAc,QAAQ,EAAE,GAAG,CAAC,CAACG,IAAMA,EAAE,EAAE;YAC9G,MAAMC,cAAcC,YAClBN,GACAE,cAAc,MAAM,CAAC,CAACK,KAAOA,OAAOP,CAAC,CAACQ,UAAU;YAGlD,IAAIC,SAASJ,aAAaT,IACxBG,IAAI,IAAI,CAACM;YAGX,OAAON;QACT,GAAG,EAAE;IAEP,mBAAmB,CAACW,OAAcb,MAAaC;QAC7C,MAAM,EAAEG,aAAa,EAAE,GAAGH;QAC1B,MAAMI,gBAAgBC,gBAAgBF,cAAc,eAAe,IAAIA,cAAc,QAAQ,EAAE,GAAG,CAAC,CAACG,IAAMA,EAAE,EAAE;QAC9G,OAAOP,KAAK,MAAM,EAAE,IAAI,CAACD,GAAQe,QACxB;gBACL,qBAAqBA;gBACrB,YAAY,CAACC,OACJA,KAAK,IAAI,CAAC,CAACC,OACTC,SACLJ,OACAG,MACAX,cAAc,MAAM,CAAC,CAACK,KAAOA,OAAOM,IAAI,CAACL,UAAU;YAI3D;IAEJ;AACF"}
@@ -0,0 +1,2 @@
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const annotationPointOfHistogram: VChartSpecPipe;
@@ -0,0 +1,23 @@
1
+ import { isSubset } from "./utils.js";
2
+ import { generateAnnotationPointPipe } from "./annotationPointCommon.js";
3
+ const annotationPointOfHistogram = generateAnnotationPointPipe({
4
+ generateMarkPoint: (datum, spec)=>{
5
+ const histogramSpec = spec;
6
+ const xField = histogramSpec.xField;
7
+ const x2Field = histogramSpec.x2Field;
8
+ return [
9
+ {
10
+ coordinate: (data)=>{
11
+ const d = data.find((item)=>isSubset(datum, item));
12
+ return d ? {
13
+ ...d,
14
+ [xField]: (d[xField] + d[x2Field]) / 2
15
+ } : void 0;
16
+ }
17
+ }
18
+ ];
19
+ }
20
+ });
21
+ export { annotationPointOfHistogram };
22
+
23
+ //# sourceMappingURL=annotationPointOfHistogram.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.ts"],"sourcesContent":["import type { IHistogramChartSpec, IMarkPointSpec } from '@visactor/vchart'\nimport type { Datum, VChartSpecPipe } from 'src/types'\nimport { isSubset } from './utils'\nimport { generateAnnotationPointPipe } from './annotationPointCommon'\n\nexport const annotationPointOfHistogram: VChartSpecPipe = generateAnnotationPointPipe({\n generateMarkPoint: (datum: Datum, spec) => {\n const histogramSpec = spec as IHistogramChartSpec\n const xField = histogramSpec.xField as string\n const x2Field = histogramSpec.x2Field as string\n\n return [\n {\n coordinate: (data: Datum[]) => {\n const d = data.find((item) => isSubset(datum, item))\n\n return d\n ? {\n ...d,\n [xField]: (d[xField] + d[x2Field]) / 2,\n }\n : undefined\n },\n } as IMarkPointSpec,\n ]\n },\n})\n"],"names":["annotationPointOfHistogram","generateAnnotationPointPipe","datum","spec","histogramSpec","xField","x2Field","data","d","item","isSubset","undefined"],"mappings":";;AAKO,MAAMA,6BAA6CC,4BAA4B;IACpF,mBAAmB,CAACC,OAAcC;QAChC,MAAMC,gBAAgBD;QACtB,MAAME,SAASD,cAAc,MAAM;QACnC,MAAME,UAAUF,cAAc,OAAO;QAErC,OAAO;YACL;gBACE,YAAY,CAACG;oBACX,MAAMC,IAAID,KAAK,IAAI,CAAC,CAACE,OAASC,SAASR,OAAOO;oBAE9C,OAAOD,IACH;wBACE,GAAGA,CAAC;wBACJ,CAACH,OAAO,EAAGG,AAAAA,CAAAA,CAAC,CAACH,OAAO,GAAGG,CAAC,CAACF,QAAO,IAAK;oBACvC,IACAK;gBACN;YACF;SACD;IACH;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.ts"],"sourcesContent":["import type { ILineChartSpec, IMarkLineSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { VChartSpecPipe } from 'src/types'\nimport { isArray, isNumber, isString } from 'remeda'\nimport { ANNOTATION_Z_INDEX } from '../../../../utils/constant'\n\nexport const annotationVerticalLine: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { annotation, datasetReshapeInfo, config } = advancedVSeed\n\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n if (!annotation || !annotation.annotationVerticalLine) {\n return spec\n }\n\n const theme = config?.[vseed.chartType as 'column']?.annotation?.annotationVerticalLine\n const { annotationVerticalLine } = annotation\n const annotationVerticalLineList = Array.isArray(annotationVerticalLine)\n ? annotationVerticalLine\n : [annotationVerticalLine]\n\n const positionMap = {\n outsideStart: 'start',\n outsideEnd: 'end',\n outsideMiddle: 'middle',\n insideStart: 'insideStartTop',\n insideMiddle: 'insideMiddleTop',\n insideEnd: 'insideEndTop',\n }\n const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine) => {\n const {\n selector: selectorPoint,\n xValue,\n text = '',\n textPosition = 'insideEnd',\n textColor = theme?.textColor ?? '#ffffff',\n textFontSize = theme?.textFontSize ?? 12,\n textFontWeight = theme?.textFontWeight ?? 400,\n textAlign = 'center',\n textBaseline = 'top',\n\n lineColor = theme?.lineColor ?? '#212121',\n lineStyle = theme?.lineStyle ?? 'dashed',\n lineVisible = theme?.lineStyle ?? true,\n lineWidth = theme?.lineWidth ?? 1,\n\n textBackgroundVisible = theme?.textBackgroundVisible ?? true,\n textBackgroundColor = theme?.textBackgroundColor ?? '#212121',\n textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#212121',\n textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4,\n textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1,\n textBackgroundPadding = theme?.textBackgroundPadding ?? 2,\n } = annotationVerticalLine\n\n const dataset = advancedVSeed.dataset.flat()\n\n const generateOneMarkLine = (x: number | string) => ({\n x,\n autoRange: true,\n zIndex: ANNOTATION_Z_INDEX,\n line: {\n style: {\n visible: lineVisible,\n stroke: lineColor,\n lineStyle: lineStyle,\n lineWidth: lineWidth,\n lineDash: lineStyle === 'dashed' ? [5, 2] : lineStyle === 'dotted' ? [2, 5] : [0],\n },\n },\n label: {\n confine: true,\n text: text,\n position: (positionMap as any)[textPosition || 'insideEnd'],\n style: {\n opacity: 0.95,\n dx: 5,\n visible: true,\n stroke: textBackgroundColor,\n lineWidth: 1,\n textAlign: textAlign,\n textBaseline: textBaseline,\n fill: textColor,\n fontSize: textFontSize,\n fontWeight: textFontWeight,\n },\n labelBackground: {\n visible: textBackgroundVisible,\n padding: textBackgroundPadding,\n style: {\n opacity: 0.95,\n dx: 5,\n cornerRadius: textBackgroundBorderRadius,\n fill: textBackgroundColor,\n fillOpacity: 1,\n stroke: textBackgroundBorderColor,\n lineWidth: textBackgroundBorderWidth,\n },\n },\n },\n startSymbol: {\n visible: theme?.startSymbolVisible ?? true,\n symbolType: theme?.startSymbolType ?? 'triangleDown',\n size: 5 + (lineWidth || 1),\n style: {\n dy: -3,\n fill: lineColor,\n },\n },\n endSymbol: {\n visible: theme?.endSymbolVisible ?? false,\n symbolType: theme?.endSymbolType ?? 'arrow',\n size: 10 + (lineWidth || 1),\n style: {\n dy: 4,\n fill: lineColor,\n },\n },\n })\n\n if ((!selectorPoint && isArray(xValue)) || isString(xValue) || isNumber(xValue)) {\n const xValueArr = Array.isArray(xValue) ? xValue : [xValue]\n return xValueArr.map(generateOneMarkLine)\n }\n\n const selectedData = selectorPoint ? dataset.filter((datum) => selector(datum, selectorPoint)) : []\n\n return selectedData.map((datum) => {\n if (datum[unfoldInfo.encodingX]) {\n return generateOneMarkLine(datum[unfoldInfo.encodingX] as string)\n }\n if (datum[foldInfo.measureValue]) {\n return generateOneMarkLine(datum[foldInfo.measureValue] as string)\n }\n return {}\n })\n }) as IMarkLineSpec[]\n\n const specMarkLine = ((spec as ILineChartSpec).markLine as IMarkLineSpec[]) || []\n const newMarkLine = [...specMarkLine, ...(markLine || [])]\n\n return {\n ...spec,\n markLine: newMarkLine,\n }\n}\n"],"names":["annotationVerticalLine","spec","context","advancedVSeed","vseed","annotation","datasetReshapeInfo","config","unfoldInfo","foldInfo","theme","annotationVerticalLineList","Array","positionMap","markLine","selectorPoint","xValue","text","textPosition","textColor","textFontSize","textFontWeight","textAlign","textBaseline","lineColor","lineStyle","lineVisible","lineWidth","textBackgroundVisible","textBackgroundColor","textBackgroundBorderColor","textBackgroundBorderRadius","textBackgroundBorderWidth","textBackgroundPadding","dataset","generateOneMarkLine","x","ANNOTATION_Z_INDEX","isArray","isString","isNumber","xValueArr","selectedData","datum","selector","specMarkLine","newMarkLine"],"mappings":";;;AAMO,MAAMA,gDAAyC,CAACC,MAAMC;IAC3D,MAAM,EAAEC,aAAa,EAAEC,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,EAAE;QAEnG,OAAO2B,aAAa,GAAG,CAAC,CAACC;YACvB,IAAIA,KAAK,CAACnC,WAAW,SAAS,CAAC,EAC7B,OAAO2B,oBAAoBQ,KAAK,CAACnC,WAAW,SAAS,CAAC;YAExD,IAAImC,KAAK,CAAClC,SAAS,YAAY,CAAC,EAC9B,OAAO0B,oBAAoBQ,KAAK,CAAClC,SAAS,YAAY,CAAC;YAEzD,OAAO,CAAC;QACV;IACF;IAEA,MAAMoC,eAAiB5C,KAAwB,QAAQ,IAAwB,EAAE;IACjF,MAAM6C,cAAc;WAAID;WAAkB/B,YAAY,EAAE;KAAE;IAE1D,OAAO;QACL,GAAGb,IAAI;QACP,UAAU6C;IACZ;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.ts"],"sourcesContent":["import type { ILineChartSpec, IMarkLineSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { VChartSpecPipe } from 'src/types'\nimport { isArray, isNumber, isString } from 'remeda'\nimport { ANNOTATION_Z_INDEX } from '../../../../utils/constant'\n\nexport const annotationVerticalLine: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { annotation, datasetReshapeInfo, config } = advancedVSeed\n\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n if (!annotation || !annotation.annotationVerticalLine) {\n return spec\n }\n\n const theme = config?.[vseed.chartType as 'column']?.annotation?.annotationVerticalLine\n const { annotationVerticalLine } = annotation\n const annotationVerticalLineList = Array.isArray(annotationVerticalLine)\n ? annotationVerticalLine\n : [annotationVerticalLine]\n\n const positionMap = {\n outsideStart: 'start',\n outsideEnd: 'end',\n outsideMiddle: 'middle',\n insideStart: 'insideStartTop',\n insideMiddle: 'insideMiddleTop',\n insideEnd: 'insideEndTop',\n }\n const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine) => {\n const {\n selector: selectorPoint,\n xValue,\n text = '',\n textPosition = 'insideEnd',\n textColor = theme?.textColor ?? '#ffffff',\n textFontSize = theme?.textFontSize ?? 12,\n textFontWeight = theme?.textFontWeight ?? 400,\n textAlign = 'center',\n textBaseline = 'top',\n\n lineColor = theme?.lineColor ?? '#212121',\n lineStyle = theme?.lineStyle ?? 'dashed',\n lineVisible = theme?.lineStyle ?? true,\n lineWidth = theme?.lineWidth ?? 1,\n\n textBackgroundVisible = theme?.textBackgroundVisible ?? true,\n textBackgroundColor = theme?.textBackgroundColor ?? '#212121',\n textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#212121',\n textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4,\n textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1,\n textBackgroundPadding = theme?.textBackgroundPadding ?? 2,\n } = annotationVerticalLine\n\n const dataset = advancedVSeed.dataset.flat()\n\n const generateOneMarkLine = (x: number | string) => ({\n x,\n autoRange: true,\n zIndex: ANNOTATION_Z_INDEX,\n line: {\n style: {\n visible: lineVisible,\n stroke: lineColor,\n lineStyle: lineStyle,\n lineWidth: lineWidth,\n lineDash: lineStyle === 'dashed' ? [5, 2] : lineStyle === 'dotted' ? [2, 5] : [0],\n },\n },\n label: {\n confine: true,\n text: text,\n position: (positionMap as any)[textPosition || 'insideEnd'],\n style: {\n opacity: 0.95,\n dx: 5,\n visible: true,\n stroke: textBackgroundColor,\n lineWidth: 1,\n textAlign: textAlign,\n textBaseline: textBaseline,\n fill: textColor,\n fontSize: textFontSize,\n fontWeight: textFontWeight,\n },\n labelBackground: {\n visible: textBackgroundVisible,\n padding: textBackgroundPadding,\n style: {\n opacity: 0.95,\n dx: 5,\n cornerRadius: textBackgroundBorderRadius,\n fill: textBackgroundColor,\n fillOpacity: 1,\n stroke: textBackgroundBorderColor,\n lineWidth: textBackgroundBorderWidth,\n },\n },\n },\n startSymbol: {\n visible: theme?.startSymbolVisible ?? true,\n symbolType: theme?.startSymbolType ?? 'triangleDown',\n size: 5 + (lineWidth || 1),\n style: {\n dy: -3,\n fill: lineColor,\n },\n },\n endSymbol: {\n visible: theme?.endSymbolVisible ?? false,\n symbolType: theme?.endSymbolType ?? 'arrow',\n size: 10 + (lineWidth || 1),\n style: {\n dy: 4,\n fill: lineColor,\n },\n },\n })\n\n if ((!selectorPoint && isArray(xValue)) || isString(xValue) || isNumber(xValue)) {\n const xValueArr = Array.isArray(xValue) ? xValue : [xValue]\n return xValueArr.map(generateOneMarkLine)\n }\n\n const selectedData = selectorPoint ? dataset.filter((datum) => selector(datum, selectorPoint)) : []\n\n return selectedData.map((datum) => {\n if (datum[unfoldInfo.encodingX]) {\n return generateOneMarkLine(datum[unfoldInfo.encodingX] as string)\n }\n if (datum[foldInfo.measureValue]) {\n return generateOneMarkLine(datum[foldInfo.measureValue] as string)\n }\n return {}\n })\n }) as IMarkLineSpec[]\n\n const specMarkLine = ((spec as ILineChartSpec).markLine as IMarkLineSpec[]) || []\n const newMarkLine = [...specMarkLine, ...(markLine || [])]\n\n return {\n ...spec,\n markLine: newMarkLine,\n }\n}\n"],"names":["annotationVerticalLine","spec","context","advancedVSeed","vseed","annotation","datasetReshapeInfo","config","unfoldInfo","foldInfo","theme","annotationVerticalLineList","Array","positionMap","markLine","selectorPoint","xValue","text","textPosition","textColor","textFontSize","textFontWeight","textAlign","textBaseline","lineColor","lineStyle","lineVisible","lineWidth","textBackgroundVisible","textBackgroundColor","textBackgroundBorderColor","textBackgroundBorderRadius","textBackgroundBorderWidth","textBackgroundPadding","dataset","generateOneMarkLine","x","ANNOTATION_Z_INDEX","isArray","isString","isNumber","xValueArr","selectedData","datum","selector","specMarkLine","newMarkLine"],"mappings":";;;AAMO,MAAMA,gDAAyC,CAACC,MAAMC;IAC3D,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,UAAU,EAAEC,kBAAkB,EAAEC,MAAM,EAAE,GAAGJ;IAEnD,MAAM,EAAEK,UAAU,EA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,KAAK,CAACnC,WAAW,SAAS,CAAC;YAExD,IAAImC,KAAK,CAAClC,SAAS,YAAY,CAAC,EAC9B,OAAO0B,oBAAoBQ,KAAK,CAAClC,SAAS,YAAY,CAAC;YAEzD,OAAO,CAAC;QACV;IACF;IAEA,MAAMoC,eAAiB5C,KAAwB,QAAQ,IAAwB,EAAE;IACjF,MAAM6C,cAAc;WAAID;WAAkB/B,YAAY,EAAE;KAAE;IAE1D,OAAO;QACL,GAAGb,IAAI;QACP,UAAU6C;IACZ;AACF"}
@@ -5,3 +5,4 @@ export { annotationHorizontalLine } from './annotationHorizontalLine';
5
5
  export { annotationArea } from './annotationArea';
6
6
  export { annotationAreaBand } from './annotationAreaBand';
7
7
  export { splitLine } from './splitLine';
8
+ export { annotationPointOfHistogram } from './annotationPointOfHistogram';
@@ -5,4 +5,5 @@ import { annotationHorizontalLine } from "./annotationHorizontalLine.js";
5
5
  import { annotationArea } from "./annotationArea.js";
6
6
  import { annotationAreaBand } from "./annotationAreaBand.js";
7
7
  import { splitLine } from "./splitLine.js";
8
- export { annotationArea, annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationPointOfDualAxis, annotationVerticalLine, splitLine };
8
+ import { annotationPointOfHistogram } from "./annotationPointOfHistogram.js";
9
+ export { annotationArea, annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationPointOfDualAxis, annotationPointOfHistogram, annotationVerticalLine, splitLine };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/annotation/splitLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/splitLine.ts"],"sourcesContent":["import type { ICartesianSeries, IChart, ILineChartSpec, IVChart } from '@visactor/vchart'\nimport { array, clamper, Color as VUtilColor } from '@visactor/vutils'\nimport { isNullish, isNumber, isPlainObject } from 'remeda'\nimport type { AnnotationHorizontalLine, VChartSpecPipe, Color } from 'src/types'\n\ninterface SplitConfig {\n points: { x: number; y: number }[]\n splitCoordinate: number\n lineStroke: {\n gradient: string\n x0: number\n x1: number\n y0: number\n y1: number\n stops: {\n color: string\n offset: number\n }[]\n }\n areaFill: {\n gradient: string\n x0: number\n x1: number\n y0: number\n y1: number\n stops: {\n color: string\n offset: number\n }[]\n }\n}\n\nconst formatGradientStops = (stops: { color: string; offset: number }[]) => {\n const firstInvalidateIndex = stops.findIndex((stop) => stop.offset < 0 || stop.offset > 1)\n\n if (firstInvalidateIndex >= 0) {\n if (stops[firstInvalidateIndex].offset > 1) {\n const newStops = stops.slice(0, firstInvalidateIndex + 1)\n newStops[newStops.length - 1].offset = 1\n\n return newStops\n }\n const newStops = stops.slice(firstInvalidateIndex + 1)\n\n newStops[0].offset = 0\n return newStops\n }\n\n return stops\n}\n\nexport const splitLine: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { annotation, chartType, datasetReshapeInfo } = advancedVSeed\n\n if (!annotation || !annotation.annotationHorizontalLine) {\n return spec\n }\n const baseConfig = advancedVSeed.config[chartType] as { color: Color }\n\n const splitLineConfig = array(annotation.annotationHorizontalLine).find(\n (item) => !!(item as AnnotationHorizontalLine).splitLine,\n ) as AnnotationHorizontalLine | undefined\n\n const splitValue = +(splitLineConfig?.yValue as number | string)\n\n if (Number.isNaN(splitValue) || !isNumber(splitValue)) {\n return spec\n }\n const result = { ...spec } as Partial<ILineChartSpec>\n const colorTheme = baseConfig?.color ?? {}\n const colorConfig = {\n positiveColor: colorTheme.positiveColor || 'red',\n negativeColor: colorTheme.negativeColor || 'green',\n ...(isPlainObject(splitLineConfig?.splitLine) ? splitLineConfig?.splitLine : {}),\n }\n\n const groupMark = {\n type: 'group',\n name: 'annotationHorizontalLine-splitLine',\n zIndex: 300,\n style: {\n splitConfig: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const lineSeries = chart.getAllSeries().find((s) => s.type === 'line' || s.type === 'area') as ICartesianSeries\n\n if (!lineSeries) {\n return\n }\n const lineMark = lineSeries.getMarkInName('line') ?? lineSeries.getMarkInName('area')\n\n if (!lineMark) {\n return\n }\n const lineGraphics = lineMark.getGraphics()\n\n if (!lineGraphics || lineGraphics.length !== 1 || !lineGraphics[0]) {\n return\n }\n const points = ((lineGraphics[0].attribute as any).points ?? []) as { x: number; y: number }[]\n\n if ((lineGraphics[0].attribute as any).segments?.length) {\n ;((lineGraphics[0].attribute as any).segments as any[]).forEach(\n (seg: { points: { x: number; y: number }[] }) => {\n seg.points.forEach((pt: { x: number; y: number }) => {\n points.push({ x: pt.x, y: pt.y })\n })\n },\n )\n }\n\n if (!points || !points.length) {\n return\n }\n const scale = lineSeries.getYAxisHelper().getScale!(0)\n const splitCoordinate = scale.scale(splitValue)\n const minY = Math.min(...points.map((p) => p.y))\n const maxY = Math.max(...points.map((p) => p.y))\n const ratio = (splitCoordinate - minY) / (maxY - minY)\n\n const lineStroke = {\n gradient: 'linear',\n x0: 0,\n x1: 0,\n y0: 0,\n y1: 1,\n stops: formatGradientStops([\n {\n color: colorConfig.positiveColor,\n offset: 0,\n },\n {\n color: colorConfig.positiveColor,\n offset: ratio,\n },\n {\n color: colorConfig.negativeColor,\n offset: ratio + 0.0000001,\n },\n {\n color: colorConfig.negativeColor,\n offset: 1,\n },\n ]),\n }\n const areaFill = {\n gradient: 'linear',\n x0: 0,\n x1: 0,\n y0: 0,\n y1: 1,\n stops: formatGradientStops([\n {\n color: colorConfig.positiveColor,\n offset: 0,\n },\n {\n color: new VUtilColor(colorConfig.positiveColor).setOpacity(0).toRGBA(),\n offset: ratio,\n },\n {\n offset: ratio + 0.0000001,\n color: new VUtilColor(colorConfig.negativeColor).setOpacity(0).toRGBA(),\n },\n {\n color: colorConfig.negativeColor,\n offset: 1,\n },\n ]),\n }\n const attrs: any = {\n segments: null,\n points,\n }\n\n if (lineGraphics[0].type === 'area') {\n attrs.stroke = lineStroke\n attrs.fill = areaFill\n } else {\n attrs.stroke = lineStroke\n }\n\n lineGraphics[0].setAttributes(attrs as unknown as Record<string, any>)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n lineGraphics[0].setFinalAttributes?.(attrs)\n const start = lineSeries.getRegion().getLayoutStartPoint()\n const range = scale.range() as number[]\n\n return {\n points: points.map((entry) => ({ x: entry.x + start.x, y: entry.y + start.y })),\n splitCoordinate: clamper(range[0], range[range.length - 1])(splitCoordinate as number) + start.y,\n areaFill,\n lineStroke,\n } as SplitConfig\n },\n },\n children: [\n {\n type: 'area',\n interactive: false,\n zIndex: 500,\n style: {\n fillOpacity: 0.5,\n points: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.splitConfig) {\n const { points, splitCoordinate } = parentNode.attribute.splitConfig as SplitConfig\n\n return points.map((entry: { x: number; y: number }) => {\n return {\n ...entry,\n y1: splitCoordinate,\n }\n })\n }\n\n return []\n },\n fill: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.splitConfig) {\n const { areaFill } = parentNode.attribute.splitConfig as SplitConfig\n\n return areaFill\n }\n\n return\n },\n },\n },\n ],\n }\n\n if (!result.customMark) {\n result.customMark = []\n }\n\n ;(result.customMark as any[]).push(groupMark)\n\n const seriesSpec =\n result.type === 'line' || result.type === 'area'\n ? result\n : result.series?.find((s) => s.type === 'line' || s.type === 'area')\n\n if (seriesSpec) {\n if (!seriesSpec.point) {\n seriesSpec.point = {}\n }\n if (!seriesSpec.line) {\n seriesSpec.line = {}\n }\n\n if (!seriesSpec.point.style) {\n seriesSpec.point.style = {}\n }\n if (!seriesSpec.line.style) {\n seriesSpec.line.style = {}\n }\n\n const measureValueKey = datasetReshapeInfo[0].foldInfo.measureValue\n\n seriesSpec.point.style.fill = (datum) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n }\n seriesSpec.line.style.stroke = (datum) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n }\n if (seriesSpec.label && (seriesSpec.label as any).visible && isNullish((seriesSpec.label as any).style?.fill)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n ;(seriesSpec.label as any).style = {\n ...(seriesSpec.label as any).style,\n fill: (datum: any) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n },\n }\n }\n }\n\n return result\n}\n"],"names":["formatGradientStops","stops","firstInvalidateIndex","stop","newStops","splitLine","spec","context","advancedVSeed","annotation","chartType","datasetReshapeInfo","baseConfig","splitLineConfig","array","item","splitValue","Number","isNumber","result","colorTheme","colorConfig","isPlainObject","groupMark","datum","ctx","vchart","chart","lineSeries","s","lineMark","lineGraphics","points","seg","pt","scale","splitCoordinate","minY","Math","p","maxY","ratio","lineStroke","areaFill","VUtilColor","attrs","start","range","entry","clamper","opt","parentNode","seriesSpec","measureValueKey","isNullish"],"mappings":";;AAgCA,MAAMA,sBAAsB,CAACC;IAC3B,MAAMC,uBAAuBD,MAAM,SAAS,CAAC,CAACE,OAASA,KAAK,MAAM,GAAG,KAAKA,KAAK,MAAM,GAAG;IAExF,IAAID,wBAAwB,GAAG;QAC7B,IAAID,KAAK,CAACC,qBAAqB,CAAC,MAAM,GAAG,GAAG;YAC1C,MAAME,WAAWH,MAAM,KAAK,CAAC,GAAGC,uBAAuB;YACvDE,QAAQ,CAACA,SAAS,MAAM,GAAG,EAAE,CAAC,MAAM,GAAG;YAEvC,OAAOA;QACT;QACA,MAAMA,WAAWH,MAAM,KAAK,CAACC,uBAAuB;QAEpDE,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG;QACrB,OAAOA;IACT;IAEA,OAAOH;AACT;AAEO,MAAMI,YAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,UAAU,EAAEC,SAAS,EAAEC,kBAAkB,EAAE,GAAGH;IAEtD,IAAI,CAACC,cAAc,CAACA,WAAW,wBAAwB,EACrD,OAAOH;IAET,MAAMM,aAAaJ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A,WAAW,KAAK,CAAS,KAAK;YAClC,MAAM,CAAC5B,QACEA,OAAO,CAAC6B,gBAAgB,GAAGrC,aAAaK,YAAY,aAAa,GAAGA,YAAY,aAAa;QAExG;IAEJ;IAEA,OAAOF;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/annotation/splitLine.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/annotation/splitLine.ts"],"sourcesContent":["import type { ICartesianSeries, IChart, ILineChartSpec, IVChart } from '@visactor/vchart'\nimport { array, clamper, Color as VUtilColor } from '@visactor/vutils'\nimport { isNullish, isNumber, isPlainObject } from 'remeda'\nimport type { AnnotationHorizontalLine, VChartSpecPipe, Color } from 'src/types'\n\ninterface SplitConfig {\n points: { x: number; y: number }[]\n splitCoordinate: number\n lineStroke: {\n gradient: string\n x0: number\n x1: number\n y0: number\n y1: number\n stops: {\n color: string\n offset: number\n }[]\n }\n areaFill: {\n gradient: string\n x0: number\n x1: number\n y0: number\n y1: number\n stops: {\n color: string\n offset: number\n }[]\n }\n}\n\nconst formatGradientStops = (stops: { color: string; offset: number }[]) => {\n const firstInvalidateIndex = stops.findIndex((stop) => stop.offset < 0 || stop.offset > 1)\n\n if (firstInvalidateIndex >= 0) {\n if (stops[firstInvalidateIndex].offset > 1) {\n const newStops = stops.slice(0, firstInvalidateIndex + 1)\n newStops[newStops.length - 1].offset = 1\n\n return newStops\n }\n const newStops = stops.slice(firstInvalidateIndex + 1)\n\n newStops[0].offset = 0\n return newStops\n }\n\n return stops\n}\n\nexport const splitLine: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { annotation, chartType, datasetReshapeInfo } = advancedVSeed\n\n if (!annotation || !annotation.annotationHorizontalLine) {\n return spec\n }\n const baseConfig = advancedVSeed.config[chartType] as { color: Color }\n\n const splitLineConfig = array(annotation.annotationHorizontalLine).find(\n (item) => !!(item as AnnotationHorizontalLine).splitLine,\n ) as AnnotationHorizontalLine | undefined\n\n const splitValue = +(splitLineConfig?.yValue as number | string)\n\n if (Number.isNaN(splitValue) || !isNumber(splitValue)) {\n return spec\n }\n const result = { ...spec } as Partial<ILineChartSpec>\n const colorTheme = baseConfig?.color ?? {}\n const colorConfig = {\n positiveColor: colorTheme.positiveColor || 'red',\n negativeColor: colorTheme.negativeColor || 'green',\n ...(isPlainObject(splitLineConfig?.splitLine) ? splitLineConfig?.splitLine : {}),\n }\n\n const groupMark = {\n type: 'group',\n name: 'annotationHorizontalLine-splitLine',\n zIndex: 300,\n style: {\n splitConfig: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const lineSeries = chart.getAllSeries().find((s) => s.type === 'line' || s.type === 'area') as ICartesianSeries\n\n if (!lineSeries) {\n return\n }\n const lineMark = lineSeries.getMarkInName('line') ?? lineSeries.getMarkInName('area')\n\n if (!lineMark) {\n return\n }\n const lineGraphics = lineMark.getGraphics()\n\n if (!lineGraphics || lineGraphics.length !== 1 || !lineGraphics[0]) {\n return\n }\n const points = ((lineGraphics[0].attribute as any).points ?? []) as { x: number; y: number }[]\n\n if ((lineGraphics[0].attribute as any).segments?.length) {\n ;((lineGraphics[0].attribute as any).segments as any[]).forEach(\n (seg: { points: { x: number; y: number }[] }) => {\n seg.points.forEach((pt: { x: number; y: number }) => {\n points.push({ x: pt.x, y: pt.y })\n })\n },\n )\n }\n\n if (!points || !points.length) {\n return\n }\n const scale = lineSeries.getYAxisHelper().getScale!(0)\n const splitCoordinate = scale.scale(splitValue)\n const minY = Math.min(...points.map((p) => p.y))\n const maxY = Math.max(...points.map((p) => p.y))\n const ratio = (splitCoordinate - minY) / (maxY - minY)\n\n const lineStroke = {\n gradient: 'linear',\n x0: 0,\n x1: 0,\n y0: 0,\n y1: 1,\n stops: formatGradientStops([\n {\n color: colorConfig.positiveColor,\n offset: 0,\n },\n {\n color: colorConfig.positiveColor,\n offset: ratio,\n },\n {\n color: colorConfig.negativeColor,\n offset: ratio + 0.0000001,\n },\n {\n color: colorConfig.negativeColor,\n offset: 1,\n },\n ]),\n }\n const areaFill = {\n gradient: 'linear',\n x0: 0,\n x1: 0,\n y0: 0,\n y1: 1,\n stops: formatGradientStops([\n {\n color: colorConfig.positiveColor,\n offset: 0,\n },\n {\n color: new VUtilColor(colorConfig.positiveColor).setOpacity(0).toRGBA(),\n offset: ratio,\n },\n {\n offset: ratio + 0.0000001,\n color: new VUtilColor(colorConfig.negativeColor).setOpacity(0).toRGBA(),\n },\n {\n color: colorConfig.negativeColor,\n offset: 1,\n },\n ]),\n }\n const attrs: any = {\n segments: null,\n points,\n }\n\n if (lineGraphics[0].type === 'area') {\n attrs.stroke = lineStroke\n attrs.fill = areaFill\n } else {\n attrs.stroke = lineStroke\n }\n\n lineGraphics[0].setAttributes(attrs as unknown as Record<string, any>)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n lineGraphics[0].setFinalAttributes?.(attrs)\n const start = lineSeries.getRegion().getLayoutStartPoint()\n const range = scale.range() as number[]\n\n return {\n points: points.map((entry) => ({ x: entry.x + start.x, y: entry.y + start.y })),\n splitCoordinate: clamper(range[0], range[range.length - 1])(splitCoordinate as number) + start.y,\n areaFill,\n lineStroke,\n } as SplitConfig\n },\n },\n children: [\n {\n type: 'area',\n interactive: false,\n zIndex: 500,\n style: {\n fillOpacity: 0.5,\n points: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.splitConfig) {\n const { points, splitCoordinate } = parentNode.attribute.splitConfig as SplitConfig\n\n return points.map((entry: { x: number; y: number }) => {\n return {\n ...entry,\n y1: splitCoordinate,\n }\n })\n }\n\n return []\n },\n fill: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.splitConfig) {\n const { areaFill } = parentNode.attribute.splitConfig as SplitConfig\n\n return areaFill\n }\n\n return\n },\n },\n },\n ],\n }\n\n if (!result.customMark) {\n result.customMark = []\n }\n\n ;(result.customMark as any[]).push(groupMark)\n\n const seriesSpec =\n result.type === 'line' || result.type === 'area'\n ? result\n : result.series?.find((s) => s.type === 'line' || s.type === 'area')\n\n if (seriesSpec) {\n if (!seriesSpec.point) {\n seriesSpec.point = {}\n }\n if (!seriesSpec.line) {\n seriesSpec.line = {}\n }\n\n if (!seriesSpec.point.style) {\n seriesSpec.point.style = {}\n }\n if (!seriesSpec.line.style) {\n seriesSpec.line.style = {}\n }\n\n const measureValueKey = datasetReshapeInfo[0].foldInfo.measureValue\n\n seriesSpec.point.style.fill = (datum) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n }\n seriesSpec.line.style.stroke = (datum) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n }\n if (seriesSpec.label && (seriesSpec.label as any).visible && isNullish((seriesSpec.label as any).style?.fill)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n ;(seriesSpec.label as any).style = {\n ...(seriesSpec.label as any).style,\n fill: (datum: any) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n },\n }\n }\n }\n\n return result\n}\n"],"names":["formatGradientStops","stops","firstInvalidateIndex","stop","newStops","splitLine","spec","context","advancedVSeed","annotation","chartType","datasetReshapeInfo","baseConfig","splitLineConfig","array","item","splitValue","Number","isNumber","result","colorTheme","colorConfig","isPlainObject","groupMark","datum","ctx","vchart","chart","lineSeries","s","lineMark","lineGraphics","points","seg","pt","scale","splitCoordinate","minY","Math","p","maxY","ratio","lineStroke","areaFill","VUtilColor","attrs","start","range","entry","clamper","opt","parentNode","seriesSpec","measureValueKey","isNullish"],"mappings":";;AAgCA,MAAMA,sBAAsB,CAACC;IAC3B,MAAMC,uBAAuBD,MAAM,SAAS,CAAC,CAACE,OAASA,KAAK,MAAM,GAAG,KAAKA,KAAK,MAAM,GAAG;IAExF,IAAID,wBAAwB,GAAG;QAC7B,IAAID,KAAK,CAACC,qBAAqB,CAAC,MAAM,G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B,MAAMC,kBAAkB1C,kBAAkB,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY;QAEnEyC,WAAW,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC5B,QACtBA,OAAO,CAAC6B,gBAAgB,GAAGrC,aAAaK,YAAY,aAAa,GAAGA,YAAY,aAAa;QAEtG+B,WAAW,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC5B,QACvBA,OAAO,CAAC6B,gBAAgB,GAAGrC,aAAaK,YAAY,aAAa,GAAGA,YAAY,aAAa;QAEtG,IAAI+B,WAAW,KAAK,IAAKA,WAAW,KAAK,CAAS,OAAO,IAAIE,UAAWF,WAAW,KAAK,CAAS,KAAK,EAAE,OAEpGA,WAAW,KAAK,CAAS,KAAK,GAAG;YACjC,GAAIA,WAAW,KAAK,CAAS,KAAK;YAClC,MAAM,CAAC5B,QACEA,OAAO,CAAC6B,gBAAgB,GAAGrC,aAAaK,YAAY,aAAa,GAAGA,YAAY,aAAa;QAExG;IAEJ;IAEA,OAAOF;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/annotation/utils.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/utils.ts"],"sourcesContent":["import type { Datum } from 'src/types'\n\nexport const isSubset = (sub: Datum, obj: Datum, excludeMeasuresIds?: string[]) => {\n return Object.entries(sub).every(([key, value]) => {\n if (excludeMeasuresIds && excludeMeasuresIds.includes(key)) {\n return false\n }\n\n if (typeof value === 'string') {\n return obj[key] === value\n }\n if (typeof value === 'number') {\n return obj[key] === value\n }\n return true\n })\n}\n\nexport const ANNOTATION_AREA_TEXT_STYLE_BY_POSITION = {\n top: {\n textAlign: 'center',\n textBaseline: 'top',\n },\n topRight: {\n textAlign: 'right',\n textBaseline: 'top',\n },\n topLeft: {\n textAlign: 'left',\n textBaseline: 'top',\n },\n bottom: {\n textAlign: 'center',\n textBaseline: 'bottom',\n },\n bottomLeft: {\n textAlign: 'left',\n textBaseline: 'bottom',\n },\n bottomRight: {\n textAlign: 'right',\n textBaseline: 'bottom',\n },\n left: {\n textAlign: 'left',\n textBaseline: 'middle',\n },\n right: {\n textAlign: 'right',\n textBaseline: 'middle',\n },\n}\n"],"names":["isSubset","sub","obj","excludeMeasuresIds","Object","key","value","ANNOTATION_AREA_TEXT_STYLE_BY_POSITION"],"mappings":"AAEO,MAAMA,WAAW,CAACC,KAAYC,KAAYC,qBACxCC,OAAO,OAAO,CAACH,KAAK,KAAK,CAAC,CAAC,CAACI,KAAKC,MAAM;QAC5C,IAAIH,sBAAsBA,mBAAmB,QAAQ,CAACE,MACpD,OAAO;QAGT,IAAI,AAAiB,YAAjB,OAAOC,OACT,OAAOJ,GAAG,CAACG,IAAI,KAAKC;QAEtB,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOJ,GAAG,CAACG,IAAI,KAAKC;QAEtB,OAAO;IACT;AAGK,MAAMC,yCAAyC;IACpD,KAAK;QACH,WAAW;QACX,cAAc;IAChB;IACA,UAAU;QACR,WAAW;QACX,cAAc;IAChB;IACA,SAAS;QACP,WAAW;QACX,cAAc;IAChB;IACA,QAAQ;QACN,WAAW;QACX,cAAc;IAChB;IACA,YAAY;QACV,WAAW;QACX,cAAc;IAChB;IACA,aAAa;QACX,WAAW;QACX,cAAc;IAChB;IACA,MAAM;QACJ,WAAW;QACX,cAAc;IAChB;IACA,OAAO;QACL,WAAW;QACX,cAAc;IAChB;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/annotation/utils.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/annotation/utils.ts"],"sourcesContent":["import type { Datum } from 'src/types'\n\nexport const isSubset = (sub: Datum, obj: Datum, excludeMeasuresIds?: string[]) => {\n return Object.entries(sub).every(([key, value]) => {\n if (excludeMeasuresIds && excludeMeasuresIds.includes(key)) {\n return false\n }\n\n if (typeof value === 'string') {\n return obj[key] === value\n }\n if (typeof value === 'number') {\n return obj[key] === value\n }\n return true\n })\n}\n\nexport const ANNOTATION_AREA_TEXT_STYLE_BY_POSITION = {\n top: {\n textAlign: 'center',\n textBaseline: 'top',\n },\n topRight: {\n textAlign: 'right',\n textBaseline: 'top',\n },\n topLeft: {\n textAlign: 'left',\n textBaseline: 'top',\n },\n bottom: {\n textAlign: 'center',\n textBaseline: 'bottom',\n },\n bottomLeft: {\n textAlign: 'left',\n textBaseline: 'bottom',\n },\n bottomRight: {\n textAlign: 'right',\n textBaseline: 'bottom',\n },\n left: {\n textAlign: 'left',\n textBaseline: 'middle',\n },\n right: {\n textAlign: 'right',\n textBaseline: 'middle',\n },\n}\n"],"names":["isSubset","sub","obj","excludeMeasuresIds","Object","key","value","ANNOTATION_AREA_TEXT_STYLE_BY_POSITION"],"mappings":"AAEO,MAAMA,WAAW,CAACC,KAAYC,KAAYC,qBACxCC,OAAO,OAAO,CAACH,KAAK,KAAK,CAAC,CAAC,CAACI,KAAKC,MAAM;QAC5C,IAAIH,sBAAsBA,mBAAmB,QAAQ,CAACE,MACpD,OAAO;QAGT,IAAI,AAAiB,YAAjB,OAAOC,OACT,OAAOJ,GAAG,CAACG,IAAI,KAAKC;QAEtB,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOJ,GAAG,CAACG,IAAI,KAAKC;QAEtB,OAAO;IACT;AAGK,MAAMC,yCAAyC;IACpD,KAAK;QACH,WAAW;QACX,cAAc;IAChB;IACA,UAAU;QACR,WAAW;QACX,cAAc;IAChB;IACA,SAAS;QACP,WAAW;QACX,cAAc;IAChB;IACA,QAAQ;QACN,WAAW;QACX,cAAc;IAChB;IACA,YAAY;QACV,WAAW;QACX,cAAc;IAChB;IACA,aAAa;QACX,WAAW;QACX,cAAc;IAChB;IACA,MAAM;QACJ,WAAW;QACX,cAAc;IAChB;IACA,OAAO;QACL,WAAW;QACX,cAAc;IAChB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/format/linearFormat.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/format/linearFormat.ts"],"sourcesContent":["import { isEmpty, isNullish } from 'remeda'\nimport { autoFormatter } from 'src/pipeline/utils'\nimport type { Formatter, NumFormat } from 'src/types'\n\nexport const createLinearFormat = (\n value: string | number,\n autoFormat: boolean | undefined,\n numFormat: NumFormat,\n formatter: Formatter,\n) => {\n if (isNullish(autoFormat) && isEmpty(numFormat)) {\n return autoFormatter(value)\n }\n\n if (autoFormat === true) {\n return autoFormatter(value)\n }\n\n if (!isEmpty(numFormat)) {\n return formatter(value)\n }\n\n return String(value)\n}\n\nexport const createLinearPercentFormat = (\n value: string | number,\n autoFormat: boolean | undefined,\n numFormat: NumFormat,\n formatter: Formatter,\n percentFormatter: Formatter,\n) => {\n if (isNullish(autoFormat) && isEmpty(numFormat)) {\n return percentFormatter(value)\n }\n\n if (autoFormat === true) {\n return percentFormatter(value)\n }\n\n if (!isEmpty(numFormat)) {\n return formatter(value)\n }\n\n return String(value)\n}\n"],"names":["createLinearFormat","value","autoFormat","numFormat","formatter","isNullish","isEmpty","autoFormatter","String","createLinearPercentFormat","percentFormatter"],"mappings":";;AAIO,MAAMA,qBAAqB,CAChCC,OACAC,YACAC,WACAC;IAEA,IAAIC,UAAUH,eAAeI,QAAQH,YACnC,OAAOI,cAAcN;IAGvB,IAAIC,AAAe,SAAfA,YACF,OAAOK,cAAcN;IAGvB,IAAI,CAACK,QAAQH,YACX,OAAOC,UAAUH;IAGnB,OAAOO,OAAOP;AAChB;AAEO,MAAMQ,4BAA4B,CACvCR,OACAC,YACAC,WACAC,WACAM;IAEA,IAAIL,UAAUH,eAAeI,QAAQH,YACnC,OAAOO,iBAAiBT;IAG1B,IAAIC,AAAe,SAAfA,YACF,OAAOQ,iBAAiBT;IAG1B,IAAI,CAACK,QAAQH,YACX,OAAOC,UAAUH;IAGnB,OAAOO,OAAOP;AAChB"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/format/linearFormat.js","sources":["../../../../../../../../src/pipeline/spec/chart/pipes/axes/format/linearFormat.ts"],"sourcesContent":["import { isEmpty, isNullish } from 'remeda'\nimport { autoFormatter } from 'src/pipeline/utils'\nimport type { Formatter, NumFormat } from 'src/types'\n\nexport const createLinearFormat = (\n value: string | number,\n autoFormat: boolean | undefined,\n numFormat: NumFormat,\n formatter: Formatter,\n) => {\n if (isNullish(autoFormat) && isEmpty(numFormat)) {\n return autoFormatter(value)\n }\n\n if (autoFormat === true) {\n return autoFormatter(value)\n }\n\n if (!isEmpty(numFormat)) {\n return formatter(value)\n }\n\n return String(value)\n}\n\nexport const createLinearPercentFormat = (\n value: string | number,\n autoFormat: boolean | undefined,\n numFormat: NumFormat,\n formatter: Formatter,\n percentFormatter: Formatter,\n) => {\n if (isNullish(autoFormat) && isEmpty(numFormat)) {\n return percentFormatter(value)\n }\n\n if (autoFormat === true) {\n return percentFormatter(value)\n }\n\n if (!isEmpty(numFormat)) {\n return formatter(value)\n }\n\n return String(value)\n}\n"],"names":["createLinearFormat","value","autoFormat","numFormat","formatter","isNullish","isEmpty","autoFormatter","String","createLinearPercentFormat","percentFormatter"],"mappings":";;AAIO,MAAMA,qBAAqB,CAChCC,OACAC,YACAC,WACAC;IAEA,IAAIC,UAAUH,eAAeI,QAAQH,YACnC,OAAOI,cAAcN;IAGvB,IAAIC,AAAe,SAAfA,YACF,OAAOK,cAAcN;IAGvB,IAAI,CAACK,QAAQH,YACX,OAAOC,UAAUH;IAGnB,OAAOO,OAAOP;AAChB;AAEO,MAAMQ,4BAA4B,CACvCR,OACAC,YACAC,WACAC,WACAM;IAEA,IAAIL,UAAUH,eAAeI,QAAQH,YACnC,OAAOO,iBAAiBT;IAG1B,IAAIC,AAAe,SAAfA,YACF,OAAOQ,iBAAiBT;IAG1B,IAAI,CAACK,QAAQH,YACX,OAAOC,UAAUH;IAGnB,OAAOO,OAAOP;AAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/radarAngle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radarAngle.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radarAngleAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n orient: 'angle',\n visible: true,\n zero: true,\n nice: true,\n grid: {\n visible: true,\n },\n domainLine: {\n visible: true,\n },\n tick: {\n visible: true,\n },\n })\n\n return result\n}\n"],"names":["radarAngleAxis","spec","result"],"mappings":"AAGO,MAAMA,iBAAiC,CAACC;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,MAAM;YACJ,SAAS;QACX;QACA,YAAY;YACV,SAAS;QACX;QACA,MAAM;YACJ,SAAS;QACX;IACF;IAEA,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/radarAngle.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/axes/radarAngle.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radarAngleAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n orient: 'angle',\n visible: true,\n zero: true,\n nice: true,\n grid: {\n visible: true,\n },\n domainLine: {\n visible: true,\n },\n tick: {\n visible: true,\n },\n })\n\n return result\n}\n"],"names":["radarAngleAxis","spec","result"],"mappings":"AAGO,MAAMA,iBAAiC,CAACC;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,MAAM;YACJ,SAAS;QACX;QACA,YAAY;YACV,SAAS;QACX;QACA,MAAM;YACJ,SAAS;QACX;IACF;IAEA,OAAOA;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/radarRadius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radarRadius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radarRadiusAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n orient: 'radius',\n visible: true,\n zero: true,\n nice: true,\n grid: {\n visible: true,\n },\n tick: {\n visible: true,\n },\n label: {\n visible: true,\n },\n domainLine: {\n visible: true,\n },\n })\n\n return result\n}\n"],"names":["radarRadiusAxis","spec","result"],"mappings":"AAGO,MAAMA,kBAAkC,CAACC;IAC9C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,MAAM;YACJ,SAAS;QACX;QACA,MAAM;YACJ,SAAS;QACX;QACA,OAAO;YACL,SAAS;QACX;QACA,YAAY;YACV,SAAS;QACX;IACF;IAEA,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/radarRadius.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/axes/radarRadius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radarRadiusAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n orient: 'radius',\n visible: true,\n zero: true,\n nice: true,\n grid: {\n visible: true,\n },\n tick: {\n visible: true,\n },\n label: {\n visible: true,\n },\n domainLine: {\n visible: true,\n },\n })\n\n return result\n}\n"],"names":["radarRadiusAxis","spec","result"],"mappings":"AAGO,MAAMA,kBAAkC,CAACC;IAC9C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,MAAM;YACJ,SAAS;QACX;QACA,MAAM;YACJ,SAAS;QACX;QACA,OAAO;YACL,SAAS;QACX;QACA,YAAY;YACV,SAAS;QACX;IACF;IAEA,OAAOA;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/radius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radiusAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n type: 'linear',\n orient: 'radius',\n visible: false,\n zero: true,\n nice: false,\n })\n\n return result\n}\n"],"names":["radiusAxis","spec","result"],"mappings":"AAGO,MAAMA,aAA6B,CAACC;IACzC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,MAAM;QACN,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;IACR;IAEA,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/radius.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/axes/radius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radiusAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n type: 'linear',\n orient: 'radius',\n visible: false,\n zero: true,\n nice: false,\n })\n\n return result\n}\n"],"names":["radiusAxis","spec","result"],"mappings":"AAGO,MAAMA,aAA6B,CAACC;IACzC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,MAAM;QACN,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;IACR;IAEA,OAAOA;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/title/defaultTitleText.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/title/defaultTitleText.ts"],"sourcesContent":["import { findAllMeasures } from 'src/pipeline/utils'\nimport type { Dimensions, MeasureTree } from 'src/types'\n\nexport const defaultTitleText = (measures: MeasureTree, dimensions: Dimensions, idList: string[] = []) => {\n const allMeasures = findAllMeasures(measures)\n return idList\n .map((id) => {\n const alias = [...allMeasures, ...dimensions].find((f) => f.id === id)?.alias || ''\n return alias\n })\n .join(' & ')\n}\n"],"names":["defaultTitleText","measures","dimensions","idList","allMeasures","findAllMeasures","id","alias","f"],"mappings":";AAGO,MAAMA,mBAAmB,CAACC,UAAuBC,YAAwBC,SAAmB,EAAE;IACnG,MAAMC,cAAcC,gBAAgBJ;IACpC,OAAOE,OACJ,GAAG,CAAC,CAACG;QACJ,MAAMC,QAAQ;eAAIH;eAAgBF;SAAW,CAAC,IAAI,CAAC,CAACM,IAAMA,EAAE,EAAE,KAAKF,KAAK,SAAS;QACjF,OAAOC;IACT,GACC,IAAI,CAAC;AACV"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/title/defaultTitleText.js","sources":["../../../../../../../../src/pipeline/spec/chart/pipes/axes/title/defaultTitleText.ts"],"sourcesContent":["import { findAllMeasures } from 'src/pipeline/utils'\nimport type { Dimensions, MeasureTree } from 'src/types'\n\nexport const defaultTitleText = (measures: MeasureTree, dimensions: Dimensions, idList: string[] = []) => {\n const allMeasures = findAllMeasures(measures)\n return idList\n .map((id) => {\n const alias = [...allMeasures, ...dimensions].find((f) => f.id === id)?.alias || ''\n return alias\n })\n .join(' & ')\n}\n"],"names":["defaultTitleText","measures","dimensions","idList","allMeasures","findAllMeasures","id","alias","f"],"mappings":";AAGO,MAAMA,mBAAmB,CAACC,UAAuBC,YAAwBC,SAAmB,EAAE;IACnG,MAAMC,cAAcC,gBAAgBJ;IACpC,OAAOE,OACJ,GAAG,CAAC,CAACG;QACJ,MAAMC,QAAQ;eAAIH;eAAgBF;SAAW,CAAC,IAAI,CAAC,CAACM,IAAMA,EAAE,EAAE,KAAKF,KAAK,SAAS;QACjF,OAAOC;IACT,GACC,IAAI,CAAC;AACV"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/xBand.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/xBand.ts"],"sourcesContent":["import type { ICartesianBandAxisSpec, ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis } from 'src/types'\nimport { defaultTitleText } from './title/defaultTitleText'\nimport { AXIS_LABEL_SPACE } from 'src/pipeline/utils'\nimport { MeasureId } from 'src/dataReshape'\nimport { isArray } from '@visactor/vutils'\n\nexport const xBand: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed\n const config = (advancedVSeed.config?.[chartType as 'column']?.xAxis ?? {}) as XBandAxis\n\n if (!result.axes) {\n result.axes = []\n }\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n labelAutoHide,\n labelAutoHideGap,\n labelAutoLimit,\n labelAutoLimitLength = 80,\n labelAutoRotate,\n labelAutoRotateAngleRange,\n } = config\n\n const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit)\n const onlyMeasureId = (encoding.x || []).filter((v) => v !== MeasureId).length === 0\n\n const bandAxis = {\n visible,\n type: 'band',\n orient: 'bottom',\n maxHeight: labelAutoLimitLength + 60,\n sampling,\n hover: true,\n label: {\n visible: label?.visible,\n flush: true,\n space: AXIS_LABEL_SPACE,\n style: {\n maxLineWidth: labelAutoLimitLength,\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n\n // 防重叠相关\n minGap: labelAutoHideGap,\n autoHide: labelAutoHide,\n autoHideMethod: 'greedy',\n autoHideSeparation: labelAutoHideGap,\n autoLimit: labelAutoLimit,\n autoRotate: labelAutoRotate,\n autoRotateAngle: labelAutoRotateAngleRange,\n lastVisible: true,\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n paddingInner: [0.15, 0.1],\n paddingOuter: [0.075, 0.1],\n } as ICartesianBandAxisSpec\n if (onlyMeasureId && bandAxis.label) {\n const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo\n const colorIdMap = allDatasetReshapeInfo.reduce<Record<string, { id: string; alias: string }>>((prev, cur) => {\n return { ...prev, ...cur.unfoldInfo.colorIdMap }\n }, {})\n\n bandAxis.label.formatMethod = (text: string | string[]) => {\n return isArray(text) ? text : (colorIdMap[String(text)]?.alias ?? text)\n }\n }\n\n result.axes = [...result.axes, bandAxis] as ISpec['axes']\n return result\n}\n"],"names":["xBand","spec","context","result","advancedVSeed","vseed","chartType","measures","dimensions","encoding","datasetReshapeInfo","pivotAllDatasetReshapeInfo","config","visible","label","tick","title","grid","line","labelAutoHide","labelAutoHideGap","labelAutoLimit","labelAutoLimitLength","labelAutoRotate","labelAutoRotateAngleRange","sampling","onlyMeasureId","v","MeasureId","bandAxis","AXIS_LABEL_SPACE","defaultTitleText","allDatasetReshapeInfo","colorIdMap","prev","cur","text","isArray","String"],"mappings":";;;;AAOO,MAAMA,QAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,kBAAkB,EAAEC,0BAA0B,EAAE,GAAGP;IAC3F,MAAMQ,SAAUR,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE,SAAS,CAAC;IAEzE,IAAI,CAACH,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAM,EACJU,UAAU,IAAI,EACdC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,IAAI,EACJC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,uBAAuB,EAAE,EACzBC,eAAe,EACfC,yBAAyB,EAC1B,GAAGZ;IAEJ,MAAMa,WAAW,CAAEN,CAAAA,iBAAiBI,mBAAmBF,cAAa;IACpE,MAAMK,gBAAiBjB,AAA4D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SAAS,KAAK,CAAC,YAAY,GAAG,CAACO,OACtBC,QAAQD,QAAQA,OAAQH,UAAU,CAACK,OAAOF,MAAM,EAAE,SAASA;IAEtE;IAEAjC,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAE0B;KAAS;IACxC,OAAO1B;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/xBand.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/axes/xBand.ts"],"sourcesContent":["import type { ICartesianBandAxisSpec, ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis } from 'src/types'\nimport { defaultTitleText } from './title/defaultTitleText'\nimport { AXIS_LABEL_SPACE } from 'src/pipeline/utils'\nimport { MeasureId } from 'src/dataReshape'\nimport { isArray } from '@visactor/vutils'\n\nexport const xBand: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed\n const config = (advancedVSeed.config?.[chartType as 'column']?.xAxis ?? {}) as XBandAxis\n\n if (!result.axes) {\n result.axes = []\n }\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n labelAutoHide,\n labelAutoHideGap,\n labelAutoLimit,\n labelAutoLimitLength = 80,\n labelAutoRotate,\n labelAutoRotateAngleRange,\n } = config\n\n const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit)\n const onlyMeasureId = (encoding.x || []).filter((v) => v !== MeasureId).length === 0\n\n const bandAxis = {\n visible,\n type: 'band',\n orient: 'bottom',\n maxHeight: labelAutoLimitLength + 60,\n sampling,\n hover: true,\n label: {\n visible: label?.visible,\n flush: true,\n space: AXIS_LABEL_SPACE,\n style: {\n maxLineWidth: labelAutoLimitLength,\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n\n // 防重叠相关\n minGap: labelAutoHideGap,\n autoHide: labelAutoHide,\n autoHideMethod: 'greedy',\n autoHideSeparation: labelAutoHideGap,\n autoLimit: labelAutoLimit,\n autoRotate: labelAutoRotate,\n autoRotateAngle: labelAutoRotateAngleRange,\n lastVisible: true,\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n paddingInner: [0.15, 0.1],\n paddingOuter: [0.075, 0.1],\n } as ICartesianBandAxisSpec\n if (onlyMeasureId && bandAxis.label) {\n const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo\n const colorIdMap = allDatasetReshapeInfo.reduce<Record<string, { id: string; alias: string }>>((prev, cur) => {\n return { ...prev, ...cur.unfoldInfo.colorIdMap }\n }, {})\n\n bandAxis.label.formatMethod = (text: string | string[]) => {\n return isArray(text) ? text : (colorIdMap[String(text)]?.alias ?? text)\n }\n }\n\n result.axes = [...result.axes, bandAxis] as ISpec['axes']\n return result\n}\n"],"names":["xBand","spec","context","result","advancedVSeed","vseed","chartType","measures","dimensions","encoding","datasetReshapeInfo","pivotAllDatasetReshapeInfo","config","visible","label","tick","title","grid","line","labelAutoHide","labelAutoHideGap","labelAutoLimit","labelAutoLimitLength","labelAutoRotate","labelAutoRotateAngleRange","sampling","onlyMeasureId","v","MeasureId","bandAxis","AXIS_LABEL_SPACE","defaultTitleText","allDatasetReshapeInfo","colorIdMap","prev","cur","text","isArray","String"],"mappings":";;;;AAOO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C;YAC3E,OAAO;gBACL,MAAMO,OAAO;gBACb,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,MAAM;YACJ,SAASD,MAAM;YACf,UAAUA,MAAM;YAChB,QAAQA,MAAM;YACd,OAAO;gBACL,QAAQA,MAAM;YAChB;QACF;QACA,MAAM;YACJ,SAASE,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;gBACd,UAAUA,MAAM;YAClB;QACF;QACA,YAAY;YACV,SAASC,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;YAChB;QACF;QACA,cAAc;YAAC;YAAM;SAAI;QACzB,cAAc;YAAC;YAAO;SAAI;IAC5B;IACA,IAAIQ,iBAAiBG,SAAS,KAAK,EAAE;QACnC,MAAMG,wBAAwBrB,8BAA8BD;QAC5D,MAAMuB,aAAaD,sBAAsB,MAAM,CAAgD,CAACE,MAAMC,MAC7F;gBAAE,GAAGD,IAAI;gBAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;YAAC,IAC9C,CAAC;QAEJN,SAAS,KAAK,CAAC,YAAY,GAAG,CAACO,OACtBC,QAAQD,QAAQA,OAAQH,UAAU,CAACK,OAAOF,MAAM,EAAE,SAASA;IAEtE;IAEAjC,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAE0B;KAAS;IACxC,OAAO1B;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/xLinear.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/xLinear.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XLinearAxis } from 'src/types'\nimport {\n AXIS_LABEL_SPACE,\n createNumFormatter,\n isAreaPercent,\n isBarPercent,\n isColumnPercent,\n isPivotChart,\n LINEAR_AXIS_INNER_OFFSET_TOP,\n} from 'src/pipeline/utils'\nimport { createLinearFormat, createLinearPercentFormat } from './format/linearFormat'\nimport { defaultTitleText } from './title/defaultTitleText'\n\nexport const xLinear: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { encoding, dimensions, measures } = advancedVSeed\n const { chartType } = vseed\n const config = (advancedVSeed.config?.[chartType as 'bar']?.xAxis ?? {}) as XLinearAxis\n\n if (!result.axes) {\n result.axes = []\n }\n const isPivot = isPivotChart(vseed)\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n\n zero,\n nice,\n inverse,\n max,\n min,\n log,\n logBase = 10,\n autoFormat,\n numFormat = {},\n } = config\n\n const formatter = createNumFormatter(numFormat)\n const percentFormatter = createNumFormatter({\n type: 'percent',\n })\n\n const linearAxis = {\n ...(isPivot\n ? {\n range: {\n min,\n max,\n },\n }\n : {\n min,\n max,\n }),\n visible,\n type: log ? 'log' : 'linear',\n base: logBase,\n orient: 'bottom',\n nice,\n zero: log ? false : zero,\n inverse,\n label: {\n space: AXIS_LABEL_SPACE,\n visible: label?.visible,\n formatMethod: (value: string) => {\n if (isBarPercent(vseed) || isColumnPercent(vseed) || isAreaPercent(vseed)) {\n return createLinearPercentFormat(value, autoFormat, numFormat, formatter, percentFormatter)\n }\n return createLinearFormat(value, autoFormat, numFormat, formatter)\n },\n style: {\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n innerOffset: {\n right: LINEAR_AXIS_INNER_OFFSET_TOP,\n // left: LINEAR_AXIS_INNER_OFFSET_TOP,\n },\n }\n\n result.axes = [...result.axes, linearAxis] as ISpec['axes']\n\n return result\n}\n"],"names":["xLinear","spec","context","result","advancedVSeed","vseed","encoding","dimensions","measures","chartType","config","isPivot","isPivotChart","visible","label","tick","title","grid","line","zero","nice","inverse","max","min","log","logBase","autoFormat","numFormat","formatter","createNumFormatter","percentFormatter","linearAxis","AXIS_LABEL_SPACE","value","isBarPercent","isColumnPercent","isAreaPercent","createLinearPercentFormat","createLinearFormat","defaultTitleText","LINEAR_AXIS_INNER_OFFSET_TOP"],"mappings":";;;AAcO,MAAMA,UAA0B,CAACC,MAAMC;IAC5C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGJ;IAC3C,MAAM,EAAEK,SAAS,EAAE,GAAGJ;IACtB,MAAMK,SAAUN,cAAc,MAAM,EAAE,CAACK,UAAmB,EAAE,SAAS,CAAC;IAEtE,IAAI,CAACN,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAElB,MAAMQ,UAAUC,aAAaP;IAE7B,MAAM,EACJQ,UAAU,IAAI,EACdC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,IAAI,EAEJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,GAAG,EACHC,GAAG,EACHC,GAAG,EACHC,UAAU,EAAE,EACZC,UAAU,EACVC,YAAY,CAAC,CAAC,EACf,GAAGjB;IAEJ,MAAMkB,YAAYC,mBAAmBF;IACrC,MAAMG,mBAAmBD,mBAAmB;QAC1C,MAAM;IACR;IAEA,MAAME,aAAa;QACjB,GAAIpB,UACA;YACE,OAAO;gBACLY;gBACAD;YACF;QACF,IACA;YACEC;YACAD;QACF,CAAC;QACLT;QACA,MAAMW,MAAM,QAAQ;QACpB,MAAMC;QACN,QAAQ;QACRL;QACA,MAAMI,MAAM,QAAQL;QACpBE;QACA,OAAO;YACL,OAAOW;YACP,SAASlB,OAAO;YAChB,cAAc,CAACmB;gBACb,IAAIC,aAAa7B,UAAU8B,gBAAgB9B,UAAU+B,cAAc/B,QACjE,OAAOgC,0BAA0BJ,OAAOP,YAAYC,WAAWC,WAAWE;gBAE5E,OAAOQ,mBAAmBL,OAAOP,YAAYC,WAAWC;YAC1D;YACA,OAAO;gBACL,MAAMd,OAAO;gBACb,OAAOA,OAAO;gBACd,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,OAAO;YACL,SAASE,OAAO;YAChB,MAAMA,OAAO,aAAauB,iBAAiB/B,UAAUD,YAAYD,SAAS,CAAC;YAC3E,OAAO;gBACL,MAAMU,OAAO;gBACb,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,MAAM;YACJ,SAASD,MAAM;YACf,UAAUA,MAAM;YAChB,QAAQA,MAAM;YACd,OAAO;gBACL,QAAQA,MAAM;YAChB;QACF;QACA,MAAM;YACJ,SAASE,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;gBACd,UAAUA,MAAM;YAClB;QACF;QACA,YAAY;YACV,SAASC,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;YAChB;QACF;QACA,aAAa;YACX,OAAOsB;QAET;IACF;IAEArC,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAE4B;KAAW;IAE1C,OAAO5B;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/xLinear.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/axes/xLinear.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XLinearAxis } from 'src/types'\nimport {\n AXIS_LABEL_SPACE,\n createNumFormatter,\n isAreaPercent,\n isBarPercent,\n isColumnPercent,\n isPivotChart,\n LINEAR_AXIS_INNER_OFFSET_TOP,\n} from 'src/pipeline/utils'\nimport { createLinearFormat, createLinearPercentFormat } from './format/linearFormat'\nimport { defaultTitleText } from './title/defaultTitleText'\n\nexport const xLinear: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { encoding, dimensions, measures } = advancedVSeed\n const { chartType } = vseed\n const config = (advancedVSeed.config?.[chartType as 'bar']?.xAxis ?? {}) as XLinearAxis\n\n if (!result.axes) {\n result.axes = []\n }\n const isPivot = isPivotChart(vseed)\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n\n zero,\n nice,\n inverse,\n max,\n min,\n log,\n logBase = 10,\n autoFormat,\n numFormat = {},\n } = config\n\n const formatter = createNumFormatter(numFormat)\n const percentFormatter = createNumFormatter({\n type: 'percent',\n })\n\n const linearAxis = {\n ...(isPivot\n ? {\n range: {\n min,\n max,\n },\n }\n : {\n min,\n max,\n }),\n visible,\n type: log ? 'log' : 'linear',\n base: logBase,\n orient: 'bottom',\n nice,\n zero: log ? false : zero,\n inverse,\n label: {\n space: AXIS_LABEL_SPACE,\n visible: label?.visible,\n formatMethod: (value: string) => {\n if (isBarPercent(vseed) || isColumnPercent(vseed) || isAreaPercent(vseed)) {\n return createLinearPercentFormat(value, autoFormat, numFormat, formatter, percentFormatter)\n }\n return createLinearFormat(value, autoFormat, numFormat, formatter)\n },\n style: {\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n innerOffset: {\n right: LINEAR_AXIS_INNER_OFFSET_TOP,\n // left: LINEAR_AXIS_INNER_OFFSET_TOP,\n },\n }\n\n result.axes = [...result.axes, linearAxis] as ISpec['axes']\n\n return result\n}\n"],"names":["xLinear","spec","context","result","advancedVSeed","vseed","encoding","dimensions","measures","chartType","config","isPivot","isPivotChart","visible","label","tick","title","grid","line","zero","nice","inverse","max","min","log","logBase","autoFormat","numFormat","formatter","createNumFormatter","percentFormatter","linearAxis","AXIS_LABEL_SPACE","value","isBarPercent","isColumnPercent","isAreaPercent","createLinearPercentFormat","createLinearFormat","defaultTitleText","LINEAR_AXIS_INNER_OFFSET_TOP"],"mappings":";;;AAcO,MAAMA,UAA0B,CAACC,MAAMC;IAC5C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGJ;IAC3C,MAAM,EAAEK,SAAS,EAAE,GAAGJ;IACtB,MAAMK,SAAUN,cAAc,MAAM,EAAE,CAACK,UAAmB,EAAE,SAAS,CAAC;IAEtE,IAAI,CAACN,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAElB,MAAMQ,UAAUC,aAAaP;IAE7B,MAAM,EACJQ,UAAU,IAAI,EACdC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,IAAI,EAEJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,GAAG,EACHC,GAAG,EACHC,GAAG,EACHC,UAAU,EAAE,EACZC,UAAU,EAC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