@visactor/vseed 0.4.12 → 0.4.14

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 (176) hide show
  1. package/dist/cjs/index.cjs +2 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/dataReshape/dataReshapeByEncoding.d.ts +2 -1
  4. package/dist/esm/dataReshape/dataReshapeByEncoding.js +7 -2
  5. package/dist/esm/dataReshape/dataReshapeByEncoding.js.map +1 -1
  6. package/dist/esm/dataReshape/unfoldDimensions.d.ts +1 -0
  7. package/dist/esm/dataReshape/unfoldDimensions.js +5 -4
  8. package/dist/esm/dataReshape/unfoldDimensions.js.map +1 -1
  9. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +11 -3
  10. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
  11. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js +4 -2
  12. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
  13. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +2 -1
  14. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  15. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +8 -3
  16. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
  17. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +4 -2
  18. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
  19. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js +11 -2
  20. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js.map +1 -1
  21. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js +4 -2
  22. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
  23. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +2 -1
  24. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
  25. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +8 -2
  26. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -1
  27. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js +4 -2
  28. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
  29. package/dist/esm/pipeline/spec/chart/pipeline/area.js +6 -2
  30. package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
  31. package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js +6 -2
  32. package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
  33. package/dist/esm/pipeline/spec/chart/pipeline/bar.js +6 -2
  34. package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
  35. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +6 -2
  36. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
  37. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +6 -2
  38. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
  39. package/dist/esm/pipeline/spec/chart/pipeline/column.js +6 -2
  40. package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
  41. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +6 -2
  42. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
  43. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +6 -2
  44. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
  45. package/dist/esm/pipeline/spec/chart/pipeline/donut.js +6 -2
  46. package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
  47. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js +6 -2
  48. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
  49. package/dist/esm/pipeline/spec/chart/pipeline/line.js +6 -2
  50. package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
  51. package/dist/esm/pipeline/spec/chart/pipeline/pie.js +6 -2
  52. package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
  53. package/dist/esm/pipeline/spec/chart/pipeline/raceBar.js +3 -1
  54. package/dist/esm/pipeline/spec/chart/pipeline/raceBar.js.map +1 -1
  55. package/dist/esm/pipeline/spec/chart/pipeline/raceColumn.js +3 -1
  56. package/dist/esm/pipeline/spec/chart/pipeline/raceColumn.js.map +1 -1
  57. package/dist/esm/pipeline/spec/chart/pipeline/raceDonut.js +3 -1
  58. package/dist/esm/pipeline/spec/chart/pipeline/raceDonut.js.map +1 -1
  59. package/dist/esm/pipeline/spec/chart/pipeline/raceLine.js +3 -1
  60. package/dist/esm/pipeline/spec/chart/pipeline/raceLine.js.map +1 -1
  61. package/dist/esm/pipeline/spec/chart/pipeline/racePie.js +3 -1
  62. package/dist/esm/pipeline/spec/chart/pipeline/racePie.js.map +1 -1
  63. package/dist/esm/pipeline/spec/chart/pipeline/radar.js +6 -2
  64. package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
  65. package/dist/esm/pipeline/spec/chart/pipeline/rose.js +6 -2
  66. package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
  67. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +6 -2
  68. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
  69. package/dist/esm/pipeline/spec/chart/pipes/axes/heatmapBandAxis.js +14 -0
  70. package/dist/esm/pipeline/spec/chart/pipes/axes/heatmapBandAxis.js.map +1 -1
  71. package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.js +27 -1
  72. package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.js.map +1 -1
  73. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +15 -2
  74. package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
  75. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +15 -2
  76. package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
  77. package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +3 -3
  78. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +4 -3
  79. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  80. package/dist/esm/pipeline/spec/chart/pipes/label/labelBoxPlot.js +1 -1
  81. package/dist/esm/pipeline/spec/chart/pipes/label/labelBoxPlot.js.map +1 -1
  82. package/dist/esm/pipeline/spec/chart/pipes/label/labelCirclePacking.js +18 -1
  83. package/dist/esm/pipeline/spec/chart/pipes/label/labelCirclePacking.js.map +1 -1
  84. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js +1 -1
  85. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
  86. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js +1 -1
  87. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -1
  88. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js +1 -1
  89. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
  90. package/dist/esm/pipeline/spec/chart/pipes/label/labelSunburst.js +18 -1
  91. package/dist/esm/pipeline/spec/chart/pipes/label/labelSunburst.js.map +1 -1
  92. package/dist/esm/pipeline/spec/chart/pipes/label/labelTreeMapGroup.js +12 -4
  93. package/dist/esm/pipeline/spec/chart/pipes/label/labelTreeMapGroup.js.map +1 -1
  94. package/dist/esm/pipeline/spec/chart/pipes/label/labelTreeMapLeaf.js +4 -2
  95. package/dist/esm/pipeline/spec/chart/pipes/label/labelTreeMapLeaf.js.map +1 -1
  96. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js +5 -0
  97. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
  98. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js +5 -0
  99. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js.map +1 -1
  100. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.d.ts +5 -3
  101. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +51 -32
  102. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
  103. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +8 -7
  104. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
  105. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +15 -2
  106. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
  107. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js +3 -2
  108. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js.map +1 -1
  109. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHierarchy.js +6 -5
  110. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHierarchy.js.map +1 -1
  111. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js +3 -2
  112. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
  113. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipTreeMap.js +14 -6
  114. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipTreeMap.js.map +1 -1
  115. package/dist/esm/pipeline/spec/table/pipes/columns/dimensionsToColumns.js +6 -2
  116. package/dist/esm/pipeline/spec/table/pipes/columns/dimensionsToColumns.js.map +1 -1
  117. package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.js +8 -3
  118. package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.js.map +1 -1
  119. package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js +8 -3
  120. package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js.map +1 -1
  121. package/dist/esm/pipeline/utils/constant.d.ts +1 -0
  122. package/dist/esm/pipeline/utils/constant.js +1 -0
  123. package/dist/esm/pipeline/utils/constant.js.map +1 -1
  124. package/dist/esm/pipeline/utils/format/createFormatterByDimension.d.ts +2 -0
  125. package/dist/esm/pipeline/utils/format/createFormatterByDimension.js +10 -0
  126. package/dist/esm/pipeline/utils/format/createFormatterByDimension.js.map +1 -0
  127. package/dist/esm/pipeline/utils/format/createTimeFormatter.d.ts +2 -0
  128. package/dist/esm/pipeline/utils/format/createTimeFormatter.js +154 -0
  129. package/dist/esm/pipeline/utils/format/createTimeFormatter.js.map +1 -0
  130. package/dist/esm/pipeline/utils/format/index.d.ts +2 -0
  131. package/dist/esm/pipeline/utils/format/index.js +2 -0
  132. package/dist/esm/types/chartType/area/zArea.d.ts +12 -0
  133. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +12 -0
  134. package/dist/esm/types/chartType/bar/zBar.d.ts +12 -0
  135. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +12 -0
  136. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +12 -0
  137. package/dist/esm/types/chartType/boxPlot/zBoxPlot.d.ts +12 -0
  138. package/dist/esm/types/chartType/circlePacking/zCirclePacking.d.ts +12 -0
  139. package/dist/esm/types/chartType/column/zColumn.d.ts +12 -0
  140. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +12 -0
  141. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +12 -0
  142. package/dist/esm/types/chartType/donut/zDonut.d.ts +12 -0
  143. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +12 -0
  144. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +12 -0
  145. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +12 -0
  146. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +12 -0
  147. package/dist/esm/types/chartType/line/zLine.d.ts +12 -0
  148. package/dist/esm/types/chartType/pie/zPie.d.ts +12 -0
  149. package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +12 -0
  150. package/dist/esm/types/chartType/raceBar/zRaceBar.d.ts +12 -0
  151. package/dist/esm/types/chartType/raceColumn/zRaceColumn.d.ts +12 -0
  152. package/dist/esm/types/chartType/raceDonut/zRaceDonut.d.ts +12 -0
  153. package/dist/esm/types/chartType/raceLine/zRaceLine.d.ts +12 -0
  154. package/dist/esm/types/chartType/racePie/zRacePie.d.ts +12 -0
  155. package/dist/esm/types/chartType/raceScatter/zRaceScatter.d.ts +12 -0
  156. package/dist/esm/types/chartType/radar/zRadar.d.ts +12 -0
  157. package/dist/esm/types/chartType/rose/zRose.d.ts +12 -0
  158. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +12 -0
  159. package/dist/esm/types/chartType/scatter/zScatter.d.ts +12 -0
  160. package/dist/esm/types/chartType/sunburst/zSunburst.d.ts +12 -0
  161. package/dist/esm/types/chartType/table/zTable.d.ts +12 -0
  162. package/dist/esm/types/chartType/treeMap/zTreeMap.d.ts +12 -0
  163. package/dist/esm/types/properties/cellStyle/bodyCellStyle.d.ts +1 -1
  164. package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -1
  165. package/dist/esm/types/properties/dimensions/baseDimension.d.ts +5 -0
  166. package/dist/esm/types/properties/dimensions/zDimensions.d.ts +36 -0
  167. package/dist/esm/types/properties/dimensions/zDimensions.js +3 -1
  168. package/dist/esm/types/properties/dimensions/zDimensions.js.map +1 -1
  169. package/dist/esm/types/properties/format/index.d.ts +1 -0
  170. package/dist/esm/types/properties/format/index.js +1 -0
  171. package/dist/esm/types/properties/format/timeFormat.d.ts +20 -0
  172. package/dist/esm/types/properties/format/timeFormat.js +16 -0
  173. package/dist/esm/types/properties/format/timeFormat.js.map +1 -0
  174. package/dist/umd/index.js +592 -147
  175. package/dist/umd/index.js.map +1 -1
  176. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/line.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n xBand,\n yLinear,\n initLine,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n lineStyle,\n verticalCrosshairLine,\n pointStateDimensionHover,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorLineStyleFill,\n colorPointStyleFill,\n pivotColorLegend,\n pivotTitle,\n pivotAxisStyle,\n splitLine,\n dimensionLinkage,\n brush,\n} from '../pipes'\n\nconst line: VChartSpecPipeline = [\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n yLinear,\n brush,\n verticalCrosshairLine,\n colorAdapter(discreteLegend, colorLegend),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n]\n\nconst pivotLine: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n pivotAxisStyle(yLinear),\n brush,\n verticalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const lineSpecPipeline = [pivotAdapter(line, pivotLine)]\n"],"names":["line","initLine","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","xBand","yLinear","brush","verticalCrosshairLine","discreteLegend","colorLegend","colorPointStyleFill","pointStyle","pointStateDimensionHover","colorLineStyleFill","lineStyle","label","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","splitLine","pivotLine","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","lineSpecPipeline","pivotAdapter"],"mappings":";AA0CA,MAAMA,OAA2B;IAC/BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,gBAAgBC;IAC7BC,oBAAoBC;IACpBC;IACAC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,YAAoC;IACxCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd9B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAwB,eAAevB;QACfC;QACAC;QACAG,oBAAoBC;QACpBC;QACAC,mBAAmBC;QACnBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDQ;IACAC;IACAC;IACAjC,aAAakC,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,mBAAmB;IAACC,aAAaxC,MAAM0B;CAAW"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/line.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n xBand,\n yLinear,\n initLine,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n lineStyle,\n verticalCrosshairLine,\n pointStateDimensionHover,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorLineStyleFill,\n colorPointStyleFill,\n pivotColorLegend,\n pivotTitle,\n pivotAxisStyle,\n splitLine,\n dimensionLinkage,\n brush,\n} from '../pipes'\n\nconst line: VChartSpecPipeline = [\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n yLinear,\n brush,\n verticalCrosshairLine,\n colorAdapter(discreteLegend, colorLegend),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n label,\n tooltip({ titleEncoding: 'x' }),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n]\n\nconst pivotLine: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n pivotAxisStyle(yLinear),\n brush,\n verticalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n label,\n tooltip({ titleEncoding: 'x' }),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const lineSpecPipeline = [pivotAdapter(line, pivotLine)]\n"],"names":["line","initLine","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","xBand","yLinear","brush","verticalCrosshairLine","discreteLegend","colorLegend","colorPointStyleFill","pointStyle","pointStateDimensionHover","colorLineStyleFill","lineStyle","label","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","splitLine","pivotLine","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","lineSpecPipeline","pivotAdapter"],"mappings":";AA0CA,MAAMA,OAA2B;IAC/BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,gBAAgBC;IAC7BC,oBAAoBC;IACpBC;IACAC,mBAAmBC;IACnBC;IACAC,QAAQ;QAAE,eAAe;IAAI;IAC7BC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,YAAoC;IACxCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd9B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAwB,eAAevB;QACfC;QACAC;QACAG,oBAAoBC;QACpBC;QACAC,mBAAmBC;QACnBC;QACAC,QAAQ;YAAE,eAAe;QAAI;QAC7BC;QACAC;QACAC;QACAC;QACAC;KACD;IACDQ;IACAC;IACAC;IACAjC,aAAakC,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,mBAAmB;IAACC,aAAaxC,MAAM0B;CAAW"}
@@ -9,7 +9,9 @@ const pie = [
9
9
  colorPieStyleFill(pieStyle),
10
10
  colorAdapter(discreteLegend, colorLegend),
11
11
  labelPie,
12
- tooltip,
12
+ tooltip({
13
+ titleEncoding: 'color'
14
+ }),
13
15
  annotationPoint,
14
16
  annotationVerticalLine,
15
17
  annotationHorizontalLine,
@@ -30,7 +32,9 @@ const pivotPie = [
30
32
  brush,
31
33
  colorPieStyleFill(pieStyle),
32
34
  labelPie,
33
- tooltip,
35
+ tooltip({
36
+ titleEncoding: 'color'
37
+ }),
34
38
  annotationPoint,
35
39
  annotationVerticalLine,
36
40
  annotationHorizontalLine,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/pie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/pie.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n backgroundColor,\n color,\n datasetXY,\n datasetPivot,\n initPie,\n initPivot,\n discreteLegend,\n pivotAdapter,\n pivotColumnDimensions,\n pivotGridStyle,\n pivotIndicators,\n pivotIndicatorsAsRow,\n pivotDiscreteLegend,\n pivotRowDimensions,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n progressive,\n pieStyle,\n colorPieStyleFill,\n linearColor,\n colorAdapter,\n colorLegend,\n pivotColorLegend,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n brush,\n dimensionLinkage,\n} from '../pipes'\n\nconst pie: VChartSpecPipeline = [\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n brush,\n colorPieStyleFill(pieStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotPie: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n brush,\n colorPieStyleFill(pieStyle),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n addRegionPadding,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const pieSpecPipeline = [pivotAdapter(pie, pivotPie)]\n"],"names":["pie","initPie","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","brush","colorPieStyleFill","pieStyle","discreteLegend","colorLegend","labelPie","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotPie","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","pieSpecPipeline","pivotAdapter"],"mappings":";AAoCA,MAAMA,MAA0B;IAC9BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,kBAAkBC;IAClBR,aAAaS,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,WAAmC;IACvCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdxB;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC,kBAAkBC;QAClBG;QACAC;QACAC;QACAC;QACAC;QACAC;QACAQ;KACD;IACDC;IACAC;IACAC;IACA3B,aAAa4B,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,kBAAkB;IAACC,aAAalC,KAAKmB;CAAU"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/pie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/pie.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n backgroundColor,\n color,\n datasetXY,\n datasetPivot,\n initPie,\n initPivot,\n discreteLegend,\n pivotAdapter,\n pivotColumnDimensions,\n pivotGridStyle,\n pivotIndicators,\n pivotIndicatorsAsRow,\n pivotDiscreteLegend,\n pivotRowDimensions,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n progressive,\n pieStyle,\n colorPieStyleFill,\n linearColor,\n colorAdapter,\n colorLegend,\n pivotColorLegend,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n brush,\n dimensionLinkage,\n} from '../pipes'\n\nconst pie: VChartSpecPipeline = [\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n brush,\n colorPieStyleFill(pieStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip({ titleEncoding: 'color' }),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotPie: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n brush,\n colorPieStyleFill(pieStyle),\n labelPie,\n tooltip({ titleEncoding: 'color' }),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n addRegionPadding,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const pieSpecPipeline = [pivotAdapter(pie, pivotPie)]\n"],"names":["pie","initPie","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","brush","colorPieStyleFill","pieStyle","discreteLegend","colorLegend","labelPie","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotPie","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","pieSpecPipeline","pivotAdapter"],"mappings":";AAoCA,MAAMA,MAA0B;IAC9BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,kBAAkBC;IAClBR,aAAaS,gBAAgBC;IAC7BC;IACAC,QAAQ;QAAE,eAAe;IAAQ;IACjCC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,WAAmC;IACvCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdxB;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC,kBAAkBC;QAClBG;QACAC,QAAQ;YAAE,eAAe;QAAQ;QACjCC;QACAC;QACAC;QACAC;QACAQ;KACD;IACDC;IACAC;IACAC;IACA3B,aAAa4B,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,kBAAkB;IAACC,aAAalC,KAAKmB;CAAU"}
@@ -11,7 +11,9 @@ const raceBar = [
11
11
  yBand,
12
12
  label,
13
13
  brush,
14
- tooltip,
14
+ tooltip({
15
+ titleEncoding: 'y'
16
+ }),
15
17
  colorAdapter(discreteLegend, colorLegend),
16
18
  horizontalCrosshairRect,
17
19
  colorBarStyleFill(barStyle),
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/raceBar.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/raceBar.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initBar,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n horizontalCrosshairRect,\n stackCornerRadius,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorBarStyleFill,\n barMaxWidth,\n brush,\n playerBar,\n xLinear,\n yBand,\n datasetYX,\n isPlayer,\n} from '../pipes'\n\nconst raceBar: VChartSpecPipeline = [\n initBar,\n stackCornerRadius,\n barMaxWidth,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerBar, datasetYX),\n progressive,\n xLinear,\n yBand,\n\n label,\n brush,\n tooltip,\n colorAdapter(discreteLegend, colorLegend),\n horizontalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nexport const raceBarSpecPipeline = raceBar\n"],"names":["raceBar","initBar","stackCornerRadius","barMaxWidth","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerBar","datasetYX","progressive","xLinear","yBand","label","brush","tooltip","discreteLegend","colorLegend","horizontalCrosshairRect","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","raceBarSpecPipeline"],"mappings":";AA6BA,MAAMA,UAA8B;IAClCC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,WAAWC;IACpBC;IACAC;IACAC;IAEAC;IACAC;IACAC;IACAZ,aAAaa,gBAAgBC;IAC7BC;IACAC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,sBAAsB1B"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/raceBar.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/raceBar.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initBar,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n horizontalCrosshairRect,\n stackCornerRadius,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorBarStyleFill,\n barMaxWidth,\n brush,\n playerBar,\n xLinear,\n yBand,\n datasetYX,\n isPlayer,\n} from '../pipes'\n\nconst raceBar: VChartSpecPipeline = [\n initBar,\n stackCornerRadius,\n barMaxWidth,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerBar, datasetYX),\n progressive,\n xLinear,\n yBand,\n\n label,\n brush,\n tooltip({ titleEncoding: 'y' }),\n colorAdapter(discreteLegend, colorLegend),\n horizontalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nexport const raceBarSpecPipeline = raceBar\n"],"names":["raceBar","initBar","stackCornerRadius","barMaxWidth","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerBar","datasetYX","progressive","xLinear","yBand","label","brush","tooltip","discreteLegend","colorLegend","horizontalCrosshairRect","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","raceBarSpecPipeline"],"mappings":";AA6BA,MAAMA,UAA8B;IAClCC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,WAAWC;IACpBC;IACAC;IACAC;IAEAC;IACAC;IACAC,QAAQ;QAAE,eAAe;IAAI;IAC7BZ,aAAaa,gBAAgBC;IAC7BC;IACAC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,sBAAsB1B"}
@@ -11,7 +11,9 @@ const raceColumn = [
11
11
  yLinear,
12
12
  label,
13
13
  brush,
14
- tooltip,
14
+ tooltip({
15
+ titleEncoding: 'x'
16
+ }),
15
17
  colorAdapter(discreteLegend, colorLegend),
16
18
  horizontalCrosshairRect,
17
19
  colorBarStyleFill(barStyle),
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/raceColumn.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/raceColumn.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initColumn,\n stackCornerRadius,\n barMaxWidth,\n colorAdapter,\n color,\n linearColor,\n backgroundColor,\n playerColumn,\n progressive,\n label,\n brush,\n tooltip,\n discreteLegend,\n colorLegend,\n horizontalCrosshairRect,\n colorBarStyleFill,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n xBand,\n yLinear,\n datasetXY,\n isPlayer,\n} from '../pipes'\n\nconst raceColumn: VChartSpecPipeline = [\n initColumn,\n stackCornerRadius,\n barMaxWidth,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerColumn, datasetXY),\n progressive,\n xBand,\n yLinear,\n\n label,\n brush,\n tooltip,\n colorAdapter(discreteLegend, colorLegend),\n horizontalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nexport const raceColumnSpecPipeline = raceColumn\n"],"names":["raceColumn","initColumn","stackCornerRadius","barMaxWidth","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerColumn","datasetXY","progressive","xBand","yLinear","label","brush","tooltip","discreteLegend","colorLegend","horizontalCrosshairRect","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","raceColumnSpecPipeline"],"mappings":";AA6BA,MAAMA,aAAiC;IACrCC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,cAAcC;IACvBC;IACAC;IACAC;IAEAC;IACAC;IACAC;IACAZ,aAAaa,gBAAgBC;IAC7BC;IACAC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,yBAAyB1B"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/raceColumn.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/raceColumn.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initColumn,\n stackCornerRadius,\n barMaxWidth,\n colorAdapter,\n color,\n linearColor,\n backgroundColor,\n playerColumn,\n progressive,\n label,\n brush,\n tooltip,\n discreteLegend,\n colorLegend,\n horizontalCrosshairRect,\n colorBarStyleFill,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n xBand,\n yLinear,\n datasetXY,\n isPlayer,\n} from '../pipes'\n\nconst raceColumn: VChartSpecPipeline = [\n initColumn,\n stackCornerRadius,\n barMaxWidth,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerColumn, datasetXY),\n progressive,\n xBand,\n yLinear,\n\n label,\n brush,\n tooltip({ titleEncoding: 'x' }),\n colorAdapter(discreteLegend, colorLegend),\n horizontalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nexport const raceColumnSpecPipeline = raceColumn\n"],"names":["raceColumn","initColumn","stackCornerRadius","barMaxWidth","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerColumn","datasetXY","progressive","xBand","yLinear","label","brush","tooltip","discreteLegend","colorLegend","horizontalCrosshairRect","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","raceColumnSpecPipeline"],"mappings":";AA6BA,MAAMA,aAAiC;IACrCC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,cAAcC;IACvBC;IACAC;IACAC;IAEAC;IACAC;IACAC,QAAQ;QAAE,eAAe;IAAI;IAC7BZ,aAAaa,gBAAgBC;IAC7BC;IACAC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,yBAAyB1B"}
@@ -9,7 +9,9 @@ const raceDonut = [
9
9
  labelPie,
10
10
  colorPieStyleFill(pieStyle),
11
11
  colorAdapter(discreteLegend, colorLegend),
12
- tooltip,
12
+ tooltip({
13
+ titleEncoding: 'color'
14
+ }),
13
15
  annotationPoint,
14
16
  annotationVerticalLine,
15
17
  annotationHorizontalLine,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/raceDonut.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/raceDonut.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initDonut,\n backgroundColor,\n labelPie,\n tooltip,\n discreteLegend,\n color,\n pieStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n brush,\n colorPieStyleFill,\n playerPie,\n annotationArea,\n datasetXY,\n isPlayer,\n} from '../pipes'\n\nconst raceDonut: VChartSpecPipeline = [\n initDonut,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerPie, datasetXY),\n progressive,\n brush,\n labelPie,\n colorPieStyleFill(pieStyle),\n colorAdapter(discreteLegend, colorLegend),\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nexport const raceDonutSpecPipeline = raceDonut\n"],"names":["raceDonut","initDonut","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerPie","datasetXY","progressive","brush","labelPie","colorPieStyleFill","pieStyle","discreteLegend","colorLegend","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","raceDonutSpecPipeline"],"mappings":";AAwBA,MAAMA,YAAgC;IACpCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,WAAWC;IACpBC;IACAC;IACAC;IACAC,kBAAkBC;IAClBX,aAAaY,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,wBAAwBrB"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/raceDonut.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/raceDonut.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initDonut,\n backgroundColor,\n labelPie,\n tooltip,\n discreteLegend,\n color,\n pieStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n brush,\n colorPieStyleFill,\n playerPie,\n annotationArea,\n datasetXY,\n isPlayer,\n} from '../pipes'\n\nconst raceDonut: VChartSpecPipeline = [\n initDonut,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerPie, datasetXY),\n progressive,\n brush,\n labelPie,\n colorPieStyleFill(pieStyle),\n colorAdapter(discreteLegend, colorLegend),\n tooltip({ titleEncoding: 'color' }),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nexport const raceDonutSpecPipeline = raceDonut\n"],"names":["raceDonut","initDonut","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerPie","datasetXY","progressive","brush","labelPie","colorPieStyleFill","pieStyle","discreteLegend","colorLegend","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","raceDonutSpecPipeline"],"mappings":";AAwBA,MAAMA,YAAgC;IACpCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,WAAWC;IACpBC;IACAC;IACAC;IACAC,kBAAkBC;IAClBX,aAAaY,gBAAgBC;IAC7BC,QAAQ;QAAE,eAAe;IAAQ;IACjCC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,wBAAwBrB"}
@@ -12,7 +12,9 @@ const raceLine = [
12
12
  colorAdapter(discreteLegend, colorLegend),
13
13
  colorLineStyleFill(lineStyle),
14
14
  label,
15
- tooltip,
15
+ tooltip({
16
+ titleEncoding: 'x'
17
+ }),
16
18
  annotationPoint,
17
19
  annotationVerticalLine,
18
20
  annotationHorizontalLine,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/raceLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/raceLine.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initLine,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n lineStyle,\n annotationVerticalLine,\n annotationHorizontalLine,\n verticalCrosshairLine,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n brush,\n xBand,\n yLinear,\n colorLineStyleFill,\n annotationArea,\n splitLine,\n playerLine,\n annotationPoint,\n datasetXY,\n isPlayer,\n} from '../pipes'\n\nconst raceLine: VChartSpecPipeline = [\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerLine, datasetXY),\n progressive,\n xBand,\n yLinear,\n brush,\n verticalCrosshairLine,\n colorAdapter(discreteLegend, colorLegend),\n colorLineStyleFill(lineStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n]\n\nexport const raceLineSpecPipeline = raceLine\n"],"names":["raceLine","initLine","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerLine","datasetXY","progressive","xBand","yLinear","brush","verticalCrosshairLine","discreteLegend","colorLegend","colorLineStyleFill","lineStyle","label","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","splitLine","raceLineSpecPipeline"],"mappings":";AA4BA,MAAMA,WAA+B;IACnCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,YAAYC;IACrBC;IACAC;IACAC;IACAC;IACAC;IACAX,aAAaY,gBAAgBC;IAC7BC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,uBAAuBzB"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/raceLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/raceLine.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initLine,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n lineStyle,\n annotationVerticalLine,\n annotationHorizontalLine,\n verticalCrosshairLine,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n brush,\n xBand,\n yLinear,\n colorLineStyleFill,\n annotationArea,\n splitLine,\n playerLine,\n annotationPoint,\n datasetXY,\n isPlayer,\n} from '../pipes'\n\nconst raceLine: VChartSpecPipeline = [\n initLine,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerLine, datasetXY),\n progressive,\n xBand,\n yLinear,\n brush,\n verticalCrosshairLine,\n colorAdapter(discreteLegend, colorLegend),\n colorLineStyleFill(lineStyle),\n label,\n tooltip({ titleEncoding: 'x' }),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n splitLine,\n]\n\nexport const raceLineSpecPipeline = raceLine\n"],"names":["raceLine","initLine","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerLine","datasetXY","progressive","xBand","yLinear","brush","verticalCrosshairLine","discreteLegend","colorLegend","colorLineStyleFill","lineStyle","label","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","splitLine","raceLineSpecPipeline"],"mappings":";AA4BA,MAAMA,WAA+B;IACnCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,YAAYC;IACrBC;IACAC;IACAC;IACAC;IACAC;IACAX,aAAaY,gBAAgBC;IAC7BC,mBAAmBC;IACnBC;IACAC,QAAQ;QAAE,eAAe;IAAI;IAC7BC;IACAC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,uBAAuBzB"}
@@ -9,7 +9,9 @@ const racePie = [
9
9
  colorPieStyleFill(pieStyle),
10
10
  colorAdapter(discreteLegend, colorLegend),
11
11
  labelPie,
12
- tooltip,
12
+ tooltip({
13
+ titleEncoding: 'color'
14
+ }),
13
15
  annotationPoint,
14
16
  annotationVerticalLine,
15
17
  annotationHorizontalLine,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/racePie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/racePie.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initPie,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pieStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n brush,\n colorPieStyleFill,\n labelPie,\n playerPie,\n annotationArea,\n datasetXY,\n isPlayer,\n} from '../pipes'\n\nconst racePie: VChartSpecPipeline = [\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerPie, datasetXY),\n progressive,\n brush,\n colorPieStyleFill(pieStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nexport const racePieSpecPipeline = racePie\n"],"names":["racePie","initPie","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerPie","datasetXY","progressive","brush","colorPieStyleFill","pieStyle","discreteLegend","colorLegend","labelPie","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","racePieSpecPipeline"],"mappings":";AAwBA,MAAMA,UAA8B;IAClCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,WAAWC;IACpBC;IACAC;IACAC,kBAAkBC;IAClBV,aAAaW,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,sBAAsBrB"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/racePie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/racePie.ts"],"sourcesContent":["import type { VChartSpecPipeline } from 'src/types'\nimport {\n initPie,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pieStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n brush,\n colorPieStyleFill,\n labelPie,\n playerPie,\n annotationArea,\n datasetXY,\n isPlayer,\n} from '../pipes'\n\nconst racePie: VChartSpecPipeline = [\n initPie,\n colorAdapter(color, linearColor),\n backgroundColor,\n isPlayer(playerPie, datasetXY),\n progressive,\n brush,\n colorPieStyleFill(pieStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip({ titleEncoding: 'color' }),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nexport const racePieSpecPipeline = racePie\n"],"names":["racePie","initPie","colorAdapter","color","linearColor","backgroundColor","isPlayer","playerPie","datasetXY","progressive","brush","colorPieStyleFill","pieStyle","discreteLegend","colorLegend","labelPie","tooltip","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","racePieSpecPipeline"],"mappings":";AAwBA,MAAMA,UAA8B;IAClCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC,SAASC,WAAWC;IACpBC;IACAC;IACAC,kBAAkBC;IAClBV,aAAaW,gBAAgBC;IAC7BC;IACAC,QAAQ;QAAE,eAAe;IAAQ;IACjCC;IACAC;IACAC;IACAC;CACD;AAEM,MAAMC,sBAAsBrB"}
@@ -8,7 +8,9 @@ const radar = [
8
8
  radarAngleAxis,
9
9
  radarRadiusAxis,
10
10
  label,
11
- tooltip,
11
+ tooltip({
12
+ titleEncoding: 'angle'
13
+ }),
12
14
  colorAdapter(discreteLegend, colorLegend),
13
15
  verticalCrosshairLine,
14
16
  colorPointStyleFill(pointStyle),
@@ -32,7 +34,9 @@ const pivotRadar = [
32
34
  radarAngleAxis,
33
35
  radarRadiusAxis,
34
36
  label,
35
- tooltip,
37
+ tooltip({
38
+ titleEncoding: 'angle'
39
+ }),
36
40
  verticalCrosshairLine,
37
41
  colorPointStyleFill(pointStyle),
38
42
  pointStateDimensionHover,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/radar.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/radar.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, SpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n pointStyle,\n lineStyle,\n verticalCrosshairLine,\n pointStateDimensionHover,\n initRadar,\n areaStyle,\n radarAngleAxis,\n radarRadiusAxis,\n progressive,\n linearColor,\n colorAdapter,\n colorLegend,\n colorPointStyleFill,\n colorLineStyleFill,\n colorAreaStyleFill,\n pivotColorLegend,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n} from '../pipes'\n\nconst radar: VChartSpecPipeline = [\n initRadar,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radarAngleAxis,\n radarRadiusAxis,\n label,\n tooltip,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n // annotationPoint,\n // annotationVerticalLine,\n // annotationHorizontalLine,\n // annotationArea,\n]\n\nconst pivotRadar: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRadar,\n addRegionPadding,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radarAngleAxis,\n radarRadiusAxis,\n label,\n tooltip,\n verticalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n // annotationPoint,\n // annotationVerticalLine,\n // annotationHorizontalLine,\n // annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const radarSpecPipeline: SpecPipeline = [pivotAdapter(radar, pivotRadar)]\n"],"names":["radar","initRadar","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radarAngleAxis","radarRadiusAxis","label","tooltip","discreteLegend","colorLegend","verticalCrosshairLine","colorPointStyleFill","pointStyle","pointStateDimensionHover","colorLineStyleFill","lineStyle","colorAreaStyleFill","areaStyle","pivotRadar","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","radarSpecPipeline","pivotAdapter"],"mappings":";AAsCA,MAAMA,QAA4B;IAChCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,gBAAgBC;IAC7BC;IACAC,oBAAoBC;IACpBC;IACAC,mBAAmBC;IACnBC,mBAAmBC;CAKpB;AAED,MAAMC,aAAqC;IACzCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd3B;QACA4B;QACA3B,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAG;QACAC,oBAAoBC;QACpBC;QACAC,mBAAmBC;QACnBC,mBAAmBC;KAKpB;IACDS;IACAC;IACAC;IACA9B,aAAa+B,qBAAqBC;CACnC;AAEM,MAAMC,oBAAkC;IAACC,aAAapC,OAAOsB;CAAY"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/radar.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/radar.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, SpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n pointStyle,\n lineStyle,\n verticalCrosshairLine,\n pointStateDimensionHover,\n initRadar,\n areaStyle,\n radarAngleAxis,\n radarRadiusAxis,\n progressive,\n linearColor,\n colorAdapter,\n colorLegend,\n colorPointStyleFill,\n colorLineStyleFill,\n colorAreaStyleFill,\n pivotColorLegend,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n} from '../pipes'\n\nconst radar: VChartSpecPipeline = [\n initRadar,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radarAngleAxis,\n radarRadiusAxis,\n label,\n tooltip({ titleEncoding: 'angle' }),\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n // annotationPoint,\n // annotationVerticalLine,\n // annotationHorizontalLine,\n // annotationArea,\n]\n\nconst pivotRadar: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRadar,\n addRegionPadding,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radarAngleAxis,\n radarRadiusAxis,\n label,\n tooltip({ titleEncoding: 'angle' }),\n verticalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n // annotationPoint,\n // annotationVerticalLine,\n // annotationHorizontalLine,\n // annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const radarSpecPipeline: SpecPipeline = [pivotAdapter(radar, pivotRadar)]\n"],"names":["radar","initRadar","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radarAngleAxis","radarRadiusAxis","label","tooltip","discreteLegend","colorLegend","verticalCrosshairLine","colorPointStyleFill","pointStyle","pointStateDimensionHover","colorLineStyleFill","lineStyle","colorAreaStyleFill","areaStyle","pivotRadar","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","radarSpecPipeline","pivotAdapter"],"mappings":";AAsCA,MAAMA,QAA4B;IAChCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC,QAAQ;QAAE,eAAe;IAAQ;IACjCT,aAAaU,gBAAgBC;IAC7BC;IACAC,oBAAoBC;IACpBC;IACAC,mBAAmBC;IACnBC,mBAAmBC;CAKpB;AAED,MAAMC,aAAqC;IACzCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd3B;QACA4B;QACA3B,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC,QAAQ;YAAE,eAAe;QAAQ;QACjCG;QACAC,oBAAoBC;QACpBC;QACAC,mBAAmBC;QACnBC,mBAAmBC;KAKpB;IACDS;IACAC;IACAC;IACA9B,aAAa+B,qBAAqBC;CACnC;AAEM,MAAMC,oBAAkC;IAACC,aAAapC,OAAOsB;CAAY"}
@@ -12,7 +12,9 @@ const rose = [
12
12
  colorRoseStyleFill(roseStyle),
13
13
  colorAdapter(discreteLegend, colorLegend),
14
14
  labelPie,
15
- tooltip
15
+ tooltip({
16
+ titleEncoding: 'angle'
17
+ })
16
18
  ];
17
19
  const pivotRose = [
18
20
  initPivot,
@@ -33,7 +35,9 @@ const pivotRose = [
33
35
  verticalCrosshairRect,
34
36
  colorRoseStyleFill(roseStyle),
35
37
  labelPie,
36
- tooltip
38
+ tooltip({
39
+ titleEncoding: 'angle'
40
+ })
37
41
  ]),
38
42
  pivotRowDimensions,
39
43
  pivotColumnDimensions,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/rose.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/rose.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n stackInverse,\n verticalCrosshairRect,\n stackCornerRadius,\n initRose,\n radiusAxis,\n progressive,\n linearColor,\n colorAdapter,\n pivotColorLegend,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n dimensionLinkage,\n} from '../pipes'\n\nconst rose: VChartSpecPipeline = [\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n]\n\nconst pivotRose: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRose,\n addRegionPadding,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n labelPie,\n tooltip,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const roseSpecPipeline = [pivotAdapter(rose, pivotRose)]\n"],"names":["rose","initRose","stackCornerRadius","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","verticalCrosshairRect","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","labelPie","tooltip","pivotRose","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","roseSpecPipeline","pivotAdapter"],"mappings":";AAmCA,MAAMA,OAA2B;IAC/BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBT,aAAaU,gBAAgBC;IAC7BC;IACAC;CACD;AAED,MAAMC,YAAoC;IACxCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdvB;QACAwB;QACAvB;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC,mBAAmBC;QACnBG;QACAC;KACD;IACDS;IACAC;IACAC;IACAxB,aAAayB,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,mBAAmB;IAACC,aAAajC,MAAMkB;CAAW"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/rose.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/rose.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n stackInverse,\n verticalCrosshairRect,\n stackCornerRadius,\n initRose,\n radiusAxis,\n progressive,\n linearColor,\n colorAdapter,\n pivotColorLegend,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n dimensionLinkage,\n} from '../pipes'\n\nconst rose: VChartSpecPipeline = [\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip({ titleEncoding: 'angle' }),\n]\n\nconst pivotRose: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRose,\n addRegionPadding,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n labelPie,\n tooltip({ titleEncoding: 'angle' }),\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const roseSpecPipeline = [pivotAdapter(rose, pivotRose)]\n"],"names":["rose","initRose","stackCornerRadius","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","verticalCrosshairRect","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","labelPie","tooltip","pivotRose","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","roseSpecPipeline","pivotAdapter"],"mappings":";AAmCA,MAAMA,OAA2B;IAC/BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBT,aAAaU,gBAAgBC;IAC7BC;IACAC,QAAQ;QAAE,eAAe;IAAQ;CAClC;AAED,MAAMC,YAAoC;IACxCC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdvB;QACAwB;QACAvB;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC,mBAAmBC;QACnBG;QACAC,QAAQ;YAAE,eAAe;QAAQ;KAClC;IACDS;IACAC;IACAC;IACAxB,aAAayB,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,mBAAmB;IAACC,aAAajC,MAAMkB;CAAW"}
@@ -10,7 +10,9 @@ const roseParallel = [
10
10
  colorRoseStyleFill(roseStyle),
11
11
  colorAdapter(discreteLegend, colorLegend),
12
12
  labelPie,
13
- tooltip,
13
+ tooltip({
14
+ titleEncoding: 'angle'
15
+ }),
14
16
  verticalCrosshairRect,
15
17
  annotationPoint,
16
18
  annotationVerticalLine,
@@ -35,7 +37,9 @@ const pivotRoseParallel = [
35
37
  verticalCrosshairRect,
36
38
  colorRoseStyleFill(roseStyle),
37
39
  labelPie,
38
- tooltip,
40
+ tooltip({
41
+ titleEncoding: 'angle'
42
+ }),
39
43
  annotationPoint,
40
44
  annotationVerticalLine,
41
45
  annotationHorizontalLine,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/roseParallel.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pivotIndicators,\n initPivot,\n datasetPivot,\n pivotAdapter,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n verticalCrosshairRect,\n stackCornerRadius,\n initRoseParallel,\n radiusAxis,\n progressive,\n pivotColorLegend,\n colorAdapter,\n linearColor,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n dimensionLinkage,\n} from '../pipes'\n\nconst roseParallel: VChartSpecPipeline = [\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip,\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotRoseParallel: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRoseParallel,\n addRegionPadding,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n labelPie,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const roseParallelSpecPipeline = [pivotAdapter(roseParallel, pivotRoseParallel)]\n"],"names":["roseParallel","initRoseParallel","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","labelPie","tooltip","verticalCrosshairRect","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotRoseParallel","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","roseParallelSpecPipeline","pivotAdapter"],"mappings":";AAsCA,MAAMA,eAAmC;IACvCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBR,aAAaS,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,oBAA4C;IAChDC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd1B;QACA2B;QACA1B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAO;QACAN,mBAAmBC;QACnBG;QACAC;QACAE;QACAC;QACAC;QACAC;KACD;IACDS;IACAC;IACAC;IACA5B,aAAa6B,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,2BAA2B;IAACC,aAAapC,cAAcqB;CAAmB"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/roseParallel.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n tooltip,\n discreteLegend,\n color,\n pivotIndicators,\n initPivot,\n datasetPivot,\n pivotAdapter,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n verticalCrosshairRect,\n stackCornerRadius,\n initRoseParallel,\n radiusAxis,\n progressive,\n pivotColorLegend,\n colorAdapter,\n linearColor,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n labelPie,\n pivotHideIndicatorName,\n pivotTitle,\n addRegionPadding,\n dimensionLinkage,\n} from '../pipes'\n\nconst roseParallel: VChartSpecPipeline = [\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n labelPie,\n tooltip({ titleEncoding: 'angle' }),\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotRoseParallel: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n pivotHideIndicatorName,\n datasetPivot,\n pivotIndicators([\n initRoseParallel,\n addRegionPadding,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n labelPie,\n tooltip({ titleEncoding: 'angle' }),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const roseParallelSpecPipeline = [pivotAdapter(roseParallel, pivotRoseParallel)]\n"],"names":["roseParallel","initRoseParallel","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","labelPie","tooltip","verticalCrosshairRect","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotRoseParallel","initPivot","pivotGridStyle","pivotIndicatorsAsRow","pivotHideIndicatorName","datasetPivot","pivotIndicators","addRegionPadding","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","roseParallelSpecPipeline","pivotAdapter"],"mappings":";AAsCA,MAAMA,eAAmC;IACvCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBR,aAAaS,gBAAgBC;IAC7BC;IACAC,QAAQ;QAAE,eAAe;IAAQ;IACjCC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,oBAA4C;IAChDC;IACAC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd1B;QACA2B;QACA1B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAO;QACAN,mBAAmBC;QACnBG;QACAC,QAAQ;YAAE,eAAe;QAAQ;QACjCE;QACAC;QACAC;QACAC;KACD;IACDS;IACAC;IACAC;IACA5B,aAAa6B,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,2BAA2B;IAACC,aAAapC,cAAcqB;CAAmB"}
@@ -1,10 +1,12 @@
1
1
  import { bandAxisStyle } from "./bandAxisStyle.js";
2
+ import { createFormatterByDimension } from "../../../../utils/index.js";
2
3
  const heatmapBandAxis = (spec, context)=>{
3
4
  const result = {
4
5
  ...spec
5
6
  };
6
7
  const { advancedVSeed, vseed } = context;
7
8
  const { chartType } = vseed;
9
+ const { dimensions = [], encoding } = advancedVSeed;
8
10
  const xAxisConfig = advancedVSeed.config?.[chartType]?.xAxis ?? {};
9
11
  const yAxisConfig = advancedVSeed.config?.[chartType]?.yAxis ?? {};
10
12
  const xBandAxis = bandAxisStyle(xAxisConfig);
@@ -13,6 +15,18 @@ const heatmapBandAxis = (spec, context)=>{
13
15
  xBandAxis.bandPadding = 0;
14
16
  yBandAxis.orient = 'left';
15
17
  yBandAxis.bandPadding = 0;
18
+ const formatBandLabel = (axis)=>{
19
+ const dimIds = ('x' === axis ? encoding.x : encoding.y) || [];
20
+ const dimFormatter = dimIds.length ? createFormatterByDimension(dimensions.find((item)=>item.id === dimIds[0]), advancedVSeed.locale) : null;
21
+ return (text)=>{
22
+ if (Array.isArray(text)) return text;
23
+ const rawText = String(text ?? '');
24
+ if (!dimFormatter) return rawText;
25
+ return dimFormatter(rawText);
26
+ };
27
+ };
28
+ if (xBandAxis.label) xBandAxis.label.formatMethod = formatBandLabel('x');
29
+ if (yBandAxis.label) yBandAxis.label.formatMethod = formatBandLabel('y');
16
30
  result.axes = [
17
31
  xBandAxis,
18
32
  yBandAxis
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/heatmapBandAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/heatmapBandAxis.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis, YBandAxis } from 'src/types'\nimport { bandAxisStyle } from './bandAxisStyle'\n\nexport const heatmapBandAxis: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const xAxisConfig = (advancedVSeed.config?.[chartType as 'heatmap']?.xAxis ?? {}) as XBandAxis\n const yAxisConfig = (advancedVSeed.config?.[chartType as 'heatmap']?.yAxis ?? {}) as YBandAxis\n const xBandAxis = bandAxisStyle(xAxisConfig)\n const yBandAxis = bandAxisStyle(yAxisConfig)\n\n xBandAxis.orient = 'bottom'\n xBandAxis.bandPadding = 0\n yBandAxis.orient = 'left'\n yBandAxis.bandPadding = 0\n\n result.axes = [xBandAxis, yBandAxis]\n\n return result\n}\n"],"names":["heatmapBandAxis","spec","context","result","advancedVSeed","vseed","chartType","xAxisConfig","yAxisConfig","xBandAxis","bandAxisStyle","yBandAxis"],"mappings":";AAIO,MAAMA,kBAAkC,CAACC,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAME,cAAeH,cAAc,MAAM,EAAE,CAACE,UAAuB,EAAE,SAAS,CAAC;IAC/E,MAAME,cAAeJ,cAAc,MAAM,EAAE,CAACE,UAAuB,EAAE,SAAS,CAAC;IAC/E,MAAMG,YAAYC,cAAcH;IAChC,MAAMI,YAAYD,cAAcF;IAEhCC,UAAU,MAAM,GAAG;IACnBA,UAAU,WAAW,GAAG;IACxBE,UAAU,MAAM,GAAG;IACnBA,UAAU,WAAW,GAAG;IAExBR,OAAO,IAAI,GAAG;QAACM;QAAWE;KAAU;IAEpC,OAAOR;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/heatmapBandAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/heatmapBandAxis.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis, YBandAxis } from 'src/types'\nimport { bandAxisStyle } from './bandAxisStyle'\nimport { createFormatterByDimension } from 'src/pipeline/utils'\n\nexport const heatmapBandAxis: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { dimensions = [], encoding } = advancedVSeed\n const xAxisConfig = (advancedVSeed.config?.[chartType as 'heatmap']?.xAxis ?? {}) as XBandAxis\n const yAxisConfig = (advancedVSeed.config?.[chartType as 'heatmap']?.yAxis ?? {}) as YBandAxis\n const xBandAxis = bandAxisStyle(xAxisConfig)\n const yBandAxis = bandAxisStyle(yAxisConfig)\n\n xBandAxis.orient = 'bottom'\n xBandAxis.bandPadding = 0\n yBandAxis.orient = 'left'\n yBandAxis.bandPadding = 0\n\n const formatBandLabel = (axis: 'x' | 'y') => {\n const dimIds = (axis === 'x' ? encoding.x : encoding.y) || []\n const dimFormatter = dimIds.length\n ? createFormatterByDimension(\n dimensions.find((item) => item.id === dimIds[0]),\n advancedVSeed.locale,\n )\n : null\n return (text: string | string[]) => {\n if (Array.isArray(text)) {\n return text\n }\n const rawText = String(text ?? '')\n if (!dimFormatter) {\n return rawText\n }\n return dimFormatter(rawText)\n }\n }\n\n if (xBandAxis.label) {\n xBandAxis.label.formatMethod = formatBandLabel('x')\n }\n if (yBandAxis.label) {\n yBandAxis.label.formatMethod = formatBandLabel('y')\n }\n\n result.axes = [xBandAxis, yBandAxis]\n\n return result\n}\n"],"names":["heatmapBandAxis","spec","context","result","advancedVSeed","vseed","chartType","dimensions","encoding","xAxisConfig","yAxisConfig","xBandAxis","bandAxisStyle","yBandAxis","formatBandLabel","axis","dimIds","dimFormatter","createFormatterByDimension","item","text","Array","rawText","String"],"mappings":";;AAKO,MAAMA,kBAAkC,CAACC,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,aAAa,EAAE,EAAEC,QAAQ,EAAE,GAAGJ;IACtC,MAAMK,cAAeL,cAAc,MAAM,EAAE,CAACE,UAAuB,EAAE,SAAS,CAAC;IAC/E,MAAMI,cAAeN,cAAc,MAAM,EAAE,CAACE,UAAuB,EAAE,SAAS,CAAC;IAC/E,MAAMK,YAAYC,cAAcH;IAChC,MAAMI,YAAYD,cAAcF;IAEhCC,UAAU,MAAM,GAAG;IACnBA,UAAU,WAAW,GAAG;IACxBE,UAAU,MAAM,GAAG;IACnBA,UAAU,WAAW,GAAG;IAExB,MAAMC,kBAAkB,CAACC;QACvB,MAAMC,SAAUD,AAAAA,CAAAA,AAAS,QAATA,OAAeP,SAAS,CAAC,GAAGA,SAAS,CAAC,AAAD,KAAM,EAAE;QAC7D,MAAMS,eAAeD,OAAO,MAAM,GAC9BE,2BACEX,WAAW,IAAI,CAAC,CAACY,OAASA,KAAK,EAAE,KAAKH,MAAM,CAAC,EAAE,GAC/CZ,cAAc,MAAM,IAEtB;QACJ,OAAO,CAACgB;YACN,IAAIC,MAAM,OAAO,CAACD,OAChB,OAAOA;YAET,MAAME,UAAUC,OAAOH,QAAQ;YAC/B,IAAI,CAACH,cACH,OAAOK;YAET,OAAOL,aAAaK;QACtB;IACF;IAEA,IAAIX,UAAU,KAAK,EACjBA,UAAU,KAAK,CAAC,YAAY,GAAGG,gBAAgB;IAEjD,IAAID,UAAU,KAAK,EACjBA,UAAU,KAAK,CAAC,YAAY,GAAGC,gBAAgB;IAGjDX,OAAO,IAAI,GAAG;QAACQ;QAAWE;KAAU;IAEpC,OAAOV;AACT"}
@@ -1,13 +1,39 @@
1
- const radarAngleAxis = (spec)=>{
1
+ import { isArray } from "@visactor/vutils";
2
+ import { createFormatterByDimension } from "../../../../utils/index.js";
3
+ import { MeasureId } from "../../../../../dataReshape/index.js";
4
+ const radarAngleAxis = (spec, context)=>{
2
5
  const result = {
3
6
  ...spec
4
7
  };
8
+ const { advancedVSeed } = context;
9
+ const { dimensions = [], encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
5
10
  if (!result.axes) result.axes = [];
11
+ const onlyMeasureId = 0 === (encoding.angle || []).filter((v)=>v !== MeasureId).length;
12
+ const dimensionMap = new Map(dimensions.map((item)=>[
13
+ item.id,
14
+ item
15
+ ]));
16
+ const dimIds = (encoding.angle || []).filter((v)=>v !== MeasureId);
17
+ const dimFormatter = dimIds.length ? createFormatterByDimension(dimensionMap.get(dimIds[0]), advancedVSeed.locale) : null;
18
+ const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
19
+ const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
20
+ ...prev,
21
+ ...cur.unfoldInfo.colorIdMap
22
+ }), {});
6
23
  result.axes.push({
7
24
  orient: 'angle',
8
25
  visible: true,
9
26
  zero: true,
10
27
  nice: true,
28
+ label: {
29
+ formatMethod: (text)=>{
30
+ if (isArray(text)) return text;
31
+ if (onlyMeasureId) return colorIdMap[String(text)]?.alias ?? text;
32
+ const rawText = String(text ?? '');
33
+ if (!dimFormatter) return rawText;
34
+ return dimFormatter(rawText);
35
+ }
36
+ },
11
37
  grid: {
12
38
  visible: true
13
39
  },
@@ -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":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radarAngle.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport { isArray } from '@visactor/vutils'\nimport type { VChartSpecPipe } from 'src/types'\nimport { createFormatterByDimension } from 'src/pipeline/utils'\nimport { MeasureId } from 'src/dataReshape'\n\nexport const radarAngleAxis: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { dimensions = [], encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed\n\n if (!result.axes) {\n result.axes = []\n }\n\n const onlyMeasureId = (encoding.angle || []).filter((v) => v !== MeasureId).length === 0\n const dimensionMap = new Map(dimensions.map((item) => [item.id, item]))\n const dimIds = (encoding.angle || []).filter((v) => v !== MeasureId)\n // 目前只考虑单个xEncoding的场景\n const dimFormatter = dimIds.length\n ? createFormatterByDimension(dimensionMap.get(dimIds[0]), advancedVSeed.locale)\n : null\n const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo\n\n const colorIdMap = allDatasetReshapeInfo.reduce<Record<string, { id: string; alias: string }>>((prev, cur) => {\n return { ...prev, ...cur.unfoldInfo.colorIdMap }\n }, {})\n\n result.axes.push({\n orient: 'angle',\n visible: true,\n zero: true,\n nice: true,\n label: {\n formatMethod: (text: string | string[]) => {\n if (isArray(text)) {\n return text\n }\n if (onlyMeasureId) {\n return colorIdMap[String(text)]?.alias ?? text\n }\n const rawText = String(text ?? '')\n if (!dimFormatter) {\n return rawText\n }\n return dimFormatter(rawText)\n },\n },\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","context","result","advancedVSeed","dimensions","encoding","datasetReshapeInfo","pivotAllDatasetReshapeInfo","onlyMeasureId","v","MeasureId","dimensionMap","Map","item","dimIds","dimFormatter","createFormatterByDimension","allDatasetReshapeInfo","colorIdMap","prev","cur","text","isArray","String","rawText"],"mappings":";;;AAMO,MAAMA,iBAAiC,CAACC,MAAMC;IACnD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,aAAa,EAAE,EAAEC,QAAQ,EAAEC,kBAAkB,EAAEC,0BAA0B,EAAE,GAAGJ;IAEtF,IAAI,CAACD,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAMM,gBAAiBH,AAAgE,MAAhEA,AAAAA,CAAAA,SAAS,KAAK,IAAI,EAAC,EAAG,MAAM,CAAC,CAACI,IAAMA,MAAMC,WAAW,MAAM;IAClF,MAAMC,eAAe,IAAIC,IAAIR,WAAW,GAAG,CAAC,CAACS,OAAS;YAACA,KAAK,EAAE;YAAEA;SAAK;IACrE,MAAMC,SAAUT,AAAAA,CAAAA,SAAS,KAAK,IAAI,EAAC,EAAG,MAAM,CAAC,CAACI,IAAMA,MAAMC;IAE1D,MAAMK,eAAeD,OAAO,MAAM,GAC9BE,2BAA2BL,aAAa,GAAG,CAACG,MAAM,CAAC,EAAE,GAAGX,cAAc,MAAM,IAC5E;IACJ,MAAMc,wBAAwBV,8BAA8BD;IAE5D,MAAMY,aAAaD,sBAAsB,MAAM,CAAgD,CAACE,MAAMC,MAC7F;YAAE,GAAGD,IAAI;YAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;QAAC,IAC9C,CAAC;IAEJlB,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,OAAO;YACL,cAAc,CAACmB;gBACb,IAAIC,QAAQD,OACV,OAAOA;gBAET,IAAIb,eACF,OAAOU,UAAU,CAACK,OAAOF,MAAM,EAAE,SAASA;gBAE5C,MAAMG,UAAUD,OAAOF,QAAQ;gBAC/B,IAAI,CAACN,cACH,OAAOS;gBAET,OAAOT,aAAaS;YACtB;QACF;QACA,MAAM;YACJ,SAAS;QACX;QACA,YAAY;YACV,SAAS;QACX;QACA,MAAM;YACJ,SAAS;QACX;IACF;IAEA,OAAOtB;AACT"}
@@ -2,6 +2,7 @@ import { defaultTitleText } from "./title/defaultTitleText.js";
2
2
  import { MeasureId } from "../../../../../dataReshape/index.js";
3
3
  import { isArray, isNil } from "@visactor/vutils";
4
4
  import { bandAxisStyle } from "./bandAxisStyle.js";
5
+ import { createFormatterByDimension } from "../../../../utils/index.js";
5
6
  const xBand = (spec, context)=>{
6
7
  const result = {
7
8
  ...spec
@@ -25,13 +26,25 @@ const xBand = (spec, context)=>{
25
26
  0.1
26
27
  ];
27
28
  if (isNil(bandAxis.title?.text)) bandAxis.title.text = defaultTitleText(measures, dimensions, encoding.x);
28
- if (onlyMeasureId && bandAxis.label) {
29
+ if (bandAxis.label) {
29
30
  const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
30
31
  const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
31
32
  ...prev,
32
33
  ...cur.unfoldInfo.colorIdMap
33
34
  }), {});
34
- bandAxis.label.formatMethod = (text)=>isArray(text) ? text : colorIdMap[String(text)]?.alias ?? text;
35
+ const dimensionMap = new Map(dimensions.map((item)=>[
36
+ item.id,
37
+ item
38
+ ]));
39
+ const dimIds = (encoding.x || []).filter((v)=>v !== MeasureId);
40
+ const dimFormatter = dimIds.length ? createFormatterByDimension(dimensionMap.get(dimIds[0]), advancedVSeed.locale) : null;
41
+ bandAxis.label.formatMethod = (text)=>{
42
+ if (isArray(text)) return text;
43
+ if (onlyMeasureId) return colorIdMap[String(text)]?.alias ?? text;
44
+ const rawText = String(text ?? '');
45
+ if (!dimFormatter) return rawText;
46
+ return dimFormatter(rawText);
47
+ };
35
48
  }
36
49
  result.axes = [
37
50
  ...result.axes,
@@ -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 { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis } from 'src/types'\nimport { defaultTitleText } from './title/defaultTitleText'\nimport { MeasureId } from 'src/dataReshape'\nimport { isArray, isNil } from '@visactor/vutils'\nimport { bandAxisStyle } from './bandAxisStyle'\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 { labelAutoLimitLength = 80 } = config\n\n const onlyMeasureId = (encoding.x || []).filter((v) => v !== MeasureId).length === 0\n const bandAxis = bandAxisStyle(config)\n\n bandAxis.orient = 'bottom'\n bandAxis.maxHeight = labelAutoLimitLength + 60\n bandAxis.paddingInner = [0.15, 0.1]\n bandAxis.paddingOuter = [0.075, 0.1]\n\n if (isNil(bandAxis.title?.text)) {\n bandAxis.title!.text = defaultTitleText(measures, dimensions, encoding.x as string[])\n }\n\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","labelAutoLimitLength","onlyMeasureId","v","MeasureId","bandAxis","bandAxisStyle","isNil","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,WAAW,EAAE,EAAEC,aAAa,EAAE,EAAEC,QAAQ,EAAEC,kBAAkB,EAAEC,0BAA0B,EAAE,GAAGP;IACrG,MAAMQ,SAAUR,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE,SAAS,CAAC;IAEzE,IAAI,CAACH,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAM,EAAEU,uBAAuB,EAAE,EAAE,GAAGD;IAEtC,MAAME,gBAAiBL,AAA4D,MAA5DA,AAAAA,CAAAA,SAAS,CAAC,IAAI,EAAC,EAAG,MAAM,CAAC,CAACM,IAAMA,MAAMC,WAAW,MAAM;IAC9E,MAAMC,WAAWC,cAAcN;IAE/BK,SAAS,MAAM,GAAG;IAClBA,SAAS,SAAS,GAAGJ,uBAAuB;IAC5CI,SAAS,YAAY,GAAG;QAAC;QAAM;KAAI;IACnCA,SAAS,YAAY,GAAG;QAAC;QAAO;KAAI;IAEpC,IAAIE,MAAMF,SAAS,KAAK,EAAE,OACxBA,SAAS,KAAK,CAAE,IAAI,GAAGG,iBAAiBb,UAAUC,YAAYC,SAAS,CAAC;IAG1E,IAAIK,iBAAiBG,SAAS,KAAK,EAAE;QACnC,MAAMI,wBAAwBV,8BAA8BD;QAC5D,MAAMY,aAAaD,sBAAsB,MAAM,CAAgD,CAACE,MAAMC,MAC7F;gBAAE,GAAGD,IAAI;gBAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;YAAC,IAC9C,CAAC;QAEJP,SAAS,KAAK,CAAC,YAAY,GAAG,CAACQ,OACtBC,QAAQD,QAAQA,OAAQH,UAAU,CAACK,OAAOF,MAAM,EAAE,SAASA;IAEtE;IAEAtB,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAEc;KAAS;IACxC,OAAOd;AACT"}
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 { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis } from 'src/types'\nimport { defaultTitleText } from './title/defaultTitleText'\nimport { MeasureId } from 'src/dataReshape'\nimport { isArray, isNil } from '@visactor/vutils'\nimport { bandAxisStyle } from './bandAxisStyle'\nimport { createFormatterByDimension } from 'src/pipeline/utils'\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 { labelAutoLimitLength = 80 } = config\n\n const onlyMeasureId = (encoding.x || []).filter((v) => v !== MeasureId).length === 0\n const bandAxis = bandAxisStyle(config)\n\n bandAxis.orient = 'bottom'\n bandAxis.maxHeight = labelAutoLimitLength + 60\n bandAxis.paddingInner = [0.15, 0.1]\n bandAxis.paddingOuter = [0.075, 0.1]\n\n if (isNil(bandAxis.title?.text)) {\n bandAxis.title!.text = defaultTitleText(measures, dimensions, encoding.x as string[])\n }\n\n if (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 const dimensionMap = new Map(dimensions.map((item) => [item.id, item]))\n const dimIds = (encoding.x || []).filter((v) => v !== MeasureId)\n // 目前只考虑单个xEncoding的场景\n const dimFormatter = dimIds.length\n ? createFormatterByDimension(dimensionMap.get(dimIds[0]), advancedVSeed.locale)\n : null\n\n bandAxis.label.formatMethod = (text: string | string[]) => {\n if (isArray(text)) {\n return text\n }\n if (onlyMeasureId) {\n return colorIdMap[String(text)]?.alias ?? text\n }\n const rawText = String(text ?? '')\n if (!dimFormatter) {\n return rawText\n }\n return dimFormatter(rawText)\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","labelAutoLimitLength","onlyMeasureId","v","MeasureId","bandAxis","bandAxisStyle","isNil","defaultTitleText","allDatasetReshapeInfo","colorIdMap","prev","cur","dimensionMap","Map","item","dimIds","dimFormatter","createFormatterByDimension","text","isArray","String","rawText"],"mappings":";;;;;AAQO,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,WAAW,EAAE,EAAEC,aAAa,EAAE,EAAEC,QAAQ,EAAEC,kBAAkB,EAAEC,0BAA0B,EAAE,GAAGP;IACrG,MAAMQ,SAAUR,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE,SAAS,CAAC;IAEzE,IAAI,CAACH,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAM,EAAEU,uBAAuB,EAAE,EAAE,GAAGD;IAEtC,MAAME,gBAAiBL,AAA4D,MAA5DA,AAAAA,CAAAA,SAAS,CAAC,IAAI,EAAC,EAAG,MAAM,CAAC,CAACM,IAAMA,MAAMC,WAAW,MAAM;IAC9E,MAAMC,WAAWC,cAAcN;IAE/BK,SAAS,MAAM,GAAG;IAClBA,SAAS,SAAS,GAAGJ,uBAAuB;IAC5CI,SAAS,YAAY,GAAG;QAAC;QAAM;KAAI;IACnCA,SAAS,YAAY,GAAG;QAAC;QAAO;KAAI;IAEpC,IAAIE,MAAMF,SAAS,KAAK,EAAE,OACxBA,SAAS,KAAK,CAAE,IAAI,GAAGG,iBAAiBb,UAAUC,YAAYC,SAAS,CAAC;IAG1E,IAAIQ,SAAS,KAAK,EAAE;QAClB,MAAMI,wBAAwBV,8BAA8BD;QAC5D,MAAMY,aAAaD,sBAAsB,MAAM,CAAgD,CAACE,MAAMC,MAC7F;gBAAE,GAAGD,IAAI;gBAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;YAAC,IAC9C,CAAC;QAEJ,MAAMC,eAAe,IAAIC,IAAIlB,WAAW,GAAG,CAAC,CAACmB,OAAS;gBAACA,KAAK,EAAE;gBAAEA;aAAK;QACrE,MAAMC,SAAUnB,AAAAA,CAAAA,SAAS,CAAC,IAAI,EAAC,EAAG,MAAM,CAAC,CAACM,IAAMA,MAAMC;QAEtD,MAAMa,eAAeD,OAAO,MAAM,GAC9BE,2BAA2BL,aAAa,GAAG,CAACG,MAAM,CAAC,EAAE,GAAGxB,cAAc,MAAM,IAC5E;QAEJa,SAAS,KAAK,CAAC,YAAY,GAAG,CAACc;YAC7B,IAAIC,QAAQD,OACV,OAAOA;YAET,IAAIjB,eACF,OAAOQ,UAAU,CAACW,OAAOF,MAAM,EAAE,SAASA;YAE5C,MAAMG,UAAUD,OAAOF,QAAQ;YAC/B,IAAI,CAACF,cACH,OAAOK;YAET,OAAOL,aAAaK;QACtB;IACF;IAEA/B,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAEc;KAAS;IACxC,OAAOd;AACT"}
@@ -2,6 +2,7 @@ import { defaultTitleText } from "./title/defaultTitleText.js";
2
2
  import { MeasureId } from "../../../../../dataReshape/index.js";
3
3
  import { isArray, isNil } from "@visactor/vutils";
4
4
  import { bandAxisStyle } from "./bandAxisStyle.js";
5
+ import { createFormatterByDimension } from "../../../../utils/index.js";
5
6
  const yBand = (spec, context)=>{
6
7
  const result = {
7
8
  ...spec
@@ -27,13 +28,25 @@ const yBand = (spec, context)=>{
27
28
  0.1
28
29
  ];
29
30
  if (isNil(bandAxis.title?.text)) bandAxis.title.text = defaultTitleText(measures, dimensions, encoding.y);
30
- if (onlyMeasureId && bandAxis.label) {
31
+ if (bandAxis.label) {
31
32
  const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
32
33
  const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
33
34
  ...prev,
34
35
  ...cur.unfoldInfo.colorIdMap
35
36
  }), {});
36
- bandAxis.label.formatMethod = (text)=>isArray(text) ? text : colorIdMap[String(text)]?.alias ?? text;
37
+ const dimensionMap = new Map(dimensions.map((item)=>[
38
+ item.id,
39
+ item
40
+ ]));
41
+ const dimIds = (encoding.y || []).filter((v)=>v !== MeasureId);
42
+ const dimFormatter = dimIds.length ? createFormatterByDimension(dimensionMap.get(dimIds[0]), advancedVSeed.locale) : null;
43
+ bandAxis.label.formatMethod = (text)=>{
44
+ if (isArray(text)) return text;
45
+ if (onlyMeasureId) return colorIdMap[String(text)]?.alias ?? text;
46
+ const rawText = String(text ?? '');
47
+ if (!dimFormatter) return rawText;
48
+ return dimFormatter(rawText);
49
+ };
37
50
  }
38
51
  result.axes = [
39
52
  ...result.axes,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/yBand.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yBand.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis } from 'src/types'\nimport { defaultTitleText } from './title/defaultTitleText'\nimport { MeasureId } from 'src/dataReshape'\nimport { isArray, isNil } from '@visactor/vutils'\nimport { bandAxisStyle } from './bandAxisStyle'\n\nexport const yBand: 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 'bar']?.yAxis ?? {}) as XBandAxis\n\n if (!result.axes) {\n result.axes = []\n }\n\n const { labelAutoLimitLength = 80 } = config\n\n const onlyMeasureId = (encoding.y || []).filter((v: string) => v !== MeasureId).length === 0\n\n const bandAxis = bandAxisStyle(config)\n\n bandAxis.type = 'band'\n bandAxis.orient = 'left'\n bandAxis.maxWidth = labelAutoLimitLength + 60\n if (bandAxis.label) {\n bandAxis.label.containerAlign = 'right'\n }\n bandAxis.paddingInner = [0.15, 0.1]\n bandAxis.paddingOuter = [0.075, 0.1]\n\n if (isNil(bandAxis.title?.text)) {\n bandAxis.title!.text = defaultTitleText(measures, dimensions, encoding.y as string[])\n }\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":["yBand","spec","context","result","advancedVSeed","vseed","chartType","measures","dimensions","encoding","datasetReshapeInfo","pivotAllDatasetReshapeInfo","config","labelAutoLimitLength","onlyMeasureId","v","MeasureId","bandAxis","bandAxisStyle","isNil","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,WAAW,EAAE,EAAEC,aAAa,EAAE,EAAEC,QAAQ,EAAEC,kBAAkB,EAAEC,0BAA0B,EAAE,GAAGP;IACrG,MAAMQ,SAAUR,cAAc,MAAM,EAAE,CAACE,UAAmB,EAAE,SAAS,CAAC;IAEtE,IAAI,CAACH,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAM,EAAEU,uBAAuB,EAAE,EAAE,GAAGD;IAEtC,MAAME,gBAAiBL,AAAoE,MAApEA,AAAAA,CAAAA,SAAS,CAAC,IAAI,EAAC,EAAG,MAAM,CAAC,CAACM,IAAcA,MAAMC,WAAW,MAAM;IAEtF,MAAMC,WAAWC,cAAcN;IAE/BK,SAAS,IAAI,GAAG;IAChBA,SAAS,MAAM,GAAG;IAClBA,SAAS,QAAQ,GAAGJ,uBAAuB;IAC3C,IAAII,SAAS,KAAK,EAChBA,SAAS,KAAK,CAAC,cAAc,GAAG;IAElCA,SAAS,YAAY,GAAG;QAAC;QAAM;KAAI;IACnCA,SAAS,YAAY,GAAG;QAAC;QAAO;KAAI;IAEpC,IAAIE,MAAMF,SAAS,KAAK,EAAE,OACxBA,SAAS,KAAK,CAAE,IAAI,GAAGG,iBAAiBb,UAAUC,YAAYC,SAAS,CAAC;IAE1E,IAAIK,iBAAiBG,SAAS,KAAK,EAAE;QACnC,MAAMI,wBAAwBV,8BAA8BD;QAC5D,MAAMY,aAAaD,sBAAsB,MAAM,CAAgD,CAACE,MAAMC,MAC7F;gBAAE,GAAGD,IAAI;gBAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;YAAC,IAC9C,CAAC;QAEJP,SAAS,KAAK,CAAC,YAAY,GAAG,CAACQ,OACtBC,QAAQD,QAAQA,OAAQH,UAAU,CAACK,OAAOF,MAAM,EAAE,SAASA;IAEtE;IAEAtB,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAEc;KAAS;IACxC,OAAOd;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/yBand.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yBand.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis } from 'src/types'\nimport { defaultTitleText } from './title/defaultTitleText'\nimport { MeasureId } from 'src/dataReshape'\nimport { isArray, isNil } from '@visactor/vutils'\nimport { bandAxisStyle } from './bandAxisStyle'\nimport { createFormatterByDimension } from 'src/pipeline/utils'\n\nexport const yBand: 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 'bar']?.yAxis ?? {}) as XBandAxis\n\n if (!result.axes) {\n result.axes = []\n }\n\n const { labelAutoLimitLength = 80 } = config\n\n const onlyMeasureId = (encoding.y || []).filter((v: string) => v !== MeasureId).length === 0\n\n const bandAxis = bandAxisStyle(config)\n\n bandAxis.type = 'band'\n bandAxis.orient = 'left'\n bandAxis.maxWidth = labelAutoLimitLength + 60\n if (bandAxis.label) {\n bandAxis.label.containerAlign = 'right'\n }\n bandAxis.paddingInner = [0.15, 0.1]\n bandAxis.paddingOuter = [0.075, 0.1]\n\n if (isNil(bandAxis.title?.text)) {\n bandAxis.title!.text = defaultTitleText(measures, dimensions, encoding.y as string[])\n }\n if (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 const dimensionMap = new Map(dimensions.map((item) => [item.id, item]))\n const dimIds = (encoding.y || []).filter((v) => v !== MeasureId)\n // 目前只考虑单个yEncoding的场景\n const dimFormatter = dimIds.length\n ? createFormatterByDimension(dimensionMap.get(dimIds[0]), advancedVSeed.locale)\n : null\n\n bandAxis.label.formatMethod = (text: string | string[]) => {\n if (isArray(text)) {\n return text\n }\n if (onlyMeasureId) {\n return colorIdMap[String(text)]?.alias ?? text\n }\n const rawText = String(text ?? '')\n if (!dimFormatter) {\n return rawText\n }\n return dimFormatter(rawText)\n }\n }\n\n result.axes = [...result.axes, bandAxis] as ISpec['axes']\n return result\n}\n"],"names":["yBand","spec","context","result","advancedVSeed","vseed","chartType","measures","dimensions","encoding","datasetReshapeInfo","pivotAllDatasetReshapeInfo","config","labelAutoLimitLength","onlyMeasureId","v","MeasureId","bandAxis","bandAxisStyle","isNil","defaultTitleText","allDatasetReshapeInfo","colorIdMap","prev","cur","dimensionMap","Map","item","dimIds","dimFormatter","createFormatterByDimension","text","isArray","String","rawText"],"mappings":";;;;;AAQO,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,WAAW,EAAE,EAAEC,aAAa,EAAE,EAAEC,QAAQ,EAAEC,kBAAkB,EAAEC,0BAA0B,EAAE,GAAGP;IACrG,MAAMQ,SAAUR,cAAc,MAAM,EAAE,CAACE,UAAmB,EAAE,SAAS,CAAC;IAEtE,IAAI,CAACH,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAM,EAAEU,uBAAuB,EAAE,EAAE,GAAGD;IAEtC,MAAME,gBAAiBL,AAAoE,MAApEA,AAAAA,CAAAA,SAAS,CAAC,IAAI,EAAC,EAAG,MAAM,CAAC,CAACM,IAAcA,MAAMC,WAAW,MAAM;IAEtF,MAAMC,WAAWC,cAAcN;IAE/BK,SAAS,IAAI,GAAG;IAChBA,SAAS,MAAM,GAAG;IAClBA,SAAS,QAAQ,GAAGJ,uBAAuB;IAC3C,IAAII,SAAS,KAAK,EAChBA,SAAS,KAAK,CAAC,cAAc,GAAG;IAElCA,SAAS,YAAY,GAAG;QAAC;QAAM;KAAI;IACnCA,SAAS,YAAY,GAAG;QAAC;QAAO;KAAI;IAEpC,IAAIE,MAAMF,SAAS,KAAK,EAAE,OACxBA,SAAS,KAAK,CAAE,IAAI,GAAGG,iBAAiBb,UAAUC,YAAYC,SAAS,CAAC;IAE1E,IAAIQ,SAAS,KAAK,EAAE;QAClB,MAAMI,wBAAwBV,8BAA8BD;QAC5D,MAAMY,aAAaD,sBAAsB,MAAM,CAAgD,CAACE,MAAMC,MAC7F;gBAAE,GAAGD,IAAI;gBAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;YAAC,IAC9C,CAAC;QAEJ,MAAMC,eAAe,IAAIC,IAAIlB,WAAW,GAAG,CAAC,CAACmB,OAAS;gBAACA,KAAK,EAAE;gBAAEA;aAAK;QACrE,MAAMC,SAAUnB,AAAAA,CAAAA,SAAS,CAAC,IAAI,EAAC,EAAG,MAAM,CAAC,CAACM,IAAMA,MAAMC;QAEtD,MAAMa,eAAeD,OAAO,MAAM,GAC9BE,2BAA2BL,aAAa,GAAG,CAACG,MAAM,CAAC,EAAE,GAAGxB,cAAc,MAAM,IAC5E;QAEJa,SAAS,KAAK,CAAC,YAAY,GAAG,CAACc;YAC7B,IAAIC,QAAQD,OACV,OAAOA;YAET,IAAIjB,eACF,OAAOQ,UAAU,CAACW,OAAOF,MAAM,EAAE,SAASA;YAE5C,MAAMG,UAAUD,OAAOF,QAAQ;YAC/B,IAAI,CAACF,cACH,OAAOK;YAET,OAAOL,aAAaK;QACtB;IACF;IAEA/B,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAEc;KAAS;IACxC,OAAOd;AACT"}
@@ -1,11 +1,11 @@
1
- import type { Datum, Dimensions, Encoding, FoldInfo, Formatter, Label, Measure, Measures, NumFormat, VChartSpecPipe } from '../../../../../types';
1
+ import type { Datum, Dimensions, Encoding, FoldInfo, Formatter, Label, Locale, Measure, Measures, NumFormat, VChartSpecPipe } from '../../../../../types';
2
2
  export declare const label: VChartSpecPipe;
3
3
  export declare const generateMeasureValue: (value: number | string, measure: Measure, labelAutoFormat?: boolean, numFormat?: NumFormat) => string;
4
4
  export declare const generateMeasurePercent: (value: number | string, sum: number, formatter: Formatter) => string;
5
- export declare const buildLabel: (label: Label, vseedMeasures: Measures | undefined, vseedDimensions: Dimensions | undefined, advancedVSeedDimensions: Dimensions, advancedVSeedMeasures: Measures, encoding: Encoding, foldInfoList: (Pick<FoldInfo, "measureId" | "measureValue"> & Partial<Pick<FoldInfo, "statistics">>)[]) => {
5
+ export declare const buildLabel: (label: Label, vseedMeasures: Measures | undefined, vseedDimensions: Dimensions | undefined, advancedVSeedDimensions: Dimensions, advancedVSeedMeasures: Measures, encoding: Encoding, foldInfoList: (Pick<FoldInfo, "measureId" | "measureValue"> & Partial<Pick<FoldInfo, "statistics">>)[], locale?: Locale) => {
6
6
  visible: boolean;
7
7
  dataFilter: (data: Datum[]) => Record<string | number, any>[];
8
- formatMethod: (_: unknown, datum: Datum) => string | (string | number)[];
8
+ formatMethod: (_: unknown, datum: Datum) => string | string[];
9
9
  syncState: boolean;
10
10
  position: "inside" | "outside" | undefined;
11
11
  style: {
@@ -1,4 +1,4 @@
1
- import { DATUM_HIDE_KEY, createFormatter, createFormatterByMeasure, findMeasureById } from "../../../../utils/index.js";
1
+ import { DATUM_HIDE_KEY, createFormatter, createFormatterByDimension, createFormatterByMeasure, findMeasureById } from "../../../../utils/index.js";
2
2
  import { isNumber, merge, uniqueBy } from "remeda";
3
3
  import { selector, selectorWithDynamicFilter } from "../../../../../dataSelector/index.js";
4
4
  import { MeasureId } from "../../../../../dataReshape/constant.js";
@@ -34,7 +34,7 @@ const generateMeasurePercent = (value, sum, formatter)=>{
34
34
  const percentValue = num / sum;
35
35
  return formatter(percentValue);
36
36
  };
37
- const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedDimensions, advancedVSeedMeasures, encoding, foldInfoList)=>{
37
+ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedDimensions, advancedVSeedMeasures, encoding, foldInfoList, locale = 'zh-CN')=>{
38
38
  const { enable, wrap, showValue, showValuePercent, showDimension, labelOverlap, labelColorSmartInvert, labelStroke, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
39
39
  const hasDimLabelEncoding = vseedDimensions.some((item)=>encoding.label?.includes(item.id));
40
40
  const labelDims = uniqueBy(hasDimLabelEncoding ? vseedDimensions.filter((item)=>encoding.label?.includes(item.id)) : showDimension ? advancedVSeedDimensions.filter((d)=>d.id !== MeasureId && 'row' !== d.encoding && 'column' !== d.encoding) : [], (item)=>item.id);
@@ -54,7 +54,8 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
54
54
  const result = [];
55
55
  const dimLabels = labelDims.map((item)=>{
56
56
  const id = item.id;
57
- return datum[id];
57
+ const formatter = createFormatterByDimension(item, locale);
58
+ return formatter(datum[id]);
58
59
  });
59
60
  const meaLabels = labelMeas.map((item)=>generateMeasureValue(datum[item.id], item, autoFormat, numFormat));
60
61
  result.push(...dimLabels);