@visactor/vseed 0.1.17 → 0.1.19

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 (131) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/builder.d.ts +108 -0
  4. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  5. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js +0 -1
  6. package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
  7. package/dist/esm/pipeline/spec/chart/pipeline/rose.js +1 -3
  8. package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
  9. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +1 -3
  10. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
  11. package/dist/esm/pipeline/spec/chart/pipes/axes/index.d.ts +0 -1
  12. package/dist/esm/pipeline/spec/chart/pipes/axes/index.js +1 -2
  13. package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js +2 -17
  14. package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js.map +1 -1
  15. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js +3 -2
  16. package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js.map +1 -1
  17. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js +3 -2
  18. package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js.map +1 -1
  19. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js +19 -1
  20. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
  21. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js +3 -2
  22. package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js.map +1 -1
  23. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +4 -1
  24. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  25. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js +1 -9
  26. package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js.map +1 -1
  27. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js +1 -9
  28. package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
  29. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +93 -51
  30. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  31. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js +1 -0
  32. package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js.map +1 -1
  33. package/dist/esm/pipeline/spec/table/pipes/init/table.js +1 -0
  34. package/dist/esm/pipeline/spec/table/pipes/init/table.js.map +1 -1
  35. package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js +7 -7
  36. package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js.map +1 -1
  37. package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js +1 -1
  38. package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js.map +1 -1
  39. package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js +7 -7
  40. package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js.map +1 -1
  41. package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js +7 -7
  42. package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js.map +1 -1
  43. package/dist/esm/theme/dark.js +8 -2
  44. package/dist/esm/theme/dark.js.map +1 -1
  45. package/dist/esm/theme/light.js +8 -2
  46. package/dist/esm/theme/light.js.map +1 -1
  47. package/dist/esm/types/advancedVSeed.d.ts +180 -0
  48. package/dist/esm/types/chartType/area/area.d.ts +2 -2
  49. package/dist/esm/types/chartType/area/zArea.d.ts +5 -5
  50. package/dist/esm/types/chartType/area/zArea.js +3 -1
  51. package/dist/esm/types/chartType/area/zArea.js.map +1 -1
  52. package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +2 -2
  53. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +5 -5
  54. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js +3 -1
  55. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
  56. package/dist/esm/types/chartType/bar/bar.d.ts +2 -2
  57. package/dist/esm/types/chartType/bar/zBar.d.ts +5 -5
  58. package/dist/esm/types/chartType/bar/zBar.js +3 -1
  59. package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
  60. package/dist/esm/types/chartType/barParallel/barParallel.d.ts +2 -2
  61. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +5 -5
  62. package/dist/esm/types/chartType/barParallel/zBarParallel.js +3 -1
  63. package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
  64. package/dist/esm/types/chartType/barPercent/barPercent.d.ts +2 -2
  65. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +5 -5
  66. package/dist/esm/types/chartType/barPercent/zBarPercent.js +3 -1
  67. package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
  68. package/dist/esm/types/chartType/column/column.d.ts +2 -2
  69. package/dist/esm/types/chartType/column/zColumn.d.ts +5 -5
  70. package/dist/esm/types/chartType/column/zColumn.js +3 -1
  71. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  72. package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +2 -2
  73. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +5 -5
  74. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +3 -1
  75. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
  76. package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +2 -2
  77. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +5 -5
  78. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +3 -1
  79. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
  80. package/dist/esm/types/chartType/donut/donut.d.ts +1 -1
  81. package/dist/esm/types/chartType/donut/zDonut.d.ts +5 -0
  82. package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +1 -1
  83. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +5 -5
  84. package/dist/esm/types/chartType/dualAxis/zDualAxis.js +3 -1
  85. package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
  86. package/dist/esm/types/chartType/funnel/funnel.d.ts +2 -2
  87. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +5 -5
  88. package/dist/esm/types/chartType/funnel/zFunnel.js +3 -1
  89. package/dist/esm/types/chartType/funnel/zFunnel.js.map +1 -1
  90. package/dist/esm/types/chartType/heatmap/heatmap.d.ts +1 -1
  91. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +5 -5
  92. package/dist/esm/types/chartType/heatmap/zHeatmap.js +3 -1
  93. package/dist/esm/types/chartType/heatmap/zHeatmap.js.map +1 -1
  94. package/dist/esm/types/chartType/line/line.d.ts +1 -1
  95. package/dist/esm/types/chartType/line/zLine.d.ts +5 -5
  96. package/dist/esm/types/chartType/line/zLine.js +3 -1
  97. package/dist/esm/types/chartType/line/zLine.js.map +1 -1
  98. package/dist/esm/types/chartType/pie/pie.d.ts +1 -1
  99. package/dist/esm/types/chartType/pie/zPie.d.ts +5 -0
  100. package/dist/esm/types/chartType/radar/radar.d.ts +1 -1
  101. package/dist/esm/types/chartType/radar/zRadar.d.ts +5 -5
  102. package/dist/esm/types/chartType/radar/zRadar.js +3 -1
  103. package/dist/esm/types/chartType/radar/zRadar.js.map +1 -1
  104. package/dist/esm/types/chartType/rose/rose.d.ts +2 -2
  105. package/dist/esm/types/chartType/rose/zRose.d.ts +5 -5
  106. package/dist/esm/types/chartType/rose/zRose.js +3 -1
  107. package/dist/esm/types/chartType/rose/zRose.js.map +1 -1
  108. package/dist/esm/types/chartType/roseParallel/roseParallel.d.ts +1 -1
  109. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +5 -5
  110. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js +3 -1
  111. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js.map +1 -1
  112. package/dist/esm/types/chartType/scatter/scatter.d.ts +1 -1
  113. package/dist/esm/types/chartType/scatter/zScatter.d.ts +5 -5
  114. package/dist/esm/types/chartType/scatter/zScatter.js +3 -1
  115. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  116. package/dist/esm/types/chartType/table/table.d.ts +1 -1
  117. package/dist/esm/types/properties/config/config.d.ts +180 -0
  118. package/dist/esm/types/properties/config/label/label.d.ts +7 -0
  119. package/dist/esm/types/properties/config/label/zLabel.d.ts +5 -0
  120. package/dist/esm/types/properties/config/label/zLabel.js +6 -1
  121. package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
  122. package/dist/esm/types/properties/format/numFormat.d.ts +1 -5
  123. package/dist/esm/types/properties/format/numFormat.js.map +1 -1
  124. package/dist/esm/types/properties/theme/customTheme.d.ts +180 -0
  125. package/dist/esm/types/zVseed.d.ts +90 -80
  126. package/dist/umd/index.js +260 -185
  127. package/dist/umd/index.js.map +1 -1
  128. package/package.json +3 -3
  129. package/dist/esm/pipeline/spec/chart/pipes/axes/angle.d.ts +0 -2
  130. package/dist/esm/pipeline/spec/chart/pipes/axes/angle.js +0 -46
  131. package/dist/esm/pipeline/spec/chart/pipes/axes/angle.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding, FoldMeasureValue } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Dimension,\n Encoding,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding } = advancedVSeed\n\n const measureGroups: MeasureGroup[] = []\n if (measures) {\n measures.forEach((measure: MeasureGroup) => {\n if (measure.children && measure.children.length > 0) {\n measureGroups.push(measure)\n }\n })\n }\n\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const measures = measureGroup.children\n if (!measures) {\n return\n }\n const groupId = measureGroup.id\n const {\n dataset: newSubDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(measures, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: `${FoldMeasureValue}${groupId}`,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n const reshapeInfo = {\n id: groupId,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newSubDataset)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithEncoding","advancedVSeed","context","result","vseed","dataset","dimensions","measures","encoding","measureGroups","measure","datasets","datasetReshapeInfo","measureGroup","index","groupId","newSubDataset","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","FoldMeasureValue","getColorMeasureId","reshapeInfo"],"mappings":";;;AAcO,MAAMA,2BAAyC,CAACC,eAAeC;IACpE,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAE,GAAGD;IACpB,MAAM,EAAEE,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAE,GAAGP;IAErD,MAAMQ,gBAAgC,EAAE;IACxC,IAAIF,UACFA,SAAS,OAAO,CAAC,CAACG;QAChB,IAAIA,QAAQ,QAAQ,IAAIA,QAAQ,QAAQ,CAAC,MAAM,GAAG,GAChDD,cAAc,IAAI,CAACC;IAEvB;IAGF,MAAMC,WAAoB,EAAE;IAC5B,MAAMC,qBAAyC,EAAE;IAEjDH,cAAc,OAAO,CAAC,CAACI,cAAcC;QACnC,MAAMP,WAAWM,aAAa,QAAQ;QACtC,IAAI,CAACN,UACH;QAEF,MAAMQ,UAAUF,aAAa,EAAE;QAC/B,MAAM,EACJ,SAASG,aAAa,EACtBC,QAAQ,EACRC,UAAU,EACX,GAAGC,sBACFd,SACAe,SAASd,YAAY,CAACe,OAASA,KAAK,EAAE,GACtCD,SAASb,UAAU,CAACc,OAASA,KAAK,EAAE,GACpCb,UACA;YACE,eAAe;YACf,kBAAkB,GAAGc,mBAAmBP,SAAS;YACjD,gBAAgBQ,kBAAkBtB;QACpC;QAGF,MAAMuB,cAAc;YAClB,IAAIT;YACJD;YACAG;YACAC;QACF;QACAP,SAAS,IAAI,CAACK;QACdJ,mBAAmB,IAAI,CAACY;IAC1B;IAEA,OAAO;QACL,GAAGrB,MAAM;QACT,SAASQ;QACT,oBAAoBC;IACtB;AACF"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { dataReshapeByEncoding, FoldMeasureValue } from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Encoding,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding } = advancedVSeed\n\n const measureGroups: MeasureGroup[] = []\n if (measures) {\n measures.forEach((measure: MeasureGroup) => {\n if (measure.children && measure.children.length > 0) {\n measureGroups.push(measure)\n }\n })\n }\n\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const measures = measureGroup.children\n if (!measures) {\n return\n }\n const groupId = measureGroup.id\n const {\n dataset: newSubDataset,\n foldInfo,\n unfoldInfo,\n } = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item) => item.id),\n uniqueBy(measures, (item) => item.id),\n encoding as Encoding,\n {\n colorItemAsId: false,\n foldMeasureValue: `${FoldMeasureValue}${groupId}`,\n colorMeasureId: getColorMeasureId(advancedVSeed as AdvancedVSeed),\n },\n )\n\n const reshapeInfo = {\n id: groupId,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newSubDataset)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithEncoding","advancedVSeed","context","result","vseed","dataset","dimensions","measures","encoding","measureGroups","measure","datasets","datasetReshapeInfo","measureGroup","index","groupId","newSubDataset","foldInfo","unfoldInfo","dataReshapeByEncoding","uniqueBy","item","FoldMeasureValue","getColorMeasureId","reshapeInfo"],"mappings":";;;AAaO,MAAMA,2BAAyC,CAACC,eAAeC;IACpE,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAE,GAAGD;IACpB,MAAM,EAAEE,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,QAAQ,EAAE,GAAGP;IAErD,MAAMQ,gBAAgC,EAAE;IACxC,IAAIF,UACFA,SAAS,OAAO,CAAC,CAACG;QAChB,IAAIA,QAAQ,QAAQ,IAAIA,QAAQ,QAAQ,CAAC,MAAM,GAAG,GAChDD,cAAc,IAAI,CAACC;IAEvB;IAGF,MAAMC,WAAoB,EAAE;IAC5B,MAAMC,qBAAyC,EAAE;IAEjDH,cAAc,OAAO,CAAC,CAACI,cAAcC;QACnC,MAAMP,WAAWM,aAAa,QAAQ;QACtC,IAAI,CAACN,UACH;QAEF,MAAMQ,UAAUF,aAAa,EAAE;QAC/B,MAAM,EACJ,SAASG,aAAa,EACtBC,QAAQ,EACRC,UAAU,EACX,GAAGC,sBACFd,SACAe,SAASd,YAAY,CAACe,OAASA,KAAK,EAAE,GACtCD,SAASb,UAAU,CAACc,OAASA,KAAK,EAAE,GACpCb,UACA;YACE,eAAe;YACf,kBAAkB,GAAGc,mBAAmBP,SAAS;YACjD,gBAAgBQ,kBAAkBtB;QACpC;QAGF,MAAMuB,cAAc;YAClB,IAAIT;YACJD;YACAG;YACAC;QACF;QACAP,SAAS,IAAI,CAACK;QACdJ,mBAAmB,IAAI,CAACY;IAC1B;IAEA,OAAO;QACL,GAAGrB,MAAM;QACT,SAASQ;QACT,oBAAoBC;IACtB;AACF"}
@@ -25,7 +25,6 @@ const pivotHeatmap = [
25
25
  datasetXY,
26
26
  colorAdapter(color, linearColor),
27
27
  label,
28
- discreteLegend,
29
28
  tooltipHeatmap,
30
29
  colorCellStyleFill(cellStyle),
31
30
  annotationPoint,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/heatmap.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/heatmap.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltipHeatmap,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n discreteLegend,\n color,\n colorAdapter,\n linearColor,\n colorLegend,\n cellStyle,\n colorCellStyleFill,\n pivotDiscreteLegend,\n pivotColorLegend,\n} from '../pipes'\nimport { initHeatmap } from '../pipes/init/heatmap'\n\nconst heatmap: SpecPipeline = [\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n colorAdapter(discreteLegend, colorLegend),\n colorCellStyleFill(cellStyle),\n tooltipHeatmap,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotHeatmap: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n discreteLegend,\n tooltipHeatmap,\n colorCellStyleFill(cellStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const heatmapSpecPipeline: SpecPipeline = [pivotAdapter(heatmap, pivotHeatmap)]\n"],"names":["heatmap","initHeatmap","backgroundColor","datasetXY","colorAdapter","color","linearColor","label","discreteLegend","colorLegend","colorCellStyleFill","cellStyle","tooltipHeatmap","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotHeatmap","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","heatmapSpecPipeline","pivotAdapter"],"mappings":";;AA8BA,MAAMA,UAAwB;IAC5BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAH,aAAaI,gBAAgBC;IAC7BC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdrB;QACAC;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAI;QACAF,mBAAmBC;QACnBE;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACApB,aAAaqB,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAa5B,SAASiB;CAAc"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/heatmap.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/heatmap.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltipHeatmap,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n discreteLegend,\n color,\n colorAdapter,\n linearColor,\n colorLegend,\n cellStyle,\n colorCellStyleFill,\n pivotDiscreteLegend,\n pivotColorLegend,\n} from '../pipes'\nimport { initHeatmap } from '../pipes/init/heatmap'\n\nconst heatmap: SpecPipeline = [\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n colorAdapter(discreteLegend, colorLegend),\n colorCellStyleFill(cellStyle),\n tooltipHeatmap,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotHeatmap: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n tooltipHeatmap,\n colorCellStyleFill(cellStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const heatmapSpecPipeline: SpecPipeline = [pivotAdapter(heatmap, pivotHeatmap)]\n"],"names":["heatmap","initHeatmap","backgroundColor","datasetXY","colorAdapter","color","linearColor","label","discreteLegend","colorLegend","colorCellStyleFill","cellStyle","tooltipHeatmap","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotHeatmap","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","heatmapSpecPipeline","pivotAdapter"],"mappings":";;AA8BA,MAAMA,UAAwB;IAC5BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAH,aAAaI,gBAAgBC;IAC7BC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdrB;QACAC;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAK;QACAF,mBAAmBC;QACnBE;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACApB,aAAaqB,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAa5B,SAASiB;CAAc"}
@@ -1,4 +1,4 @@
1
- import { angleAxis, backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, discreteLegend, initPivot, initRose, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, progressive, radiusAxis, roseStyle, stackCornerRadius, stackInverse, tooltip, verticalCrosshairRect } from "../pipes/index.js";
1
+ import { backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, discreteLegend, initPivot, initRose, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, progressive, radiusAxis, roseStyle, stackCornerRadius, stackInverse, tooltip, verticalCrosshairRect } from "../pipes/index.js";
2
2
  const rose = [
3
3
  initRose,
4
4
  stackCornerRadius,
@@ -7,7 +7,6 @@ const rose = [
7
7
  backgroundColor,
8
8
  datasetXY,
9
9
  progressive,
10
- angleAxis,
11
10
  radiusAxis,
12
11
  verticalCrosshairRect,
13
12
  colorRoseStyleFill(roseStyle),
@@ -29,7 +28,6 @@ const pivotRose = [
29
28
  datasetXY,
30
29
  progressive,
31
30
  radiusAxis,
32
- angleAxis,
33
31
  verticalCrosshairRect,
34
32
  colorRoseStyleFill(roseStyle),
35
33
  label,
@@ -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 { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\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 angleAxis,\n progressive,\n linearColor,\n colorAdapter,\n pivotColorLegend,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n} from '../pipes'\n\nconst rose: SpecPipeline = [\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n angleAxis,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n label,\n tooltip,\n]\n\nconst pivotRose: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n angleAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n label,\n tooltip,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const roseSpecPipeline = [pivotAdapter(rose, pivotRose)]\n"],"names":["rose","initRose","stackCornerRadius","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","angleAxis","radiusAxis","verticalCrosshairRect","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","label","tooltip","pivotRose","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","roseSpecPipeline","pivotAdapter"],"mappings":";AAgCA,MAAMA,OAAqB;IACzBC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBV,aAAaW,gBAAgBC;IAC7BC;IACAC;CACD;AAED,MAAMC,YAA0B;IAC9BC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdvB;QACAC;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAE;QACAD;QACAE;QACAC,mBAAmBC;QACnBG;QACAC;KACD;IACDO;IACAC;IACAtB,aAAauB,qBAAqBC;CACnC;AAEM,MAAMC,mBAAmB;IAACC,aAAa9B,MAAMmB;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 { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\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} from '../pipes'\n\nconst rose: SpecPipeline = [\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 label,\n tooltip,\n]\n\nconst pivotRose: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n label,\n tooltip,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const roseSpecPipeline = [pivotAdapter(rose, pivotRose)]\n"],"names":["rose","initRose","stackCornerRadius","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","verticalCrosshairRect","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","label","tooltip","pivotRose","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","roseSpecPipeline","pivotAdapter"],"mappings":";AA+BA,MAAMA,OAAqB;IACzBC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBT,aAAaU,gBAAgBC;IAC7BC;IACAC;CACD;AAED,MAAMC,YAA0B;IAC9BC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdtB;QACAC;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC,mBAAmBC;QACnBG;QACAC;KACD;IACDO;IACAC;IACArB,aAAasB,qBAAqBC;CACnC;AAEM,MAAMC,mBAAmB;IAACC,aAAa7B,MAAMkB;CAAW"}
@@ -1,4 +1,4 @@
1
- import { angleAxis, annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, discreteLegend, initPivot, initRoseParallel, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, progressive, radiusAxis, roseStyle, stackCornerRadius, tooltip, verticalCrosshairRect } from "../pipes/index.js";
1
+ import { annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, discreteLegend, initPivot, initRoseParallel, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, progressive, radiusAxis, roseStyle, stackCornerRadius, tooltip, verticalCrosshairRect } from "../pipes/index.js";
2
2
  const roseParallel = [
3
3
  initRoseParallel,
4
4
  stackCornerRadius,
@@ -7,7 +7,6 @@ const roseParallel = [
7
7
  datasetXY,
8
8
  progressive,
9
9
  radiusAxis,
10
- angleAxis,
11
10
  colorRoseStyleFill(roseStyle),
12
11
  colorAdapter(discreteLegend, colorLegend),
13
12
  label,
@@ -31,7 +30,6 @@ const pivotRoseParallel = [
31
30
  datasetXY,
32
31
  progressive,
33
32
  radiusAxis,
34
- angleAxis,
35
33
  verticalCrosshairRect,
36
34
  colorRoseStyleFill(roseStyle),
37
35
  label,
@@ -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 { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\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 angleAxis,\n progressive,\n pivotColorLegend,\n colorAdapter,\n linearColor,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n} from '../pipes'\n\nconst roseParallel: SpecPipeline = [\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n angleAxis,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n label,\n tooltip,\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotRoseParallel: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n angleAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const roseParallelSpecPipeline: SpecPipeline = [pivotAdapter(roseParallel, pivotRoseParallel)]\n"],"names":["roseParallel","initRoseParallel","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","angleAxis","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","label","tooltip","verticalCrosshairRect","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotRoseParallel","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","roseParallelSpecPipeline","pivotAdapter"],"mappings":";AAmCA,MAAMA,eAA6B;IACjCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBT,aAAaU,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,oBAAkC;IACtCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd1B;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAO;QACAN,mBAAmBC;QACnBG;QACAC;QACAE;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACA1B,aAAa2B,qBAAqBC;CACnC;AAEM,MAAMC,2BAAyC;IAACC,aAAajC,cAAcsB;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 { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\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} from '../pipes'\n\nconst roseParallel: SpecPipeline = [\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n label,\n tooltip,\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotRoseParallel: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const roseParallelSpecPipeline: SpecPipeline = [pivotAdapter(roseParallel, pivotRoseParallel)]\n"],"names":["roseParallel","initRoseParallel","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","label","tooltip","verticalCrosshairRect","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotRoseParallel","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","roseParallelSpecPipeline","pivotAdapter"],"mappings":";AAkCA,MAAMA,eAA6B;IACjCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBR,aAAaS,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,oBAAkC;IACtCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdzB;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAO;QACAN,mBAAmBC;QACnBG;QACAC;QACAE;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACAzB,aAAa0B,qBAAqBC;CACnC;AAEM,MAAMC,2BAAyC;IAACC,aAAahC,cAAcqB;CAAmB"}
@@ -5,6 +5,5 @@ export { yLinear } from './yLinear';
5
5
  export { yLinearPrimary } from './yLinearPrimary';
6
6
  export { yLinearSecondary } from './yLinearSecondary';
7
7
  export { radiusAxis } from './radius';
8
- export { angleAxis } from './angle';
9
8
  export { radarAngleAxis } from './radarAngle';
10
9
  export { radarRadiusAxis } from './radarRadius';
@@ -5,7 +5,6 @@ import { yLinear } from "./yLinear.js";
5
5
  import { yLinearPrimary } from "./yLinearPrimary.js";
6
6
  import { yLinearSecondary } from "./yLinearSecondary.js";
7
7
  import { radiusAxis } from "./radius.js";
8
- import { angleAxis } from "./angle.js";
9
8
  import { radarAngleAxis } from "./radarAngle.js";
10
9
  import { radarRadiusAxis } from "./radarRadius.js";
11
- export { angleAxis, radarAngleAxis, radarRadiusAxis, radiusAxis, xBand, xLinear, yBand, yLinear, yLinearPrimary, yLinearSecondary };
10
+ export { radarAngleAxis, radarRadiusAxis, radiusAxis, xBand, xLinear, yBand, yLinear, yLinearPrimary, yLinearSecondary };
@@ -5,28 +5,13 @@ const radiusAxis = (spec, context)=>{
5
5
  const { advancedVSeed } = context;
6
6
  const { dimensions, measures } = advancedVSeed;
7
7
  if (!dimensions || !measures) return result;
8
- const is0D = 0 === dimensions.length;
9
- const is1M1D = 1 === dimensions.length && 1 === measures.length;
10
- const showAxis = !(is0D || is1M1D);
11
8
  if (!result.axes) result.axes = [];
12
9
  result.axes.push({
13
10
  type: 'linear',
14
11
  orient: 'radius',
15
- visible: showAxis,
12
+ visible: false,
16
13
  zero: true,
17
- nice: !!showAxis,
18
- grid: {
19
- visible: showAxis
20
- },
21
- tick: {
22
- visible: showAxis
23
- },
24
- label: {
25
- visible: showAxis
26
- },
27
- domainLine: {
28
- visible: showAxis
29
- }
14
+ nice: false
30
15
  });
31
16
  return result;
32
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/axes/radius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const radiusAxis: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { dimensions, measures } = advancedVSeed\n\n if (!dimensions || !measures) {\n return result\n }\n\n const is0D = dimensions.length === 0\n const is1M1D = dimensions.length === 1 && measures.length === 1\n const showAxis = !(is0D || is1M1D)\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n type: 'linear',\n orient: 'radius',\n visible: showAxis,\n zero: true,\n nice: showAxis ? true : false,\n grid: {\n visible: showAxis,\n },\n tick: {\n visible: showAxis,\n },\n label: {\n visible: showAxis,\n },\n domainLine: {\n visible: showAxis,\n },\n })\n\n return result\n}\n"],"names":["radiusAxis","spec","context","result","advancedVSeed","dimensions","measures","is0D","is1M1D","showAxis"],"mappings":"AAGO,MAAMA,aAAuB,CAACC,MAAMC;IACzC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGF;IAEjC,IAAI,CAACC,cAAc,CAACC,UAClB,OAAOH;IAGT,MAAMI,OAAOF,AAAsB,MAAtBA,WAAW,MAAM;IAC9B,MAAMG,SAASH,AAAsB,MAAtBA,WAAW,MAAM,IAAUC,AAAoB,MAApBA,SAAS,MAAM;IACzD,MAAMG,WAAW,CAAEF,CAAAA,QAAQC,MAAK;IAEhC,IAAI,CAACL,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,MAAM;QACN,QAAQ;QACR,SAASM;QACT,MAAM;QACN,IAAI,IAAEA;QACN,MAAM;YACJ,SAASA;QACX;QACA,MAAM;YACJ,SAASA;QACX;QACA,OAAO;YACL,SAASA;QACX;QACA,YAAY;YACV,SAASA;QACX;IACF;IAEA,OAAON;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/axes/radius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const radiusAxis: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { dimensions, measures } = advancedVSeed\n\n if (!dimensions || !measures) {\n return result\n }\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n type: 'linear',\n orient: 'radius',\n visible: false,\n zero: true,\n nice: false,\n })\n\n return result\n}\n"],"names":["radiusAxis","spec","context","result","advancedVSeed","dimensions","measures"],"mappings":"AAGO,MAAMA,aAAuB,CAACC,MAAMC;IACzC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGF;IAEjC,IAAI,CAACC,cAAc,CAACC,UAClB,OAAOH;IAGT,IAAI,CAACA,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,MAAM;QACN,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;IACR;IAEA,OAAOA;AACT"}
@@ -1,11 +1,12 @@
1
+ import { isDeepEqual } from "remeda";
1
2
  const initBarParallel = (spec, context)=>{
2
3
  const result = {
3
4
  ...spec
4
5
  };
5
6
  const { advancedVSeed } = context;
6
- const { datasetReshapeInfo, dimensions } = advancedVSeed;
7
+ const { datasetReshapeInfo, encoding } = advancedVSeed;
7
8
  const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
8
- const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim)=>dim.id === dimensions[0].id);
9
+ const sameDimensionsMode = isDeepEqual(encoding.y, encoding.color);
9
10
  result.type = 'bar';
10
11
  result.direction = 'horizontal';
11
12
  result.yField = sameDimensionsMode ? [
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/barParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/barParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const initBarParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, dimensions } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim) => dim.id === dimensions[0].id)\n\n result.type = 'bar'\n result.direction = 'horizontal'\n\n result.yField = sameDimensionsMode\n ? [unfoldInfo.encodingY]\n : ([unfoldInfo.encodingY, unfoldInfo.encodingDetail] as string[])\n result.xField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initBarParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","dimensions","unfoldInfo","foldInfo","sameDimensionsMode","dim"],"mappings":"AAGO,MAAMA,kBAA4B,CAACC,MAAMC;IAC9C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,UAAU,EAAE,GAAGF;IAC3C,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBH,WAAW,MAAM,GAAG,KAAKA,WAAW,KAAK,CAAC,CAACI,MAAQA,IAAI,EAAE,KAAKJ,UAAU,CAAC,EAAE,CAAC,EAAE;IAEzGH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IAEnBA,OAAO,MAAM,GAAGM,qBACZ;QAACF,WAAW,SAAS;KAAC,GACrB;QAACA,WAAW,SAAS;QAAEA,WAAW,cAAc;KAAC;IACtDJ,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAE/CJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/barParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/barParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport type { SpecPipe } from 'src/types'\n\nexport const initBarParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.y, encoding.color)\n\n result.type = 'bar'\n result.direction = 'horizontal'\n\n result.yField = sameDimensionsMode\n ? [unfoldInfo.encodingY]\n : ([unfoldInfo.encodingY, unfoldInfo.encodingDetail] as string[])\n result.xField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initBarParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual"],"mappings":";AAIO,MAAMA,kBAA4B,CAACC,MAAMC;IAC9C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBC,YAAYJ,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjEH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IAEnBA,OAAO,MAAM,GAAGM,qBACZ;QAACF,WAAW,SAAS;KAAC,GACrB;QAACA,WAAW,SAAS;QAAEA,WAAW,cAAc;KAAC;IACtDJ,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAE/CJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
@@ -1,11 +1,12 @@
1
+ import { isDeepEqual } from "remeda";
1
2
  const initColumnParallel = (spec, context)=>{
2
3
  const result = {
3
4
  ...spec
4
5
  };
5
6
  const { advancedVSeed } = context;
6
- const { datasetReshapeInfo, dimensions } = advancedVSeed;
7
+ const { datasetReshapeInfo, encoding } = advancedVSeed;
7
8
  const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
8
- const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim)=>dim.id === dimensions[0].id);
9
+ const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color);
9
10
  result.type = 'bar';
10
11
  result.direction = 'vertical';
11
12
  result.xField = sameDimensionsMode ? [
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/columnParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/columnParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const initColumnParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, dimensions } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim) => dim.id === dimensions[0].id)\n\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = sameDimensionsMode ? [unfoldInfo.encodingX] : [unfoldInfo.encodingX, unfoldInfo.encodingDetail]\n result.yField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initColumnParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","dimensions","unfoldInfo","foldInfo","sameDimensionsMode","dim"],"mappings":"AAGO,MAAMA,qBAA+B,CAACC,MAAMC;IACjD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,UAAU,EAAE,GAAGF;IAC3C,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBH,WAAW,MAAM,GAAG,KAAKA,WAAW,KAAK,CAAC,CAACI,MAAQA,IAAI,EAAE,KAAKJ,UAAU,CAAC,EAAE,CAAC,EAAE;IAEzGH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGM,qBAAqB;QAACF,WAAW,SAAS;KAAC,GAAG;QAACA,WAAW,SAAS;QAAEA,WAAW,cAAc;KAAC;IAC/GJ,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAC/CJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/columnParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/columnParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport type { SpecPipe } from 'src/types'\n\nexport const initColumnParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color)\n\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = sameDimensionsMode ? [unfoldInfo.encodingX] : [unfoldInfo.encodingX, unfoldInfo.encodingDetail]\n result.yField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initColumnParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual"],"mappings":";AAIO,MAAMA,qBAA+B,CAACC,MAAMC;IACjD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBC,YAAYJ,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjEH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGM,qBAAqB;QAACF,WAAW,SAAS;KAAC,GAAG;QAACA,WAAW,SAAS;QAAEA,WAAW,cAAc;KAAC;IAC/GJ,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAC/CJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
@@ -11,7 +11,25 @@ const initPivot = (spec)=>{
11
11
  records: [],
12
12
  widthMode: 'adaptive',
13
13
  heightMode: 'adaptive',
14
- indicatorsAsCol: false
14
+ indicatorsAsCol: false,
15
+ select: {
16
+ highlightMode: 'cell',
17
+ headerSelectMode: 'inline'
18
+ },
19
+ hover: {
20
+ highlightMode: 'cross'
21
+ },
22
+ tooltip: {
23
+ isShowOverflowTextTooltip: true
24
+ },
25
+ corner: {
26
+ titleOnDimension: 'all'
27
+ },
28
+ animationAppear: {
29
+ duration: 600,
30
+ type: 'all',
31
+ direction: 'row'
32
+ }
15
33
  };
16
34
  };
17
35
  const pivotIndicatorsAsRow = (spec)=>{
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/pivot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/pivot.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { SpecPipe } from 'src/types'\n\nexport const initPivot: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n animation: true,\n rows: [],\n columns: [],\n indicators: [],\n records: [],\n widthMode: 'adaptive',\n heightMode: 'adaptive',\n indicatorsAsCol: false,\n }\n}\n\nexport const pivotIndicatorsAsRow: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: false,\n }\n}\n\nexport const pivotIndicatorsAsCol: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: true,\n }\n}\n"],"names":["initPivot","spec","result","pivotIndicatorsAsRow","pivotIndicatorsAsCol"],"mappings":"AAGO,MAAMA,YAAsB,CAACC;IAClC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,WAAW;QACX,MAAM,EAAE;QACR,SAAS,EAAE;QACX,YAAY,EAAE;QACd,SAAS,EAAE;QACX,WAAW;QACX,YAAY;QACZ,iBAAiB;IACnB;AACF;AAEO,MAAMC,uBAAiC,CAACF;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,iBAAiB;IACnB;AACF;AAEO,MAAME,uBAAiC,CAACH;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,iBAAiB;IACnB;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/pivot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/pivot.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { SpecPipe } from 'src/types'\n\nexport const initPivot: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n animation: true,\n rows: [],\n columns: [],\n indicators: [],\n records: [],\n widthMode: 'adaptive',\n heightMode: 'adaptive',\n indicatorsAsCol: false,\n select: {\n highlightMode: 'cell',\n headerSelectMode: 'inline',\n },\n hover: {\n highlightMode: 'cross',\n },\n tooltip: {\n isShowOverflowTextTooltip: true,\n },\n corner: {\n titleOnDimension: 'all',\n },\n animationAppear: {\n duration: 600,\n type: 'all',\n direction: 'row',\n },\n }\n}\n\nexport const pivotIndicatorsAsRow: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: false,\n }\n}\n\nexport const pivotIndicatorsAsCol: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: true,\n }\n}\n"],"names":["initPivot","spec","result","pivotIndicatorsAsRow","pivotIndicatorsAsCol"],"mappings":"AAGO,MAAMA,YAAsB,CAACC;IAClC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,WAAW;QACX,MAAM,EAAE;QACR,SAAS,EAAE;QACX,YAAY,EAAE;QACd,SAAS,EAAE;QACX,WAAW;QACX,YAAY;QACZ,iBAAiB;QACjB,QAAQ;YACN,eAAe;YACf,kBAAkB;QACpB;QACA,OAAO;YACL,eAAe;QACjB;QACA,SAAS;YACP,2BAA2B;QAC7B;QACA,QAAQ;YACN,kBAAkB;QACpB;QACA,iBAAiB;YACf,UAAU;YACV,MAAM;YACN,WAAW;QACb;IACF;AACF;AAEO,MAAMC,uBAAiC,CAACF;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,iBAAiB;IACnB;AACF;AAEO,MAAME,uBAAiC,CAACH;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,iBAAiB;IACnB;AACF"}
@@ -1,11 +1,12 @@
1
+ import { isDeepEqual } from "remeda";
1
2
  const initRoseParallel = (spec, context)=>{
2
3
  const result = {
3
4
  ...spec
4
5
  };
5
6
  const { advancedVSeed } = context;
6
- const { datasetReshapeInfo, dataset, dimensions } = advancedVSeed;
7
+ const { datasetReshapeInfo, dataset, encoding } = advancedVSeed;
7
8
  const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
8
- const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim)=>dim.id === dimensions[0].id);
9
+ const sameDimensionsMode = isDeepEqual(encoding.angle, encoding.color);
9
10
  result.type = 'rose';
10
11
  result.angleField = sameDimensionsMode ? [
11
12
  unfoldInfo.encodingAngle
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/roseParallel.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const initRoseParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, dataset, dimensions } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim) => dim.id === dimensions[0].id)\n\n result.type = 'rose'\n result.angleField = sameDimensionsMode\n ? [unfoldInfo.encodingAngle]\n : [unfoldInfo.encodingAngle, unfoldInfo.encodingDetail]\n result.valueField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n\n result.outerRadius = 0.9\n result.innerRadius = 0\n\n const hasNegativeValue = dataset.flat().find((d) => d[foldInfo.measureValue] < 0)\n if (hasNegativeValue) {\n result.innerRadius = 0.05\n }\n\n result.rose = {\n style: {\n stroke: '#ffffff',\n lineWidth: 1,\n },\n state: {\n hover: {\n lineWidth: 1,\n fillOpacity: 0.6,\n },\n },\n }\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initRoseParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","dataset","dimensions","unfoldInfo","foldInfo","sameDimensionsMode","dim","hasNegativeValue","d"],"mappings":"AAGO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,OAAO,EAAEC,UAAU,EAAE,GAAGH;IACpD,MAAM,EAAEI,UAAU,EAAEC,QAAQ,EAAE,GAAGJ,kBAAkB,CAAC,EAAE;IAEtD,MAAMK,qBAAqBH,WAAW,MAAM,GAAG,KAAKA,WAAW,KAAK,CAAC,CAACI,MAAQA,IAAI,EAAE,KAAKJ,UAAU,CAAC,EAAE,CAAC,EAAE;IAEzGJ,OAAO,IAAI,GAAG;IACdA,OAAO,UAAU,GAAGO,qBAChB;QAACF,WAAW,aAAa;KAAC,GAC1B;QAACA,WAAW,aAAa;QAAEA,WAAW,cAAc;KAAC;IACzDL,OAAO,UAAU,GAAGM,SAAS,YAAY;IACzCN,OAAO,WAAW,GAAGK,WAAW,eAAe;IAC/CL,OAAO,OAAO,GAAG;IAEjBA,OAAO,WAAW,GAAG;IACrBA,OAAO,WAAW,GAAG;IAErB,MAAMS,mBAAmBN,QAAQ,IAAI,GAAG,IAAI,CAAC,CAACO,IAAMA,CAAC,CAACJ,SAAS,YAAY,CAAC,GAAG;IAC/E,IAAIG,kBACFT,OAAO,WAAW,GAAG;IAGvBA,OAAO,IAAI,GAAG;QACZ,OAAO;YACL,QAAQ;YACR,WAAW;QACb;QACA,OAAO;YACL,OAAO;gBACL,WAAW;gBACX,aAAa;YACf;QACF;IACF;IACAA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/roseParallel.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport type { SpecPipe } from 'src/types'\n\nexport const initRoseParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, dataset, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.angle, encoding.color)\n\n result.type = 'rose'\n result.angleField = sameDimensionsMode\n ? [unfoldInfo.encodingAngle]\n : [unfoldInfo.encodingAngle, unfoldInfo.encodingDetail]\n result.valueField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n\n result.outerRadius = 0.9\n result.innerRadius = 0\n\n const hasNegativeValue = dataset.flat().find((d) => d[foldInfo.measureValue] < 0)\n if (hasNegativeValue) {\n result.innerRadius = 0.05\n }\n\n result.rose = {\n style: {\n stroke: '#ffffff',\n lineWidth: 1,\n },\n state: {\n hover: {\n lineWidth: 1,\n fillOpacity: 0.6,\n },\n },\n }\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initRoseParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","dataset","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual","hasNegativeValue","d"],"mappings":";AAIO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGH;IAClD,MAAM,EAAEI,UAAU,EAAEC,QAAQ,EAAE,GAAGJ,kBAAkB,CAAC,EAAE;IAEtD,MAAMK,qBAAqBC,YAAYJ,SAAS,KAAK,EAAEA,SAAS,KAAK;IAErEJ,OAAO,IAAI,GAAG;IACdA,OAAO,UAAU,GAAGO,qBAChB;QAACF,WAAW,aAAa;KAAC,GAC1B;QAACA,WAAW,aAAa;QAAEA,WAAW,cAAc;KAAC;IACzDL,OAAO,UAAU,GAAGM,SAAS,YAAY;IACzCN,OAAO,WAAW,GAAGK,WAAW,eAAe;IAC/CL,OAAO,OAAO,GAAG;IAEjBA,OAAO,WAAW,GAAG;IACrBA,OAAO,WAAW,GAAG;IAErB,MAAMS,mBAAmBN,QAAQ,IAAI,GAAG,IAAI,CAAC,CAACO,IAAMA,CAAC,CAACJ,SAAS,YAAY,CAAC,GAAG;IAC/E,IAAIG,kBACFT,OAAO,WAAW,GAAG;IAGvBA,OAAO,IAAI,GAAG;QACZ,OAAO;YACL,QAAQ;YACR,WAAW;QACb;QACA,OAAO;YACL,OAAO;gBACL,WAAW;gBACX,aAAa;YACf;QACF;IACF;IACAA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
@@ -35,7 +35,7 @@ const generateMeasurePercent = (value, sum, formatter)=>{
35
35
  return formatter(percentValue);
36
36
  };
37
37
  const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedMeasures, encoding, foldInfoList)=>{
38
- const { enable, wrap, showValue, showValuePercent, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
38
+ const { enable, wrap, showValue, showValuePercent, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {}, labelLayout } = label;
39
39
  const labelDims = uniqueBy((vseedDimensions || []).filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
40
40
  const labelMeas = uniqueBy((vseedMeasures || []).filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
41
41
  const percentFormat = merge(numFormat, {
@@ -62,6 +62,9 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
62
62
  return result.join(' ');
63
63
  },
64
64
  position: labelPosition,
65
+ layout: {
66
+ align: labelLayout
67
+ },
65
68
  style: {
66
69
  fill: labelColor,
67
70
  fontSize: labelFontSize,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isEmpty, merge, uniqueBy } from 'remeda'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n if (!baseConfig || isEmpty(baseConfig.label)) {\n return result\n }\n\n const { label } = baseConfig\n\n result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding as Encoding, [\n foldInfo,\n ])\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure?: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n if (!measure) {\n return value\n }\n\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n labelOverlap,\n labelColorSmartInvert,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const labelDims = uniqueBy(\n (vseedDimensions || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n const labelMeas = uniqueBy(\n (vseedMeasures || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => item.alias || item.id)\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n const measurePercentLabel = generateMeasurePercent(\n datum[measureValue] as number | string,\n statistics.sum,\n percentFormatter,\n )\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n } as ILineLikeLabelSpec\n\n if (labelOverlap) {\n result.overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","isEmpty","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","labelOverlap","labelColorSmartInvert","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","labelDims","uniqueBy","item","labelMeas","percentFormat","percentFormatter","createFormatter","_","datum","dimLabels","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel"],"mappings":"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"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isEmpty, merge, uniqueBy } from 'remeda'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n if (!baseConfig || isEmpty(baseConfig.label)) {\n return result\n }\n\n const { label } = baseConfig\n\n result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding as Encoding, [\n foldInfo,\n ])\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure?: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n if (!measure) {\n return value\n }\n\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n labelOverlap,\n labelColorSmartInvert,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n labelLayout,\n } = label\n\n const labelDims = uniqueBy(\n (vseedDimensions || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n const labelMeas = uniqueBy(\n (vseedMeasures || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => item.alias || item.id)\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n const measurePercentLabel = generateMeasurePercent(\n datum[measureValue] as number | string,\n statistics.sum,\n percentFormatter,\n )\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n layout: {\n align: labelLayout,\n },\n style: {\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n } as ILineLikeLabelSpec\n\n if (labelOverlap) {\n result.overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","isEmpty","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","labelOverlap","labelColorSmartInvert","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","labelLayout","labelDims","uniqueBy","item","labelMeas","percentFormat","percentFormatter","createFormatter","_","datum","dimLabels","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel"],"mappings":"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"}
@@ -55,15 +55,7 @@ const colorLegend = (spec, context)=>{
55
55
  padding: 0,
56
56
  field: unfoldInfo.encodingColor,
57
57
  maxWidth: '30%',
58
- startText: {
59
- visible: true,
60
- style: {
61
- fill: labelColor || labelFontColor,
62
- fontSize: labelFontSize,
63
- fontWeight: labelFontWeight
64
- }
65
- },
66
- endText: {
58
+ handlerText: {
67
59
  visible: true,
68
60
  style: {
69
61
  fill: labelColor || labelFontColor,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/colorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/colorLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const colorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'color',\n visible: enable,\n orient,\n position: legendPosition,\n padding: 0,\n field: unfoldInfo.encodingColor,\n maxWidth: '30%',\n startText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n endText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return result\n}\n"],"names":["colorLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition"],"mappings":"AAEO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,SAAS,EAAE,GAAGF;IAC1C,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAMG,aAAaJ,cAAc,MAAM,CAACE,UAAU;IAClD,IAAI,CAACE,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOL;IAGT,MAAM,EAAEM,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,MAAM,EAAEC,WAAW,QAAQ,EAAEC,cAAc,EAAEC,UAAU,EAAEC,gBAAgB,EAAE,EAAEC,eAAe,EAAE,GAAGN,UAAU,CAAC;IAEpH,MAAMO,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAENR,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACTM;QACA,UAAUC;QACV,SAAS;QACT,OAAOV,WAAW,aAAa;QAC/B,UAAU;QACV,WAAW;YACT,SAAS;YACT,OAAO;gBACL,MAAMM,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;QACA,SAAS;YACP,SAAS;YACT,OAAO;gBACL,MAAMF,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAOZ;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/legend/colorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/colorLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const colorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'color',\n visible: enable,\n orient,\n position: legendPosition,\n padding: 0,\n field: unfoldInfo.encodingColor,\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return result\n}\n"],"names":["colorLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition"],"mappings":"AAEO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,SAAS,EAAE,GAAGF;IAC1C,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAMG,aAAaJ,cAAc,MAAM,CAACE,UAAU;IAClD,IAAI,CAACE,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOL;IAGT,MAAM,EAAEM,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,MAAM,EAAEC,WAAW,QAAQ,EAAEC,cAAc,EAAEC,UAAU,EAAEC,gBAAgB,EAAE,EAAEC,eAAe,EAAE,GAAGN,UAAU,CAAC;IAEpH,MAAMO,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAENR,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACTM;QACA,UAAUC;QACV,SAAS;QACT,OAAOV,WAAW,aAAa;QAC/B,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMM,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAOZ;AACT"}
@@ -63,15 +63,7 @@ const pivotColorLegend = (spec, context)=>{
63
63
  min: min,
64
64
  max: max,
65
65
  maxWidth: '30%',
66
- startText: {
67
- visible: true,
68
- style: {
69
- fill: labelColor || labelFontColor,
70
- fontSize: labelFontSize,
71
- fontWeight: labelFontWeight
72
- }
73
- },
74
- endText: {
66
+ handlerText: {
75
67
  visible: true,
76
68
  style: {
77
69
  fill: labelColor || labelFontColor,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { IColorTableLegendOption } from '@visactor/vtable/es/ts-types/component/legend'\nimport type { Color, Legend, SpecPipe } from 'src/types'\n\nexport const pivotColorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n const max = Math.max(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMax))\n const { legend, color } = baseConfig\n const { colorScheme, linearColorScheme } = color\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends: IColorTableLegendOption = {\n visible: enable,\n type: 'color',\n orient,\n position: legendPosition,\n\n colors: linearColorScheme || colorScheme || [],\n value: [min, max],\n min: min,\n max: max,\n\n maxWidth: '30%',\n startText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n endText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return { ...result, legends }\n}\n"],"names":["pivotColorLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","max","Math","d","min","legend","color","colorScheme","linearColorScheme","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","legends"],"mappings":"AAIO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAC/B,MAAMI,MAAMC,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAMC,MAAMF,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAM,EAAEE,MAAM,EAAEC,KAAK,EAAE,GAAGP;IAC1B,MAAM,EAAEQ,WAAW,EAAEC,iBAAiB,EAAE,GAAGF;IAE3C,MAAM,EACJG,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACtB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMO,UAAmC;QACvC,SAASR;QACT,MAAM;QACNM;QACA,UAAUC;QAEV,QAAQR,qBAAqBD,eAAe,EAAE;QAC9C,OAAO;YAACH;YAAKH;SAAI;QACjB,KAAKG;QACL,KAAKH;QAEL,UAAU;QACV,WAAW;YACT,SAAS;YACT,OAAO;gBACL,MAAMW,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;QACA,SAAS;YACP,SAAS;YACT,OAAO;gBACL,MAAMF,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAO;QAAE,GAAGlB,MAAM;QAAEqB;IAAQ;AAC9B"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { IColorTableLegendOption } from '@visactor/vtable/es/ts-types/component/legend'\nimport type { Color, Legend, SpecPipe } from 'src/types'\n\nexport const pivotColorLegend: SpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n const max = Math.max(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMax))\n const { legend, color } = baseConfig\n const { colorScheme, linearColorScheme } = color\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends: IColorTableLegendOption = {\n visible: enable,\n type: 'color',\n orient,\n position: legendPosition,\n\n colors: linearColorScheme || colorScheme || [],\n value: [min, max],\n min: min,\n max: max,\n\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n return { ...result, legends }\n}\n"],"names":["pivotColorLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","max","Math","d","min","legend","color","colorScheme","linearColorScheme","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","legends"],"mappings":"AAIO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAC/B,MAAMI,MAAMC,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAMC,MAAMF,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAM,EAAEE,MAAM,EAAEC,KAAK,EAAE,GAAGP;IAC1B,MAAM,EAAEQ,WAAW,EAAEC,iBAAiB,EAAE,GAAGF;IAE3C,MAAM,EACJG,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACtB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMO,UAAmC;QACvC,SAASR;QACT,MAAM;QACNM;QACA,UAAUC;QAEV,QAAQR,qBAAqBD,eAAe,EAAE;QAC9C,OAAO;YAACH;YAAKH;SAAI;QACjB,KAAKG;QACL,KAAKH;QAEL,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMW,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAO;QAAE,GAAGlB,MAAM;QAAEqB;IAAQ;AAC9B"}