@visactor/vseed 0.1.51 → 0.2.0

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 (129) hide show
  1. package/dist/cjs/index.cjs +2 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/builder.d.ts +334 -0
  4. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +3 -3
  5. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
  6. package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +1 -2
  7. package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
  8. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +3 -3
  9. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
  10. package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js +8 -6
  11. package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js.map +1 -1
  12. package/dist/esm/pipeline/advanced/chart/pipes/markStyle/markStyle.js +3 -1
  13. package/dist/esm/pipeline/advanced/chart/pipes/markStyle/markStyle.js.map +1 -1
  14. package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js +2 -1
  15. package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js.map +1 -1
  16. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +1 -1
  17. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
  18. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +1 -1
  19. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  20. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +1 -1
  21. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
  22. package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +6 -5
  23. package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -1
  24. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +15 -13
  25. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
  26. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +3 -1
  27. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
  28. package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.d.ts +2 -0
  29. package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.js +17 -0
  30. package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.js.map +1 -0
  31. package/dist/esm/pipeline/spec/chart/pipes/color/index.d.ts +1 -0
  32. package/dist/esm/pipeline/spec/chart/pipes/color/index.js +2 -1
  33. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js +1 -1
  34. package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js.map +1 -1
  35. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js +1 -1
  36. package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js.map +1 -1
  37. package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
  38. package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
  39. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js +2 -2
  40. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
  41. package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.d.ts +2 -0
  42. package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js +52 -0
  43. package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js.map +1 -0
  44. package/dist/esm/pipeline/spec/chart/pipes/markStyle/index.d.ts +2 -0
  45. package/dist/esm/pipeline/spec/chart/pipes/markStyle/index.js +3 -1
  46. package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.d.ts +2 -0
  47. package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js +67 -0
  48. package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js.map +1 -0
  49. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.d.ts +2 -0
  50. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.js +7 -0
  51. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.js.map +1 -0
  52. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.d.ts +2 -0
  53. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.js +7 -0
  54. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.js.map +1 -0
  55. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/index.d.ts +4 -0
  56. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/index.js +4 -0
  57. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.d.ts +2 -0
  58. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.js +7 -0
  59. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.js.map +1 -0
  60. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.d.ts +2 -0
  61. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.js +7 -0
  62. package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.js.map +1 -0
  63. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js +18 -20
  64. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js.map +1 -1
  65. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js +2 -0
  66. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
  67. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +1 -1
  68. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  69. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js +2 -2
  70. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
  71. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js +5 -3
  72. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js.map +1 -1
  73. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.d.ts +1 -0
  74. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js +2 -1
  75. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js.map +1 -1
  76. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +1 -0
  77. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
  78. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +6 -1
  79. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
  80. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js +8 -3
  81. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js.map +1 -1
  82. package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js +2 -3
  83. package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
  84. package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.d.ts +1 -1
  85. package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.js +2 -2
  86. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.d.ts +1 -0
  87. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +16 -2
  88. package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
  89. package/dist/esm/pipeline/utils/measures/find.d.ts +1 -0
  90. package/dist/esm/pipeline/utils/measures/find.js +13 -1
  91. package/dist/esm/pipeline/utils/measures/find.js.map +1 -1
  92. package/dist/esm/theme/common/axes.js +4 -4
  93. package/dist/esm/theme/common/axes.js.map +1 -1
  94. package/dist/esm/theme/common/boxPlot.d.ts +5 -0
  95. package/dist/esm/theme/common/boxPlot.js +15 -0
  96. package/dist/esm/theme/common/boxPlot.js.map +1 -0
  97. package/dist/esm/theme/common/crosshair.js +4 -4
  98. package/dist/esm/theme/common/crosshair.js.map +1 -1
  99. package/dist/esm/theme/common/table.js +2 -0
  100. package/dist/esm/theme/common/table.js.map +1 -1
  101. package/dist/esm/theme/dark/dark.js +4 -1
  102. package/dist/esm/theme/dark/dark.js.map +1 -1
  103. package/dist/esm/theme/light/light.js +4 -1
  104. package/dist/esm/theme/light/light.js.map +1 -1
  105. package/dist/esm/types/advancedVSeed.d.ts +358 -0
  106. package/dist/esm/types/chartType/boxplot/boxplot.d.ts +9 -1
  107. package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +316 -0
  108. package/dist/esm/types/chartType/boxplot/zBoxplot.js +3 -1
  109. package/dist/esm/types/chartType/boxplot/zBoxplot.js.map +1 -1
  110. package/dist/esm/types/properties/config/boxplot.d.ts +21 -0
  111. package/dist/esm/types/properties/config/boxplot.js +8 -1
  112. package/dist/esm/types/properties/config/boxplot.js.map +1 -1
  113. package/dist/esm/types/properties/config/config.d.ts +21 -0
  114. package/dist/esm/types/properties/markStyle/boxPlotStyle.d.ts +148 -0
  115. package/dist/esm/types/properties/markStyle/boxPlotStyle.js +14 -0
  116. package/dist/esm/types/properties/markStyle/boxPlotStyle.js.map +1 -0
  117. package/dist/esm/types/properties/markStyle/index.d.ts +2 -0
  118. package/dist/esm/types/properties/markStyle/index.js +2 -0
  119. package/dist/esm/types/properties/markStyle/markStyle.d.ts +316 -0
  120. package/dist/esm/types/properties/markStyle/markStyle.js +5 -1
  121. package/dist/esm/types/properties/markStyle/markStyle.js.map +1 -1
  122. package/dist/esm/types/properties/markStyle/outlierStyle.d.ts +161 -0
  123. package/dist/esm/types/properties/markStyle/outlierStyle.js +22 -0
  124. package/dist/esm/types/properties/markStyle/outlierStyle.js.map +1 -0
  125. package/dist/esm/types/properties/theme/customTheme.d.ts +42 -0
  126. package/dist/esm/types/zVseed.d.ts +316 -0
  127. package/dist/umd/index.js +330 -99
  128. package/dist/umd/index.js.map +1 -1
  129. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.ts"],"sourcesContent":["import { boxplot } from '@visactor/vdataset'\nimport { uniqueBy } from 'remeda'\nimport {\n FoldMeasureId,\n FoldMeasureName,\n LowerWhisker,\n MedianMeasureId,\n OutliersMeasureId,\n Q1MeasureValue,\n Q3MeasureValue,\n Separator,\n unfoldDimensions,\n UpperWhisker,\n} from 'src/dataReshape'\nimport type {\n AdvancedPipe,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Dimension,\n Encoding,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithBoxplotEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset, chartType } = vseed as ColumnParallel\n const { encoding = {}, config } = advancedVSeed\n const measures = advancedVSeed.reshapeMeasures ?? advancedVSeed.measures ?? []\n const dimensions = advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? []\n const uniqDims = uniqueBy(dimensions, (item: Dimension) => item.id)\n const chartConfig = config?.[chartType as 'boxPlot']\n const whiskers = chartConfig?.whiskers\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 rowColumnFields = uniqueBy(\n dimensions.filter((dim: Dimension) => dim.encoding === 'row' || dim.encoding === 'column'),\n (item: Dimension) => item.id,\n )\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const subMeasures = measureGroup.children\n if (!subMeasures) {\n return\n }\n const groupId = measureGroup.id\n let newDatasets: any[] = []\n let foldInfo: any = {}\n let unfoldInfo: any = {}\n const validEncodingIds = (encoding.value || []).filter((id) => subMeasures.find((field) => field.id === id))\n\n if (validEncodingIds.length) {\n const boxPlotDataList: Dataset = []\n validEncodingIds.forEach((f) => {\n const m = subMeasures.find((m) => m.id === f)\n const boxPlotData = boxplot(dataset, {\n field: f,\n groupField: [\n ...(encoding.x ?? []),\n ...(encoding.color ?? []),\n ...rowColumnFields.map((item: Dimension) => item.id),\n ] as string[],\n whiskers,\n outputNames: {\n q1: Q1MeasureValue,\n q3: Q3MeasureValue,\n lowerWhisker: LowerWhisker,\n upperWhisker: UpperWhisker,\n median: MedianMeasureId,\n outliers: OutliersMeasureId,\n },\n }) as Dataset\n\n boxPlotData.forEach((datum) => {\n datum[FoldMeasureId] = f\n datum[FoldMeasureName] = m?.alias ?? f\n })\n\n boxPlotDataList.push(...boxPlotData)\n })\n const res = unfoldDimensions(boxPlotDataList, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((d) => {\n newDatasets.push(d)\n })\n unfoldInfo = res.unfoldInfo\n } else if (\n encoding.q1?.length &&\n encoding.q3?.length &&\n encoding.min?.length &&\n encoding.max?.length &&\n encoding.median?.length\n ) {\n const res = unfoldDimensions(dataset, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((datum) => {\n datum[UpperWhisker] = datum[encoding.max![0]]\n datum[LowerWhisker] = datum[encoding.min![0]]\n datum[Q1MeasureValue] = datum[encoding.q1![0]]\n datum[Q3MeasureValue] = datum[encoding.q3![0]]\n datum[MedianMeasureId] = datum[encoding.median![0]]\n })\n\n newDatasets = res.dataset\n foldInfo = {}\n unfoldInfo = res.unfoldInfo\n }\n\n const reshapeInfo = {\n id: groupId,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newDatasets)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithBoxplotEncoding","advancedVSeed","context","result","vseed","dataset","chartType","encoding","config","measures","dimensions","uniqDims","uniqueBy","item","chartConfig","whiskers","measureGroups","measure","rowColumnFields","dim","datasets","datasetReshapeInfo","measureGroup","index","subMeasures","groupId","newDatasets","foldInfo","unfoldInfo","validEncodingIds","id","field","boxPlotDataList","f","m","boxPlotData","boxplot","Q1MeasureValue","Q3MeasureValue","LowerWhisker","UpperWhisker","MedianMeasureId","OutliersMeasureId","datum","FoldMeasureId","FoldMeasureName","res","unfoldDimensions","Separator","d","reshapeInfo"],"mappings":";;;AAwBO,MAAMA,kCAAgD,CAACC,eAAeC;IAC3E,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAE,GAAGF;IAC/B,MAAM,EAAEG,WAAW,CAAC,CAAC,EAAEC,MAAM,EAAE,GAAGP;IAClC,MAAMQ,WAAWR,cAAc,eAAe,IAAIA,cAAc,QAAQ,IAAI,EAAE;IAC9E,MAAMS,aAAaT,cAAc,iBAAiB,IAAIA,cAAc,UAAU,IAAI,EAAE;IACpF,MAAMU,WAAWC,SAASF,YAAY,CAACG,OAAoBA,KAAK,EAAE;IAClE,MAAMC,cAAcN,QAAQ,CAACF,UAAuB;IACpD,MAAMS,WAAWD,aAAa;IA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AC1B;IAEA,OAAO;QACL,GAAG/C,MAAM;QACT,SAASiB;QACT,oBAAoBC;IACtB;AACF"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.ts"],"sourcesContent":["import { boxplot } from '@visactor/vdataset'\nimport { uniqueBy } from 'remeda'\nimport {\n FoldMeasureId,\n FoldMeasureName,\n LowerWhisker,\n MedianMeasureId,\n OutliersMeasureId,\n Q1MeasureValue,\n Q3MeasureValue,\n Separator,\n unfoldDimensions,\n UpperWhisker,\n} from 'src/dataReshape'\nimport type {\n AdvancedPipe,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Dimension,\n Encoding,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithBoxplotEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset, chartType } = vseed as ColumnParallel\n const { encoding = {}, config } = advancedVSeed\n const measures = advancedVSeed.reshapeMeasures ?? advancedVSeed.measures ?? []\n const dimensions = advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? []\n const uniqDims = uniqueBy(dimensions, (item: Dimension) => item.id)\n const chartConfig = config?.[chartType as 'boxPlot']\n const whiskers = chartConfig?.whiskers\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 rowColumnFields = uniqueBy(\n dimensions.filter((dim: Dimension) => dim.encoding === 'row' || dim.encoding === 'column'),\n (item: Dimension) => item.id,\n )\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const subMeasures = measureGroup.children\n if (!subMeasures) {\n return\n }\n const groupId = measureGroup.id\n let newDatasets: any[] = []\n let foldInfo: any = {}\n let unfoldInfo: any = {}\n const validEncodingIds = (encoding.value || []).filter((id) => subMeasures.find((field) => field.id === id))\n\n if (validEncodingIds.length) {\n const boxPlotDataList: Dataset = []\n validEncodingIds.forEach((f) => {\n const m = subMeasures.find((m) => m.id === f)\n const boxPlotData = boxplot(dataset, {\n field: f,\n groupField: [\n ...(encoding.x ?? []),\n ...(encoding.color ?? []),\n ...rowColumnFields.map((item: Dimension) => item.id),\n ] as string[],\n whiskers,\n outputNames: {\n q1: Q1MeasureValue,\n q3: Q3MeasureValue,\n lowerWhisker: LowerWhisker,\n upperWhisker: UpperWhisker,\n median: MedianMeasureId,\n outliers: OutliersMeasureId,\n },\n }) as Dataset\n\n boxPlotData.forEach((datum) => {\n datum[FoldMeasureId] = f\n datum[FoldMeasureName] = m?.alias ?? f\n })\n\n boxPlotDataList.push(...boxPlotData)\n })\n const res = unfoldDimensions(boxPlotDataList, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((d) => {\n newDatasets.push(d)\n })\n unfoldInfo = res.unfoldInfo\n } else if (\n encoding.q1?.length &&\n encoding.q3?.length &&\n encoding.min?.length &&\n encoding.max?.length &&\n encoding.median?.length\n ) {\n const res = unfoldDimensions(dataset, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((datum) => {\n datum[UpperWhisker] = datum[encoding.max![0]]\n datum[LowerWhisker] = datum[encoding.min![0]]\n datum[Q1MeasureValue] = datum[encoding.q1![0]]\n datum[Q3MeasureValue] = datum[encoding.q3![0]]\n datum[MedianMeasureId] = datum[encoding.median![0]]\n })\n\n newDatasets = res.dataset\n foldInfo = {}\n unfoldInfo = res.unfoldInfo\n }\n\n const reshapeInfo = {\n id: `${groupId}`,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newDatasets)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithBoxplotEncoding","advancedVSeed","context","result","vseed","dataset","chartType","encoding","config","measures","dimensions","uniqDims","uniqueBy","item","chartConfig","whiskers","measureGroups","measure","rowColumnFields","dim","datasets","datasetReshapeInfo","measureGroup","index","subMeasures","groupId","newDatasets","foldInfo","unfoldInfo","validEncodingIds","id","field","boxPlotDataList","f","m","boxPlotData","boxplot","Q1MeasureValue","Q3MeasureValue","LowerWhisker","UpperWhisker","MedianMeasureId","OutliersMeasureId","datum","FoldMeasureId","FoldMeasureName","res","unfoldDimensions","Separator","d","reshapeInfo"],"mappings":";;;AAwBO,MAAMA,kCAAgD,CAACC,eAAeC;IAC3E,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAE,GAAGF;IAC/B,MAAM,EAAEG,WAAW,CAAC,CAAC,EAAEC,MAAM,EAAE,GAAGP;IAClC,MAAMQ,WAAWR,cAAc,eAAe,IAAIA,cAAc,QAAQ,IAAI,EAAE;IAC9E,MAAMS,aAAaT,cAAc,iBAAiB,IAAIA,cAAc,UAAU,IAAI,EAAE;IACpF,MAAMU,WAAWC,SAASF,YAAY,CAACG,OAAoBA,KAAK,EAAE;IAClE,MAAMC,cAAcN,QAAQ,CAACF,UAAuB;IACpD,MAAMS,WAAWD,aAAa;IAE9B,MAAME,gBAAgC,EAAE;IACxC,IAAIP,UACFA,SAAS,OAAO,CAAC,CAACQ;QAChB,IAAIA,QAAQ,QAAQ,IAAIA,QAAQ,QAAQ,CAAC,MAAM,GAAG,GAChDD,cAAc,IAAI,CAACC;IAEvB;IAGF,MAAMC,kBAAkBN,SACtBF,WAAW,MAAM,CAAC,CAACS,MAAmBA,AAAiB,UAAjBA,IAAI,QAAQ,IAAcA,AAAiB,aAAjBA,IAAI,QAAQ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BvB,YAAY,IAAI,CAACuB;YACnB;YACArB,aAAakB,IAAI,UAAU;QAC7B,OAAO,IACLvC,SAAS,EAAE,EAAE,UACbA,SAAS,EAAE,EAAE,UACbA,SAAS,GAAG,EAAE,UACdA,SAAS,GAAG,EAAE,UACdA,SAAS,MAAM,EAAE,QACjB;YACA,MAAMuC,MAAMC,iBAAiB1C,SAASM,UAAUJ,UAAsB;gBACpE,eAAeqC;gBACf,WAAWI;gBACX,eAAe;YACjB;YAEAF,IAAI,OAAO,CAAC,OAAO,CAAC,CAACH;gBACnBA,KAAK,CAACH,aAAa,GAAGG,KAAK,CAACpC,SAAS,GAAI,CAAC,EAAE,CAAC;gBAC7CoC,KAAK,CAACJ,aAAa,GAAGI,KAAK,CAACpC,SAAS,GAAI,CAAC,EAAE,CAAC;gBAC7CoC,KAAK,CAACN,eAAe,GAAGM,KAAK,CAACpC,SAAS,EAAG,CAAC,EAAE,CAAC;gBAC9CoC,KAAK,CAACL,eAAe,GAAGK,KAAK,CAACpC,SAAS,EAAG,CAAC,EAAE,CAAC;gBAC9CoC,KAAK,CAACF,gBAAgB,GAAGE,KAAK,CAACpC,SAAS,MAAO,CAAC,EAAE,CAAC;YACrD;YAEAmB,cAAcoB,IAAI,OAAO;YACzBnB,WAAW,CAAC;YACZC,aAAakB,IAAI,UAAU;QAC7B;QAEA,MAAMI,cAAc;YAClB,IAAI,GAAGzB,SAAS;YAChBF;YACAI;YACAC;QACF;QACAR,SAAS,IAAI,CAACM;QACdL,mBAAmB,IAAI,CAAC6B;IAC1B;IAEA,OAAO;QACL,GAAG/C,MAAM;QACT,SAASiB;QACT,oBAAoBC;IACtB;AACF"}
@@ -29,7 +29,7 @@ const pivotReshapeWithEncoding = (advancedVSeed, context)=>{
29
29
  omitIds: allMeasures.map((item)=>item.id)
30
30
  });
31
31
  const reshapeInfo = {
32
- id: groupId,
32
+ id: `${groupId}`,
33
33
  index,
34
34
  foldInfo,
35
35
  unfoldInfo
@@ -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 { findAllMeasures } from 'src/pipeline/utils'\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 { encoding } = advancedVSeed\n const measures = advancedVSeed.reshapeMeasures ?? advancedVSeed.measures ?? []\n const dimensions = advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? []\n\n const allMeasures = findAllMeasures(measures)\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, vseed),\n omitIds: allMeasures.map((item) => item.id),\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","encoding","measures","dimensions","allMeasures","findAllMeasures","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,QAAQ,EAAE,GAAGL;IACrB,MAAMM,WAAWN,cAAc,eAAe,IAAIA,cAAc,QAAQ,IAAI,EAAE;IAC9E,MAAMO,aAAaP,cAAc,iBAAiB,IAAIA,cAAc,UAAU,IAAI,EAAE;IAEpF,MAAMQ,cAAcC,gBAAgBH;IACpC,MAAMI,gBAAgC,EAAE;IACxC,IAAIJ,UACFA,SAAS,OAAO,CAAC,CAACK;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,MAAMT,WAAWQ,aAAa,QAAQ;QACtC,IAAI,CAACR,UACH;QAEF,MAAMU,UAAUF,aAAa,EAAE;QAC/B,MAAM,EACJ,SAASG,aAAa,EACtBC,QAAQ,EACRC,UAAU,EACX,GAAGC,sBACFhB,SACAiB,SAASd,YAAY,CAACe,OAASA,KAAK,EAAE,GACtCD,SAASf,UAAU,CAACgB,OAASA,KAAK,EAAE,GACpCjB,UACA;YACE,eAAe;YACf,kBAAkB,GAAGkB,mBAAmBP,SAAS;YACjD,gBAAgBQ,kBAAkBxB,eAAgCG;YAClE,SAASK,YAAY,GAAG,CAAC,CAACc,OAASA,KAAK,EAAE;QAC5C;QAGF,MAAMG,cAAc;YAClB,IAAIT;YACJD;YACAG;YACAC;QACF;QACAP,SAAS,IAAI,CAACK;QACdJ,mBAAmB,IAAI,CAACY;IAC1B;IAEA,OAAO;QACL,GAAGvB,MAAM;QACT,SAASU;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 { findAllMeasures } from 'src/pipeline/utils'\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 { encoding } = advancedVSeed\n const measures = advancedVSeed.reshapeMeasures ?? advancedVSeed.measures ?? []\n const dimensions = advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? []\n\n const allMeasures = findAllMeasures(measures)\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, vseed),\n omitIds: allMeasures.map((item) => item.id),\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","encoding","measures","dimensions","allMeasures","findAllMeasures","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,QAAQ,EAAE,GAAGL;IACrB,MAAMM,WAAWN,cAAc,eAAe,IAAIA,cAAc,QAAQ,IAAI,EAAE;IAC9E,MAAMO,aAAaP,cAAc,iBAAiB,IAAIA,cAAc,UAAU,IAAI,EAAE;IAEpF,MAAMQ,cAAcC,gBAAgBH;IACpC,MAAMI,gBAAgC,EAAE;IACxC,IAAIJ,UACFA,SAAS,OAAO,CAAC,CAACK;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,MAAMT,WAAWQ,aAAa,QAAQ;QACtC,IAAI,CAACR,UACH;QAEF,MAAMU,UAAUF,aAAa,EAAE;QAC/B,MAAM,EACJ,SAASG,aAAa,EACtBC,QAAQ,EACRC,UAAU,EACX,GAAGC,sBACFhB,SACAiB,SAASd,YAAY,CAACe,OAASA,KAAK,EAAE,GACtCD,SAASf,UAAU,CAACgB,OAASA,KAAK,EAAE,GACpCjB,UACA;YACE,eAAe;YACf,kBAAkB,GAAGkB,mBAAmBP,SAAS;YACjD,gBAAgBQ,kBAAkBxB,eAAgCG;YAClE,SAASK,YAAY,GAAG,CAAC,CAACc,OAASA,KAAK,EAAE;QAC5C;QAGF,MAAMG,cAAc;YAClB,IAAI,GAAGT,SAAS;YAChBD;YACAG;YACAC;QACF;QACAP,SAAS,IAAI,CAACK;QACdJ,mBAAmB,IAAI,CAACY;IAC1B;IAEA,OAAO;QACL,GAAGvB,MAAM;QACT,SAASU;QACT,oBAAoBC;IACtB;AACF"}
@@ -99,7 +99,7 @@ const pivotReshapeWithHistogramEncoding = (advancedVSeed, context)=>{
99
99
  unfoldInfo = res.unfoldInfo;
100
100
  }
101
101
  const reshapeInfo = {
102
- id: groupId,
102
+ id: `${groupId}`,
103
103
  index,
104
104
  foldInfo,
105
105
  unfoldInfo
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.ts"],"sourcesContent":["import { bin } from '@visactor/vdataset'\nimport { uniqueBy } from 'remeda'\nimport {\n BinCountMeasureId,\n BinEndMeasureId,\n BinPercentageMeasureId,\n BinStartMeasureId,\n dataReshapeByEncoding,\n FoldMeasureId,\n FoldMeasureName,\n FoldMeasureValue,\n Separator,\n unfoldDimensions,\n} from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Datum,\n Dimension,\n Encoding,\n FoldInfo,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithHistogramEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset, chartType } = vseed as ColumnParallel\n const { encoding = {}, config } = advancedVSeed\n const measures = advancedVSeed.reshapeMeasures ?? advancedVSeed.measures ?? []\n const dimensions = advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? []\n const colorMeasureId = getColorMeasureId(advancedVSeed as AdvancedVSeed, vseed)\n const uniqDims = uniqueBy(dimensions, (item: Dimension) => item.id)\n const chartConfig = config?.[chartType as 'histogram']\n const binCount = chartConfig?.binCount\n const binStep = chartConfig?.binStep\n const binValueType = chartConfig?.binValueType\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 const rowColumnFields = uniqueBy(\n dimensions.filter((dim: Dimension) => dim.encoding === 'row' || dim.encoding === 'column'),\n (item: Dimension) => item.id,\n )\n\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const subMeasures = measureGroup.children\n if (!subMeasures) {\n return\n }\n const groupId = measureGroup.id\n\n let newDatasets: any[] = []\n let foldInfo: FoldInfo = {\n foldMap: {},\n measureId: FoldMeasureId,\n measureName: FoldMeasureName,\n measureValue: FoldMeasureValue,\n statistics: {\n max: -Infinity,\n min: Infinity,\n sum: 0,\n count: 0,\n colorMin: Infinity,\n colorMax: -Infinity,\n },\n }\n let unfoldInfo: any = {}\n\n if (encoding.value?.length) {\n const valueField = encoding.value[0]\n const m = subMeasures.find((m) => m.id === valueField)\n const binData = bin(dataset, {\n field: valueField,\n groupField: [...(encoding.x ?? []), ...(encoding.color ?? [])] as string[],\n facetField: rowColumnFields.map((item: Dimension) => item.id),\n bins: binCount,\n step: binStep,\n outputNames: {\n x0: BinStartMeasureId,\n x1: BinEndMeasureId,\n count: BinCountMeasureId,\n percentage: BinPercentageMeasureId,\n },\n }) as Dataset\n\n binData.forEach((datum: Datum) => {\n datum[FoldMeasureId] = valueField\n datum[FoldMeasureName] = m?.alias ?? valueField\n const valueNumber = binValueType === 'percentage' ? +datum[BinPercentageMeasureId] : +datum[BinCountMeasureId]\n datum[FoldMeasureValue] = valueNumber\n datum[valueField] = valueNumber\n\n foldInfo.statistics.min = Math.min(foldInfo.statistics.min, valueNumber)\n foldInfo.statistics.max = Math.max(foldInfo.statistics.max, valueNumber)\n foldInfo.statistics.sum += valueNumber\n foldInfo.statistics.count++\n })\n if (m?.id) {\n foldInfo.foldMap[m?.id] = m?.alias\n }\n\n const res = unfoldDimensions(binData, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((d) => {\n newDatasets.push(d)\n })\n unfoldInfo = res.unfoldInfo\n } else if (encoding.x0?.length && encoding.x1?.length && encoding.y?.length) {\n const res = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item: Dimension) => item.id),\n subMeasures.filter((item) => encoding.y?.includes(item.id)).slice(0, 1),\n encoding as Encoding,\n {\n colorItemAsId: false,\n colorMeasureId,\n },\n )\n\n res.dataset.forEach((datum) => {\n datum[BinStartMeasureId] = datum[encoding.x0![0]]\n datum[BinEndMeasureId] = datum[encoding.x1![0]]\n datum[FoldMeasureId] = datum[encoding.y![0]]\n })\n\n newDatasets = res.dataset\n foldInfo = res.foldInfo\n unfoldInfo = res.unfoldInfo\n }\n\n const reshapeInfo = {\n id: groupId,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newDatasets)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithHistogramEncoding","advancedVSeed","context","result","vseed","dataset","chartType","encoding","config","measures","dimensions","colorMeasureId","getColorMeasureId","uniqDims","uniqueBy","item","chartConfig","binCount","binStep","binValueType","measureGroups","measure","rowColumnFields","dim","datasets","datasetReshapeInfo","measureGroup","index","subMeasures","groupId","newDatasets","foldInfo","FoldMeasureId","FoldMeasureName","FoldMeasureValue","Infinity","unfoldInfo","valueField","m","binData","bin","BinStartMeasureId","BinEndMeasureId","BinCountMeasureId","BinPercentageMeasureId","datum","valueNumber","Math","res","unfoldDimensions","Separator","d","dataReshapeByEncoding","reshapeInfo"],"mappings":";;;;AA4BO,MAAMA,oCAAkD,CAACC,eAAeC;IAC7E,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAE,GAAGF;IAC/B,MAAM,EAAEG,WAAW,CAAC,CAAC,EAAEC,MAAM,EAAE,GAAGP;IAClC,MAAMQ,WAAWR,cAAc,eAAe,IAAIA,cAAc,QAAQ,IAAI,EAAE;IAC9E,MAAMS,aAAaT,cAAc,iBAAiB,IAAIA,cAAc,UAAU,IAAI,EAAE;IACpF,MAAMU,iBAAiBC,kBAAkBX,eAAgCG;IACzE,MAAMS,WAAWC,SAASJ,YAAY,CAACK,OAAoBA,KAAK,EAAE;IAClE,MAAMC,cAAcR,QAAQ,CAACF,UAAyB;IACtD,MAAMW,WAAWD,aAAa;IAC9B,MAAME,UAAUF,aAAa;IAC7B,MAAMG,eAAeH,aAAa;IAElC,MAAMI,gBAAgC,EAAE;IACxC,IAAIX,UACFA,SAAS,OAAO,CAAC,CAACY;QAChB,IAAIA,QAAQ,QAAQ,IAAIA,QAAQ,QAAQ,CAAC,MAAM,GAAG,GAChDD,cAAc,IAAI,CAACC;IAEvB;IAEF,MAAMC,kBAAkBR,SACtBJ,WAAW,MAAM,CAAC,CAACa,MAAmBA,AAAiB,UAAjBA,IAAI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BZ,aAAaY,IAAI,UAAU;QAC7B;QAEA,MAAMK,cAAc;YAClB,IAAIxB;YACJF;YACAI;YACAK;QACF;QACAZ,SAAS,IAAI,CAACM;QACdL,mBAAmB,IAAI,CAAC4B;IAC1B;IAEA,OAAO;QACL,GAAGlD,MAAM;QACT,SAASqB;QACT,oBAAoBC;IACtB;AACF"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.ts"],"sourcesContent":["import { bin } from '@visactor/vdataset'\nimport { uniqueBy } from 'remeda'\nimport {\n BinCountMeasureId,\n BinEndMeasureId,\n BinPercentageMeasureId,\n BinStartMeasureId,\n dataReshapeByEncoding,\n FoldMeasureId,\n FoldMeasureName,\n FoldMeasureValue,\n Separator,\n unfoldDimensions,\n} from 'src/dataReshape'\nimport { getColorMeasureId } from 'src/pipeline/spec/chart/pipes'\nimport type {\n AdvancedPipe,\n AdvancedVSeed,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Datum,\n Dimension,\n Encoding,\n FoldInfo,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithHistogramEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset, chartType } = vseed as ColumnParallel\n const { encoding = {}, config } = advancedVSeed\n const measures = advancedVSeed.reshapeMeasures ?? advancedVSeed.measures ?? []\n const dimensions = advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? []\n const colorMeasureId = getColorMeasureId(advancedVSeed as AdvancedVSeed, vseed)\n const uniqDims = uniqueBy(dimensions, (item: Dimension) => item.id)\n const chartConfig = config?.[chartType as 'histogram']\n const binCount = chartConfig?.binCount\n const binStep = chartConfig?.binStep\n const binValueType = chartConfig?.binValueType\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 const rowColumnFields = uniqueBy(\n dimensions.filter((dim: Dimension) => dim.encoding === 'row' || dim.encoding === 'column'),\n (item: Dimension) => item.id,\n )\n\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const subMeasures = measureGroup.children\n if (!subMeasures) {\n return\n }\n const groupId = measureGroup.id\n\n let newDatasets: any[] = []\n let foldInfo: FoldInfo = {\n foldMap: {},\n measureId: FoldMeasureId,\n measureName: FoldMeasureName,\n measureValue: FoldMeasureValue,\n statistics: {\n max: -Infinity,\n min: Infinity,\n sum: 0,\n count: 0,\n colorMin: Infinity,\n colorMax: -Infinity,\n },\n }\n let unfoldInfo: any = {}\n\n if (encoding.value?.length) {\n const valueField = encoding.value[0]\n const m = subMeasures.find((m) => m.id === valueField)\n const binData = bin(dataset, {\n field: valueField,\n groupField: [...(encoding.x ?? []), ...(encoding.color ?? [])] as string[],\n facetField: rowColumnFields.map((item: Dimension) => item.id),\n bins: binCount,\n step: binStep,\n outputNames: {\n x0: BinStartMeasureId,\n x1: BinEndMeasureId,\n count: BinCountMeasureId,\n percentage: BinPercentageMeasureId,\n },\n }) as Dataset\n\n binData.forEach((datum: Datum) => {\n datum[FoldMeasureId] = valueField\n datum[FoldMeasureName] = m?.alias ?? valueField\n const valueNumber = binValueType === 'percentage' ? +datum[BinPercentageMeasureId] : +datum[BinCountMeasureId]\n datum[FoldMeasureValue] = valueNumber\n datum[valueField] = valueNumber\n\n foldInfo.statistics.min = Math.min(foldInfo.statistics.min, valueNumber)\n foldInfo.statistics.max = Math.max(foldInfo.statistics.max, valueNumber)\n foldInfo.statistics.sum += valueNumber\n foldInfo.statistics.count++\n })\n if (m?.id) {\n foldInfo.foldMap[m?.id] = m?.alias\n }\n\n const res = unfoldDimensions(binData, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((d) => {\n newDatasets.push(d)\n })\n unfoldInfo = res.unfoldInfo\n } else if (encoding.x0?.length && encoding.x1?.length && encoding.y?.length) {\n const res = dataReshapeByEncoding(\n dataset,\n uniqueBy(dimensions, (item: Dimension) => item.id),\n subMeasures.filter((item) => encoding.y?.includes(item.id)).slice(0, 1),\n encoding as Encoding,\n {\n colorItemAsId: false,\n colorMeasureId,\n },\n )\n\n res.dataset.forEach((datum) => {\n datum[BinStartMeasureId] = datum[encoding.x0![0]]\n datum[BinEndMeasureId] = datum[encoding.x1![0]]\n datum[FoldMeasureId] = datum[encoding.y![0]]\n })\n\n newDatasets = res.dataset\n foldInfo = res.foldInfo\n unfoldInfo = res.unfoldInfo\n }\n\n const reshapeInfo = {\n id: `${groupId}`,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newDatasets)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithHistogramEncoding","advancedVSeed","context","result","vseed","dataset","chartType","encoding","config","measures","dimensions","colorMeasureId","getColorMeasureId","uniqDims","uniqueBy","item","chartConfig","binCount","binStep","binValueType","measureGroups","measure","rowColumnFields","dim","datasets","datasetReshapeInfo","measureGroup","index","subMeasures","groupId","newDatasets","foldInfo","FoldMeasureId","FoldMeasureName","FoldMeasureValue","Infinity","unfoldInfo","valueField","m","binData","bin","BinStartMeasureId","BinEndMeasureId","BinCountMeasureId","BinPercentageMeasureId","datum","valueNumber","Math","res","unfoldDimensions","Separator","d","dataReshapeByEncoding","reshapeInfo"],"mappings":";;;;AA4BO,MAAMA,oCAAkD,CAACC,eAAeC;IAC7E,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAE,GAAGF;IAC/B,MAAM,EAAEG,W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OAAO,IAAIzC,SAAS,EAAE,EAAE,UAAUA,SAAS,EAAE,EAAE,UAAUA,SAAS,CAAC,EAAE,QAAQ;YAC3E,MAAMyC,MAAMI,sBACV/C,SACAS,SAASJ,YAAY,CAACK,OAAoBA,KAAK,EAAE,GACjDa,YAAY,MAAM,CAAC,CAACb,OAASR,SAAS,CAAC,EAAE,SAASQ,KAAK,EAAE,GAAG,KAAK,CAAC,GAAG,IACrER,UACA;gBACE,eAAe;gBACfI;YACF;YAGFqC,IAAI,OAAO,CAAC,OAAO,CAAC,CAACH;gBACnBA,KAAK,CAACJ,kBAAkB,GAAGI,KAAK,CAACtC,SAAS,EAAG,CAAC,EAAE,CAAC;gBACjDsC,KAAK,CAACH,gBAAgB,GAAGG,KAAK,CAACtC,SAAS,EAAG,CAAC,EAAE,CAAC;gBAC/CsC,KAAK,CAACb,cAAc,GAAGa,KAAK,CAACtC,SAAS,CAAE,CAAC,EAAE,CAAC;YAC9C;YAEAuB,cAAckB,IAAI,OAAO;YACzBjB,WAAWiB,IAAI,QAAQ;YACvBZ,aAAaY,IAAI,UAAU;QAC7B;QAEA,MAAMK,cAAc;YAClB,IAAI,GAAGxB,SAAS;YAChBF;YACAI;YACAK;QACF;QACAZ,SAAS,IAAI,CAACM;QACdL,mBAAmB,IAAI,CAAC4B;IAC1B;IAEA,OAAO;QACL,GAAGlD,MAAM;QACT,SAASqB;QACT,oBAAoBC;IACtB;AACF"}
@@ -1,5 +1,4 @@
1
- import { annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, barStyle, color, colorAdapter, colorBarStyleFill, colorLegend, datasetBoxplot, datasetPivot, dimensionLinkage, initBoxplot, initPivot, label, linearColor, pivotAdapter, pivotAxisStyle, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotRowDimensions, pivotTitle, progressive, stackCornerRadius, tooltipBoxplot, verticalCrosshairRect, xBand, yLinear } from "../pipes/index.js";
2
- import { boxLegend } from "../pipes/legend/boxLegend.js";
1
+ import { annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, boxPlotStyle, color, colorAdapter, colorBoxPlotStyleFill, colorLegend, datasetBoxplot, datasetPivot, dimensionLinkage, discreteLegend, initBoxplot, initPivot, label, linearColor, outlierStyle, pivotAdapter, pivotAxisStyle, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotRowDimensions, pivotTitle, progressive, stackCornerRadius, tooltipBoxplot, verticalCrosshairRect, xBand, yLinear } from "../pipes/index.js";
3
2
  const boxplot = [
4
3
  initBoxplot,
5
4
  stackCornerRadius,
@@ -11,9 +10,10 @@ const boxplot = [
11
10
  yLinear,
12
11
  label,
13
12
  tooltipBoxplot,
14
- colorAdapter(boxLegend, colorLegend),
13
+ colorAdapter(discreteLegend, colorLegend),
15
14
  verticalCrosshairRect,
16
- colorBarStyleFill(barStyle),
15
+ colorBoxPlotStyleFill(boxPlotStyle),
16
+ outlierStyle,
17
17
  annotationPoint,
18
18
  annotationVerticalLine,
19
19
  annotationHorizontalLine,
@@ -34,7 +34,8 @@ const pivotBoxplot = [
34
34
  pivotAxisStyle(yLinear),
35
35
  label,
36
36
  tooltipBoxplot,
37
- colorBarStyleFill(barStyle),
37
+ colorBoxPlotStyleFill(boxPlotStyle),
38
+ outlierStyle,
38
39
  verticalCrosshairRect,
39
40
  annotationPoint,
40
41
  annotationVerticalLine,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/boxplot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/boxplot.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n backgroundColor,\n label,\n tooltipBoxplot,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n stackCornerRadius,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorBarStyleFill,\n pivotColorLegend,\n initBoxplot,\n xBand,\n yLinear,\n verticalCrosshairRect,\n datasetBoxplot,\n pivotAxisStyle,\n pivotTitle,\n dimensionLinkage,\n} from '../pipes'\nimport { boxLegend } from '../pipes/legend/boxLegend'\n\nconst boxplot: VChartSpecPipeline = [\n initBoxplot,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetBoxplot,\n progressive,\n xBand,\n yLinear,\n label,\n tooltipBoxplot,\n colorAdapter(boxLegend, colorLegend),\n verticalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotBoxplot: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n datasetPivot,\n pivotIndicators([\n initBoxplot,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetBoxplot,\n progressive,\n xBand,\n pivotAxisStyle(yLinear),\n label,\n tooltipBoxplot,\n colorBarStyleFill(barStyle),\n verticalCrosshairRect,\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 boxplotSpecPipeline = [pivotAdapter(boxplot, pivotBoxplot)]\n"],"names":["boxplot","initBoxplot","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetBoxplot","progressive","xBand","yLinear","label","tooltipBoxplot","boxLegend","colorLegend","verticalCrosshairRect","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotBoxplot","initPivot","pivotGridStyle","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","boxplotSpecPipeline","pivotAdapter"],"mappings":";;AAqCA,MAAMA,UAA8B;IAClCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,WAAWC;IACxBC;IACAC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAAuC;IAC3CC;IACAC;IACAC;IACAC,gBAAgB;QACdzB;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAkB,eAAejB;QACfC;QACAC;QACAI,kBAAkBC;QAClBF;QACAG;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACAC;IACA3B,aAAa4B,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,sBAAsB;IAACC,aAAanC,SAASsB;CAAc"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/boxplot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/boxplot.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n backgroundColor,\n label,\n tooltipBoxplot,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n stackCornerRadius,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n pivotColorLegend,\n initBoxplot,\n xBand,\n yLinear,\n verticalCrosshairRect,\n datasetBoxplot,\n pivotAxisStyle,\n pivotTitle,\n dimensionLinkage,\n boxPlotStyle,\n colorBoxPlotStyleFill,\n outlierStyle,\n discreteLegend,\n} from '../pipes'\n\nconst boxplot: VChartSpecPipeline = [\n initBoxplot,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetBoxplot,\n progressive,\n xBand,\n yLinear,\n label,\n tooltipBoxplot,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairRect,\n colorBoxPlotStyleFill(boxPlotStyle),\n outlierStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotBoxplot: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n datasetPivot,\n pivotIndicators([\n initBoxplot,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetBoxplot,\n progressive,\n xBand,\n pivotAxisStyle(yLinear),\n label,\n tooltipBoxplot,\n colorBoxPlotStyleFill(boxPlotStyle),\n outlierStyle,\n verticalCrosshairRect,\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 boxplotSpecPipeline = [pivotAdapter(boxplot, pivotBoxplot)]\n"],"names":["boxplot","initBoxplot","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetBoxplot","progressive","xBand","yLinear","label","tooltipBoxplot","discreteLegend","colorLegend","verticalCrosshairRect","colorBoxPlotStyleFill","boxPlotStyle","outlierStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotBoxplot","initPivot","pivotGridStyle","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","boxplotSpecPipeline","pivotAdapter"],"mappings":";AAsCA,MAAMA,UAA8B;IAClCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,gBAAgBC;IAC7BC;IACAC,sBAAsBC;IACtBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAAuC;IAC3CC;IACAC;IACAC;IACAC,gBAAgB;QACd1B;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAmB,eAAelB;QACfC;QACAC;QACAI,sBAAsBC;QACtBC;QACAH;QACAI;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACAC;IACA5B,aAAa6B,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,sBAAsB;IAACC,aAAapC,SAASuB;CAAc"}
@@ -1,4 +1,4 @@
1
- import { annotationAreaBand, annotationHorizontalLine, annotationPointOfDualAxis, annotationVerticalLine, areaStyle, backgroundColor, barGapInGroup, barMaxWidth, barStyle, color, colorAdapter, colorAreaStyleFill, colorBarStyleFill, colorLegend, colorLineStyleFill, colorPointStyleFill, datasetPivot, datasetPrimary, datasetSecondary, dimensionLinkage, discreteLegend, dualChartTypePrimary, dualChartTypeSecondary, initDualAxisPrimary, initDualAxisSecondary, initPivot, labelPrimary, labelSecondary, lineStyle, linearColor, linearColorForDualAxis, pivotAdapter, pivotAxisStyle, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, pointStateDimensionHover, pointStyle, progressive, series, seriesDualAxis, stackCornerRadius, tooltipPrimary, tooltipSecondary, verticalCrosshairRect, xBand, yLinearPrimary, yLinearSecondary } from "../pipes/index.js";
1
+ import { annotationAreaBand, annotationHorizontalLine, annotationPointOfDualAxis, annotationVerticalLine, areaStyle, areaStyleFilter, backgroundColor, barGapInGroup, barMaxWidth, barStyle, barStyleFilter, color, colorAdapter, colorAreaStyleFill, colorBarStyleFill, colorLegend, colorLineStyleFill, colorPointStyleFill, datasetPivot, datasetPrimary, datasetSecondary, dimensionLinkage, discreteLegend, dualChartTypePrimary, dualChartTypeSecondary, initDualAxisPrimary, initDualAxisSecondary, initPivot, labelPrimary, labelSecondary, lineStyle, lineStyleFilter, linearColor, linearColorForDualAxis, pivotAdapter, pivotAxisStyle, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pivotTitle, pointStateDimensionHover, pointStyle, pointStyleFilter, progressive, series, seriesDualAxis, stackCornerRadius, tooltipDualAxis, tooltipPrimary, tooltipSecondary, verticalCrosshairRect, xBand, yLinearPrimary, yLinearSecondary } from "../pipes/index.js";
2
2
  const dualAxis = [
3
3
  seriesDualAxis([
4
4
  initDualAxisPrimary,
@@ -10,11 +10,11 @@ const dualAxis = [
10
10
  barMaxWidth,
11
11
  barGapInGroup,
12
12
  stackCornerRadius,
13
- colorBarStyleFill(barStyle),
14
- colorPointStyleFill(pointStyle),
15
- pointStateDimensionHover,
16
- colorLineStyleFill(lineStyle),
17
- colorAreaStyleFill(areaStyle)
13
+ barStyleFilter(colorBarStyleFill(barStyle)),
14
+ pointStyleFilter(colorPointStyleFill(pointStyle)),
15
+ pointStyleFilter(pointStateDimensionHover),
16
+ lineStyleFilter(colorLineStyleFill(lineStyle)),
17
+ areaStyleFilter(colorAreaStyleFill(areaStyle))
18
18
  ], [
19
19
  initDualAxisSecondary,
20
20
  dualChartTypeSecondary,
@@ -25,11 +25,11 @@ const dualAxis = [
25
25
  barMaxWidth,
26
26
  barGapInGroup,
27
27
  stackCornerRadius,
28
- colorBarStyleFill(barStyle),
29
- colorPointStyleFill(pointStyle),
30
- pointStateDimensionHover,
31
- colorLineStyleFill(lineStyle),
32
- colorAreaStyleFill(areaStyle)
28
+ barStyleFilter(colorBarStyleFill(barStyle)),
29
+ pointStyleFilter(colorPointStyleFill(pointStyle)),
30
+ pointStyleFilter(pointStateDimensionHover),
31
+ lineStyleFilter(colorLineStyleFill(lineStyle)),
32
+ areaStyleFilter(colorAreaStyleFill(areaStyle))
33
33
  ]),
34
34
  xBand,
35
35
  yLinearPrimary,
@@ -41,7 +41,8 @@ const dualAxis = [
41
41
  annotationPointOfDualAxis,
42
42
  annotationVerticalLine,
43
43
  annotationHorizontalLine,
44
- annotationAreaBand
44
+ annotationAreaBand,
45
+ tooltipDualAxis
45
46
  ];
46
47
  const pivotDualAxis = [
47
48
  initPivot,
@@ -89,7 +90,8 @@ const pivotDualAxis = [
89
90
  annotationPointOfDualAxis,
90
91
  annotationVerticalLine,
91
92
  annotationHorizontalLine,
92
- annotationAreaBand
93
+ annotationAreaBand,
94
+ tooltipDualAxis
93
95
  ]),
94
96
  pivotRowDimensions,
95
97
  pivotColumnDimensions,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/dualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/dualAxis.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n xBand,\n backgroundColor,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationVerticalLine,\n annotationHorizontalLine,\n pointStyle,\n lineStyle,\n pointStateDimensionHover,\n progressive,\n datasetPrimary,\n datasetSecondary,\n areaStyle,\n barStyle,\n verticalCrosshairRect,\n yLinearSecondary,\n initDualAxisPrimary,\n initDualAxisSecondary,\n labelPrimary,\n labelSecondary,\n tooltipPrimary,\n tooltipSecondary,\n yLinearPrimary,\n dualChartTypePrimary,\n dualChartTypeSecondary,\n seriesDualAxis,\n series,\n colorBarStyleFill,\n colorPointStyleFill,\n colorLineStyleFill,\n colorAreaStyleFill,\n linearColor,\n colorAdapter,\n colorLegend,\n pivotColorLegend,\n linearColorForDualAxis,\n annotationAreaBand,\n barMaxWidth,\n barGapInGroup,\n stackCornerRadius,\n pivotTitle,\n pivotAxisStyle,\n dimensionLinkage,\n annotationPointOfDualAxis,\n} from '../pipes'\n\nconst dualAxis: VChartSpecPipeline = [\n seriesDualAxis(\n [\n initDualAxisPrimary,\n dualChartTypePrimary,\n datasetPrimary,\n labelPrimary,\n tooltipPrimary,\n progressive,\n\n barMaxWidth,\n barGapInGroup,\n stackCornerRadius,\n\n colorBarStyleFill(barStyle),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n ],\n [\n initDualAxisSecondary,\n dualChartTypeSecondary,\n datasetSecondary,\n labelSecondary,\n tooltipSecondary,\n progressive,\n\n barMaxWidth,\n barGapInGroup,\n stackCornerRadius,\n\n colorBarStyleFill(barStyle),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n ],\n ),\n xBand,\n yLinearPrimary,\n yLinearSecondary,\n\n colorAdapter(color, linearColorForDualAxis),\n colorAdapter(discreteLegend, colorLegend),\n\n backgroundColor,\n\n verticalCrosshairRect,\n annotationPointOfDualAxis,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotDualAxis: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n series(\n [\n initDualAxisPrimary,\n dualChartTypePrimary,\n datasetPrimary,\n labelPrimary,\n tooltipPrimary,\n progressive,\n\n stackCornerRadius,\n barMaxWidth,\n barGapInGroup,\n\n colorBarStyleFill(barStyle),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n ],\n [\n initDualAxisSecondary,\n dualChartTypeSecondary,\n datasetSecondary,\n labelSecondary,\n tooltipSecondary,\n progressive,\n\n stackCornerRadius,\n barMaxWidth,\n barGapInGroup,\n\n colorBarStyleFill(barStyle),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n ],\n ),\n xBand,\n yLinearPrimary,\n pivotAxisStyle(yLinearSecondary),\n colorAdapter(color, linearColor),\n backgroundColor,\n verticalCrosshairRect,\n annotationPointOfDualAxis,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const dualAxisSpecPipeline = [pivotAdapter(dualAxis, pivotDualAxis)]\n"],"names":["dualAxis","seriesDualAxis","initDualAxisPrimary","dualChartTypePrimary","datasetPrimary","labelPrimary","tooltipPrimary","progressive","barMaxWidth","barGapInGroup","stackCornerRadius","colorBarStyleFill","barStyle","colorPointStyleFill","pointStyle","pointStateDimensionHover","colorLineStyleFill","lineStyle","colorAreaStyleFill","areaStyle","initDualAxisSecondary","dualChartTypeSecondary","datasetSecondary","labelSecondary","tooltipSecondary","xBand","yLinearPrimary","yLinearSecondary","colorAdapter","color","linearColorForDualAxis","discreteLegend","colorLegend","backgroundColor","verticalCrosshairRect","annotationPointOfDualAxis","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotDualAxis","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","series","pivotAxisStyle","linearColor","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","dualAxisSpecPipeline","pivotAdapter"],"mappings":";AAyDA,MAAMA,WAA+B;IACnCC,eACE;QACEC;QACAC;QACAC;QACAC;QACAC;QACAC;QAEAC;QACAC;QACAC;QAEAC,kBAAkBC;QAClBC,oBAAoBC;QACpBC;QACAC,mBAAmBC;QACnBC,mBAAmBC;KACpB,EACD;QACEC;QACAC;QACAC;QACAC;QACAC;QACAjB;QAEAC;QACAC;QACAC;QAEAC,kBAAkBC;QAClBC,oBAAoBC;QACpBC;QACAC,mBAAmBC;QACnBC,mBAAmBC;KACpB;IAEHM;IACAC;IACAC;IAEAC,aAAaC,OAAOC;IACpBF,aAAaG,gBAAgBC;IAE7BC;IAEAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,gBAAwC;IAC5CC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdC,OACE;YACE3C;YACAC;YACAC;YACAC;YACAC;YACAC;YAEAG;YACAF;YACAC;YAEAE,kBAAkBC;YAClBC,oBAAoBC;YACpBC;YACAC,mBAAmBC;YACnBC,mBAAmBC;SACpB,EACD;YACEC;YACAC;YACAC;YACAC;YACAC;YACAjB;YAEAG;YACAF;YACAC;YAEAE,kBAAkBC;YAClBC,oBAAoBC;YACpBC;YACAC,mBAAmBC;YACnBC,mBAAmBC;SACpB;QAEHM;QACAC;QACAoB,eAAenB;QACfC,aAAaC,OAAOkB;QACpBd;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDU;IACAC;IACAC;IACAtB,aAAauB,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,uBAAuB;IAACC,aAAavD,UAAUuC;CAAe"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/dualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/dualAxis.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n xBand,\n backgroundColor,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationVerticalLine,\n annotationHorizontalLine,\n pointStyle,\n lineStyle,\n pointStateDimensionHover,\n progressive,\n datasetPrimary,\n datasetSecondary,\n areaStyle,\n barStyle,\n verticalCrosshairRect,\n yLinearSecondary,\n initDualAxisPrimary,\n initDualAxisSecondary,\n labelPrimary,\n labelSecondary,\n tooltipPrimary,\n tooltipSecondary,\n yLinearPrimary,\n dualChartTypePrimary,\n dualChartTypeSecondary,\n seriesDualAxis,\n series,\n colorBarStyleFill,\n colorPointStyleFill,\n colorLineStyleFill,\n colorAreaStyleFill,\n linearColor,\n colorAdapter,\n colorLegend,\n pivotColorLegend,\n linearColorForDualAxis,\n annotationAreaBand,\n barMaxWidth,\n barGapInGroup,\n stackCornerRadius,\n pivotTitle,\n pivotAxisStyle,\n dimensionLinkage,\n annotationPointOfDualAxis,\n barStyleFilter,\n pointStyleFilter,\n lineStyleFilter,\n areaStyleFilter,\n tooltipDualAxis,\n} from '../pipes'\n\nconst dualAxis: VChartSpecPipeline = [\n seriesDualAxis(\n [\n initDualAxisPrimary,\n dualChartTypePrimary,\n datasetPrimary,\n labelPrimary,\n tooltipPrimary,\n progressive,\n\n barMaxWidth,\n barGapInGroup,\n stackCornerRadius,\n\n barStyleFilter(colorBarStyleFill(barStyle)),\n pointStyleFilter(colorPointStyleFill(pointStyle)),\n pointStyleFilter(pointStateDimensionHover),\n lineStyleFilter(colorLineStyleFill(lineStyle)),\n areaStyleFilter(colorAreaStyleFill(areaStyle)),\n ],\n [\n initDualAxisSecondary,\n dualChartTypeSecondary,\n datasetSecondary,\n labelSecondary,\n tooltipSecondary,\n progressive,\n\n barMaxWidth,\n barGapInGroup,\n stackCornerRadius,\n\n barStyleFilter(colorBarStyleFill(barStyle)),\n pointStyleFilter(colorPointStyleFill(pointStyle)),\n pointStyleFilter(pointStateDimensionHover),\n lineStyleFilter(colorLineStyleFill(lineStyle)),\n areaStyleFilter(colorAreaStyleFill(areaStyle)),\n ],\n ),\n xBand,\n yLinearPrimary,\n yLinearSecondary,\n\n colorAdapter(color, linearColorForDualAxis),\n colorAdapter(discreteLegend, colorLegend),\n\n backgroundColor,\n\n verticalCrosshairRect,\n annotationPointOfDualAxis,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n\n tooltipDualAxis,\n]\n\nconst pivotDualAxis: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n series(\n [\n initDualAxisPrimary,\n dualChartTypePrimary,\n datasetPrimary,\n labelPrimary,\n tooltipPrimary,\n progressive,\n\n stackCornerRadius,\n barMaxWidth,\n barGapInGroup,\n\n colorBarStyleFill(barStyle),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n ],\n [\n initDualAxisSecondary,\n dualChartTypeSecondary,\n datasetSecondary,\n labelSecondary,\n tooltipSecondary,\n progressive,\n\n stackCornerRadius,\n barMaxWidth,\n barGapInGroup,\n\n colorBarStyleFill(barStyle),\n colorPointStyleFill(pointStyle),\n pointStateDimensionHover,\n colorLineStyleFill(lineStyle),\n colorAreaStyleFill(areaStyle),\n ],\n ),\n xBand,\n yLinearPrimary,\n pivotAxisStyle(yLinearSecondary),\n colorAdapter(color, linearColor),\n backgroundColor,\n verticalCrosshairRect,\n annotationPointOfDualAxis,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n\n tooltipDualAxis,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const dualAxisSpecPipeline = [pivotAdapter(dualAxis, pivotDualAxis)]\n"],"names":["dualAxis","seriesDualAxis","initDualAxisPrimary","dualChartTypePrimary","datasetPrimary","labelPrimary","tooltipPrimary","progressive","barMaxWidth","barGapInGroup","stackCornerRadius","barStyleFilter","colorBarStyleFill","barStyle","pointStyleFilter","colorPointStyleFill","pointStyle","pointStateDimensionHover","lineStyleFilter","colorLineStyleFill","lineStyle","areaStyleFilter","colorAreaStyleFill","areaStyle","initDualAxisSecondary","dualChartTypeSecondary","datasetSecondary","labelSecondary","tooltipSecondary","xBand","yLinearPrimary","yLinearSecondary","colorAdapter","color","linearColorForDualAxis","discreteLegend","colorLegend","backgroundColor","verticalCrosshairRect","annotationPointOfDualAxis","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","tooltipDualAxis","pivotDualAxis","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","series","pivotAxisStyle","linearColor","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","dualAxisSpecPipeline","pivotAdapter"],"mappings":";AA8DA,MAAMA,WAA+B;IACnCC,eACE;QACEC;QACAC;QACAC;QACAC;QACAC;QACAC;QAEAC;QACAC;QACAC;QAEAC,eAAeC,kBAAkBC;QACjCC,iBAAiBC,oBAAoBC;QACrCF,iBAAiBG;QACjBC,gBAAgBC,mBAAmBC;QACnCC,gBAAgBC,mBAAmBC;KACpC,EACD;QACEC;QACAC;QACAC;QACAC;QACAC;QACArB;QAEAC;QACAC;QACAC;QAEAC,eAAeC,kBAAkBC;QACjCC,iBAAiBC,oBAAoBC;QACrCF,iBAAiBG;QACjBC,gBAAgBC,mBAAmBC;QACnCC,gBAAgBC,mBAAmBC;KACpC;IAEHM;IACAC;IACAC;IAEAC,aAAaC,OAAOC;IACpBF,aAAaG,gBAAgBC;IAE7BC;IAEAC;IACAC;IACAC;IACAC;IACAC;IAEAC;CACD;AAED,MAAMC,gBAAwC;IAC5CC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdC,OACE;YACEhD;YACAC;YACAC;YACAC;YACAC;YACAC;YAEAG;YACAF;YACAC;YAEAG,kBAAkBC;YAClBE,oBAAoBC;YACpBC;YACAE,mBAAmBC;YACnBE,mBAAmBC;SACpB,EACD;YACEC;YACAC;YACAC;YACAC;YACAC;YACArB;YAEAG;YACAF;YACAC;YAEAG,kBAAkBC;YAClBE,oBAAoBC;YACpBC;YACAE,mBAAmBC;YACnBE,mBAAmBC;SACpB;QAEHM;QACAC;QACAqB,eAAepB;QACfC,aAAaC,OAAOmB;QACpBf;QACAC;QACAC;QACAC;QACAC;QACAC;QAEAC;KACD;IACDU;IACAC;IACAC;IACAvB,aAAawB,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,uBAAuB;IAACC,aAAa5D,UAAU4C;CAAe"}
@@ -49,7 +49,9 @@ const pivotScatter = [
49
49
  annotationHorizontalLine,
50
50
  annotationArea,
51
51
  linearRegressionLine,
52
- lowessRegressionLine
52
+ lowessRegressionLine,
53
+ polynomialRegressionLine,
54
+ logisticRegressionLine
53
55
  ]),
54
56
  pivotRowDimensions,
55
57
  pivotColumnDimensions,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/scatter.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n yLinear,\n backgroundColor,\n tooltipScatter,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n verticalCrosshairLine,\n xLinear,\n horizontalCrosshairLine,\n pointStateHover,\n initScatter,\n progressive,\n datasetScatter,\n linearColor,\n colorAdapter,\n colorPointStyleFill,\n colorLegend,\n pivotColorLegend,\n labelScatter,\n scatterSize,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n pivotAxisStyle,\n pivotTitle,\n dimensionLinkage,\n} from '../pipes'\n\nconst scatter: VChartSpecPipeline = [\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n]\n\nconst pivotScatter: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n pivotAxisStyle(yLinear),\n scatterSize,\n labelScatter,\n tooltipScatter,\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const scatterSpecPipeline = [pivotAdapter(scatter, pivotScatter)]\n"],"names":["scatter","initScatter","colorAdapter","color","linearColor","backgroundColor","datasetScatter","progressive","xLinear","yLinear","scatterSize","labelScatter","tooltipScatter","discreteLegend","colorLegend","verticalCrosshairLine","horizontalCrosshairLine","colorPointStyleFill","pointStyle","pointStateHover","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","linearRegressionLine","lowessRegressionLine","polynomialRegressionLine","logisticRegressionLine","pivotScatter","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","scatterSpecPipeline","pivotAdapter"],"mappings":";AA4CA,MAAMA,UAA8B;IAClCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAV,aAAaW,gBAAgBC;IAC7BC;IACAC;IACAC,oBAAoBC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAAuC;IAC3CC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdhC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACA0B,eAAezB;QACfC;QACAC;QACAC;QACAG;QACAC;QACAC,oBAAoBC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDU;IACAC;IACAC;IACAnC,aAAaoC,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,sBAAsB;IAACC,aAAa1C,SAAS4B;CAAc"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/scatter.ts"],"sourcesContent":["import type { PivotChartSpecPipeline, VChartSpecPipeline } from 'src/types'\nimport {\n yLinear,\n backgroundColor,\n tooltipScatter,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n verticalCrosshairLine,\n xLinear,\n horizontalCrosshairLine,\n pointStateHover,\n initScatter,\n progressive,\n datasetScatter,\n linearColor,\n colorAdapter,\n colorPointStyleFill,\n colorLegend,\n pivotColorLegend,\n labelScatter,\n scatterSize,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n pivotAxisStyle,\n pivotTitle,\n dimensionLinkage,\n} from '../pipes'\n\nconst scatter: VChartSpecPipeline = [\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n]\n\nconst pivotScatter: PivotChartSpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n pivotAxisStyle(yLinear),\n scatterSize,\n labelScatter,\n tooltipScatter,\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n pivotTitle,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n dimensionLinkage,\n]\n\nexport const scatterSpecPipeline = [pivotAdapter(scatter, pivotScatter)]\n"],"names":["scatter","initScatter","colorAdapter","color","linearColor","backgroundColor","datasetScatter","progressive","xLinear","yLinear","scatterSize","labelScatter","tooltipScatter","discreteLegend","colorLegend","verticalCrosshairLine","horizontalCrosshairLine","colorPointStyleFill","pointStyle","pointStateHover","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","linearRegressionLine","lowessRegressionLine","polynomialRegressionLine","logisticRegressionLine","pivotScatter","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotAxisStyle","pivotRowDimensions","pivotColumnDimensions","pivotTitle","pivotDiscreteLegend","pivotColorLegend","dimensionLinkage","scatterSpecPipeline","pivotAdapter"],"mappings":";AA4CA,MAAMA,UAA8B;IAClCC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAV,aAAaW,gBAAgBC;IAC7BC;IACAC;IACAC,oBAAoBC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAAuC;IAC3CC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdhC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACA0B,eAAezB;QACfC;QACAC;QACAC;QACAG;QACAC;QACAC,oBAAoBC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDQ;IACAC;IACAC;IACAnC,aAAaoC,qBAAqBC;IAClCC;CACD;AAEM,MAAMC,sBAAsB;IAACC,aAAa1C,SAAS4B;CAAc"}
@@ -0,0 +1,2 @@
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const colorBoxPlotStyleFill: (stylePipe: VChartSpecPipe) => VChartSpecPipe;
@@ -0,0 +1,17 @@
1
+ import { isLinearColor } from "./colorAdapter.js";
2
+ const colorBoxPlotStyleFill = (stylePipe)=>(spec, context)=>{
3
+ const result = stylePipe(spec, context);
4
+ const { advancedVSeed, vseed } = context;
5
+ const { datasetReshapeInfo } = advancedVSeed;
6
+ const { unfoldInfo } = datasetReshapeInfo[0];
7
+ if (isLinearColor(advancedVSeed, vseed)) {
8
+ if (result?.boxPlot?.style) result.boxPlot.style.fill = {
9
+ field: unfoldInfo.encodingColor,
10
+ scale: 'color'
11
+ };
12
+ }
13
+ return result;
14
+ };
15
+ export { colorBoxPlotStyleFill };
16
+
17
+ //# sourceMappingURL=colorBoxPlotStyleFill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.ts"],"sourcesContent":["import type { IBoxPlotChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorBoxPlotStyleFill = (stylePipe: VChartSpecPipe): VChartSpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IBoxPlotChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.boxPlot?.style) {\n result.boxPlot.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorBoxPlotStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,wBAAwB,CAACC,YAC7B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,SAAS,OACnBA,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG;gBAC1B,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
@@ -10,3 +10,4 @@ export { colorCellStyleFill } from './colorCellStyleFill';
10
10
  export { colorFunnelStyleFill } from './colorFunnelStyleFill';
11
11
  export { colorPieStyleFill } from './colorPieStyleFill';
12
12
  export { colorRoseStyleFill } from './colorRoseStyleFill';
13
+ export { colorBoxPlotStyleFill } from './colorBoxPlotStyleFill';
@@ -10,4 +10,5 @@ import { colorCellStyleFill } from "./colorCellStyleFill.js";
10
10
  import { colorFunnelStyleFill } from "./colorFunnelStyleFill.js";
11
11
  import { colorPieStyleFill } from "./colorPieStyleFill.js";
12
12
  import { colorRoseStyleFill } from "./colorRoseStyleFill.js";
13
- export { color, colorAdapter, colorAreaStyleFill, colorBarStyleFill, colorCellStyleFill, colorFunnelStyleFill, colorLineStyleFill, colorPieStyleFill, colorPointStyleFill, colorRoseStyleFill, getColorMeasureId, isLinearColor, linearColor, linearColorForDualAxis };
13
+ import { colorBoxPlotStyleFill } from "./colorBoxPlotStyleFill.js";
14
+ export { color, colorAdapter, colorAreaStyleFill, colorBarStyleFill, colorBoxPlotStyleFill, colorCellStyleFill, colorFunnelStyleFill, colorLineStyleFill, colorPieStyleFill, colorPointStyleFill, colorRoseStyleFill, getColorMeasureId, isLinearColor, linearColor, linearColorForDualAxis };
@@ -19,7 +19,7 @@ const horizontalCrosshairRect = (spec, context)=>{
19
19
  type: 'rect',
20
20
  style: {
21
21
  lineWidth: 0,
22
- opacity: 0.2,
22
+ opacity: 0.26,
23
23
  fill: rectColor
24
24
  }
25
25
  },
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.ts"],"sourcesContent":["import type { ICartesianCrosshairSpec, ILineChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const horizontalCrosshairRect: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n\n const config = advancedVSeed.config?.[chartType as 'column']?.crosshairRect\n if (!config) {\n return result\n }\n\n if (!result.crosshair) {\n result.crosshair = {}\n }\n\n const visible = config.visible || true\n const rectColor = config.rectColor || undefined\n const labelColor = config.labelColor || undefined\n const labelVisible = config.labelVisible || false\n const labelBackgroundColor = config.labelBackgroundColor || undefined\n\n const crosshair = result.crosshair as ICartesianCrosshairSpec\n crosshair.yField = {\n visible,\n line: {\n type: 'rect',\n style: {\n lineWidth: 0,\n opacity: 0.2,\n fill: rectColor,\n },\n },\n label: {\n visible: labelVisible,\n labelBackground: {\n visible: labelVisible,\n style: {\n fill: labelBackgroundColor,\n },\n },\n style: {\n fill: labelColor,\n },\n },\n }\n const yAxisConfig = result.axes?.find((v) => v.orient === 'left')\n const yAxisFormatter = yAxisConfig?.label?.formatMethod\n if (yAxisFormatter) {\n ;(crosshair.yField.label!.formatMethod as any) = (text: string | string[]) => yAxisFormatter(text)\n }\n return result\n}\n"],"names":["horizontalCrosshairRect","spec","context","result","advancedVSeed","vseed","chartType","config","visible","rectColor","undefined","labelColor","labelVisible","labelBackgroundColor","crosshair","yAxisConfig","v","yAxisFormatter","text"],"mappings":"AAGO,MAAMA,0BAA0C,CAACC,MAAMC;IAC5D,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IAEtB,MAAME,SAASH,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAC9D,IAAI,CAACC,QACH,OAAOJ;IAGT,IAAI,CAACA,OAAO,SAAS,EACnBA,OAAO,SAAS,GAAG,CAAC;IAGtB,MAAMK,UAAUD,OAAO,OAAO,IAAI;IAClC,MAAME,YAAYF,OAAO,SAAS,IAAIG;IACtC,MAAMC,aAAaJ,OAAO,UAAU,IAAIG;IACxC,MAAME,eAAeL,OAAO,YAAY,IAAI;IAC5C,MAAMM,uBAAuBN,OAAO,oBAAoB,IAAIG;IAE5D,MAAMI,YAAYX,OAAO,SAAS;IAClCW,UAAU,MAAM,GAAG;QACjBN;QACA,MAAM;YACJ,MAAM;YACN,OAAO;gBACL,WAAW;gBACX,SAAS;gBACT,MAAMC;YACR;QACF;QACA,OAAO;YACL,SAASG;YACT,iBAAiB;gBACf,SAASA;gBACT,OAAO;oBACL,MAAMC;gBACR;YACF;YACA,OAAO;gBACL,MAAMF;YACR;QACF;IACF;IACA,MAAMI,cAAcZ,OAAO,IAAI,EAAE,KAAK,CAACa,IAAMA,AAAa,WAAbA,EAAE,MAAM;IACrD,MAAMC,iBAAiBF,aAAa,OAAO;IAC3C,IAAIE,gBACAH,UAAU,MAAM,CAAC,KAAK,CAAE,YAAY,GAAW,CAACI,OAA4BD,eAAeC;IAE/F,OAAOf;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.ts"],"sourcesContent":["import type { ICartesianCrosshairSpec, ILineChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const horizontalCrosshairRect: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n\n const config = advancedVSeed.config?.[chartType as 'column']?.crosshairRect\n if (!config) {\n return result\n }\n\n if (!result.crosshair) {\n result.crosshair = {}\n }\n\n const visible = config.visible || true\n const rectColor = config.rectColor || undefined\n const labelColor = config.labelColor || undefined\n const labelVisible = config.labelVisible || false\n const labelBackgroundColor = config.labelBackgroundColor || undefined\n\n const crosshair = result.crosshair as ICartesianCrosshairSpec\n crosshair.yField = {\n visible,\n line: {\n type: 'rect',\n style: {\n lineWidth: 0,\n opacity: 0.26,\n fill: rectColor,\n },\n },\n label: {\n visible: labelVisible,\n labelBackground: {\n visible: labelVisible,\n style: {\n fill: labelBackgroundColor,\n },\n },\n style: {\n fill: labelColor,\n },\n },\n }\n const yAxisConfig = result.axes?.find((v) => v.orient === 'left')\n const yAxisFormatter = yAxisConfig?.label?.formatMethod\n if (yAxisFormatter) {\n ;(crosshair.yField.label!.formatMethod as any) = (text: string | string[]) => yAxisFormatter(text)\n }\n return result\n}\n"],"names":["horizontalCrosshairRect","spec","context","result","advancedVSeed","vseed","chartType","config","visible","rectColor","undefined","labelColor","labelVisible","labelBackgroundColor","crosshair","yAxisConfig","v","yAxisFormatter","text"],"mappings":"AAGO,MAAMA,0BAA0C,CAACC,MAAMC;IAC5D,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IAEtB,MAAME,SAASH,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAC9D,IAAI,CAACC,QACH,OAAOJ;IAGT,IAAI,CAACA,OAAO,SAAS,EACnBA,OAAO,SAAS,GAAG,CAAC;IAGtB,MAAMK,UAAUD,OAAO,OAAO,IAAI;IAClC,MAAME,YAAYF,OAAO,SAAS,IAAIG;IACtC,MAAMC,aAAaJ,OAAO,UAAU,IAAIG;IACxC,MAAME,eAAeL,OAAO,YAAY,IAAI;IAC5C,MAAMM,uBAAuBN,OAAO,oBAAoB,IAAIG;IAE5D,MAAMI,YAAYX,OAAO,SAAS;IAClCW,UAAU,MAAM,GAAG;QACjBN;QACA,MAAM;YACJ,MAAM;YACN,OAAO;gBACL,WAAW;gBACX,SAAS;gBACT,MAAMC;YACR;QACF;QACA,OAAO;YACL,SAASG;YACT,iBAAiB;gBACf,SAASA;gBACT,OAAO;oBACL,MAAMC;gBACR;YACF;YACA,OAAO;gBACL,MAAMF;YACR;QACF;IACF;IACA,MAAMI,cAAcZ,OAAO,IAAI,EAAE,KAAK,CAACa,IAAMA,AAAa,WAAbA,EAAE,MAAM;IACrD,MAAMC,iBAAiBF,aAAa,OAAO;IAC3C,IAAIE,gBACAH,UAAU,MAAM,CAAC,KAAK,CAAE,YAAY,GAAW,CAACI,OAA4BD,eAAeC;IAE/F,OAAOf;AACT"}
@@ -19,7 +19,7 @@ const verticalCrosshairRect = (spec, context)=>{
19
19
  type: 'rect',
20
20
  style: {
21
21
  lineWidth: 0,
22
- opacity: 0.2,
22
+ opacity: 0.26,
23
23
  fill: rectColor
24
24
  }
25
25
  },
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.ts"],"sourcesContent":["import type { ICartesianCrosshairSpec, ILineChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const verticalCrosshairRect: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n\n const config = advancedVSeed.config?.[chartType as 'column']?.crosshairRect\n if (!config) {\n return result\n }\n\n if (!result.crosshair) {\n result.crosshair = {}\n }\n\n const visible = config.visible || true\n const rectColor = config.rectColor || undefined\n const labelColor = config.labelColor || undefined\n const labelVisible = config.labelVisible || false\n const labelBackgroundColor = config.labelBackgroundColor || undefined\n\n const crosshair = result.crosshair as ICartesianCrosshairSpec\n crosshair.xField = {\n visible,\n line: {\n type: 'rect',\n style: {\n lineWidth: 0,\n opacity: 0.2,\n fill: rectColor,\n },\n },\n label: {\n visible: labelVisible,\n labelBackground: {\n visible: labelVisible,\n style: {\n fill: labelBackgroundColor,\n },\n },\n style: {\n fill: labelColor,\n },\n },\n }\n const xAxisConfig = result.axes?.find((v) => v.orient === 'bottom')\n const xAxisFormatter = xAxisConfig?.label?.formatMethod\n if (xAxisFormatter) {\n ;(crosshair.xField.label!.formatMethod as any) = (text: string | string[]) => xAxisFormatter(text)\n }\n\n return result\n}\n"],"names":["verticalCrosshairRect","spec","context","result","advancedVSeed","vseed","chartType","config","visible","rectColor","undefined","labelColor","labelVisible","labelBackgroundColor","crosshair","xAxisConfig","v","xAxisFormatter","text"],"mappings":"AAGO,MAAMA,wBAAwC,CAACC,MAAMC;IAC1D,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IAEtB,MAAME,SAASH,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAC9D,IAAI,CAACC,QACH,OAAOJ;IAGT,IAAI,CAACA,OAAO,SAAS,EACnBA,OAAO,SAAS,GAAG,CAAC;IAGtB,MAAMK,UAAUD,OAAO,OAAO,IAAI;IAClC,MAAME,YAAYF,OAAO,SAAS,IAAIG;IACtC,MAAMC,aAAaJ,OAAO,UAAU,IAAIG;IACxC,MAAME,eAAeL,OAAO,YAAY,IAAI;IAC5C,MAAMM,uBAAuBN,OAAO,oBAAoB,IAAIG;IAE5D,MAAMI,YAAYX,OAAO,SAAS;IAClCW,UAAU,MAAM,GAAG;QACjBN;QACA,MAAM;YACJ,MAAM;YACN,OAAO;gBACL,WAAW;gBACX,SAAS;gBACT,MAAMC;YACR;QACF;QACA,OAAO;YACL,SAASG;YACT,iBAAiB;gBACf,SAASA;gBACT,OAAO;oBACL,MAAMC;gBACR;YACF;YACA,OAAO;gBACL,MAAMF;YACR;QACF;IACF;IACA,MAAMI,cAAcZ,OAAO,IAAI,EAAE,KAAK,CAACa,IAAMA,AAAa,aAAbA,EAAE,MAAM;IACrD,MAAMC,iBAAiBF,aAAa,OAAO;IAC3C,IAAIE,gBACAH,UAAU,MAAM,CAAC,KAAK,CAAE,YAAY,GAAW,CAACI,OAA4BD,eAAeC;IAG/F,OAAOf;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.ts"],"sourcesContent":["import type { ICartesianCrosshairSpec, ILineChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const verticalCrosshairRect: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n\n const config = advancedVSeed.config?.[chartType as 'column']?.crosshairRect\n if (!config) {\n return result\n }\n\n if (!result.crosshair) {\n result.crosshair = {}\n }\n\n const visible = config.visible || true\n const rectColor = config.rectColor || undefined\n const labelColor = config.labelColor || undefined\n const labelVisible = config.labelVisible || false\n const labelBackgroundColor = config.labelBackgroundColor || undefined\n\n const crosshair = result.crosshair as ICartesianCrosshairSpec\n crosshair.xField = {\n visible,\n line: {\n type: 'rect',\n style: {\n lineWidth: 0,\n opacity: 0.26,\n fill: rectColor,\n },\n },\n label: {\n visible: labelVisible,\n labelBackground: {\n visible: labelVisible,\n style: {\n fill: labelBackgroundColor,\n },\n },\n style: {\n fill: labelColor,\n },\n },\n }\n const xAxisConfig = result.axes?.find((v) => v.orient === 'bottom')\n const xAxisFormatter = xAxisConfig?.label?.formatMethod\n if (xAxisFormatter) {\n ;(crosshair.xField.label!.formatMethod as any) = (text: string | string[]) => xAxisFormatter(text)\n }\n\n return result\n}\n"],"names":["verticalCrosshairRect","spec","context","result","advancedVSeed","vseed","chartType","config","visible","rectColor","undefined","labelColor","labelVisible","labelBackgroundColor","crosshair","xAxisConfig","v","xAxisFormatter","text"],"mappings":"AAGO,MAAMA,wBAAwC,CAACC,MAAMC;IAC1D,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IAEtB,MAAME,SAASH,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAC9D,IAAI,CAACC,QACH,OAAOJ;IAGT,IAAI,CAACA,OAAO,SAAS,EACnBA,OAAO,SAAS,GAAG,CAAC;IAGtB,MAAMK,UAAUD,OAAO,OAAO,IAAI;IAClC,MAAME,YAAYF,OAAO,SAAS,IAAIG;IACtC,MAAMC,aAAaJ,OAAO,UAAU,IAAIG;IACxC,MAAME,eAAeL,OAAO,YAAY,IAAI;IAC5C,MAAMM,uBAAuBN,OAAO,oBAAoB,IAAIG;IAE5D,MAAMI,YAAYX,OAAO,SAAS;IAClCW,UAAU,MAAM,GAAG;QACjBN;QACA,MAAM;YACJ,MAAM;YACN,OAAO;gBACL,WAAW;gBACX,SAAS;gBACT,MAAMC;YACR;QACF;QACA,OAAO;YACL,SAASG;YACT,iBAAiB;gBACf,SAASA;gBACT,OAAO;oBACL,MAAMC;gBACR;YACF;YACA,OAAO;gBACL,MAAMF;YACR;QACF;IACF;IACA,MAAMI,cAAcZ,OAAO,IAAI,EAAE,KAAK,CAACa,IAAMA,AAAa,aAAbA,EAAE,MAAM;IACrD,MAAMC,iBAAiBF,aAAa,OAAO;IAC3C,IAAIE,gBACAH,UAAU,MAAM,CAAC,KAAK,CAAE,YAAY,GAAW,CAACI,OAA4BD,eAAeC;IAG/F,OAAOf;AACT"}
@@ -18,3 +18,4 @@ export * from './size';
18
18
  export * from './barWidth';
19
19
  export * from './regressionLine';
20
20
  export * from './region';
21
+ export * from './pipeFilter';
@@ -18,3 +18,4 @@ export * from "./size/index.js";
18
18
  export * from "./barWidth/index.js";
19
19
  export * from "./regressionLine/index.js";
20
20
  export * from "./region/index.js";
21
+ export * from "./pipeFilter/index.js";
@@ -12,10 +12,10 @@ const initPivot = (spec)=>{
12
12
  widthMode: 'standard',
13
13
  autoFillWidth: true,
14
14
  defaultHeaderColWidth: 'auto',
15
- defaultColWidth: 200,
15
+ defaultColWidth: 240,
16
16
  heightMode: 'standard',
17
17
  autoFillHeight: true,
18
- defaultRowHeight: 100,
18
+ defaultRowHeight: 180,
19
19
  defaultHeaderRowHeight: 'auto',
20
20
  indicatorsAsCol: false,
21
21
  select: {
@@ -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 { PivotChartSpecPipe } from 'src/types'\n\nexport const initPivot: PivotChartSpecPipe = (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: 'standard',\n autoFillWidth: true,\n defaultHeaderColWidth: 'auto',\n defaultColWidth: 200,\n\n heightMode: 'standard',\n autoFillHeight: true,\n defaultRowHeight: 100,\n defaultHeaderRowHeight: 'auto',\n\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: 'row',\n },\n animationAppear: {\n duration: 600,\n type: 'all',\n direction: 'row',\n },\n }\n}\n"],"names":["initPivot","spec","result"],"mappings":"AAGO,MAAMA,YAAgC,CAACC;IAC5C,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,eAAe;QACf,uBAAuB;QACvB,iBAAiB;QAEjB,YAAY;QACZ,gBAAgB;QAChB,kBAAkB;QAClB,wBAAwB;QAExB,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"}
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 { PivotChartSpecPipe } from 'src/types'\n\nexport const initPivot: PivotChartSpecPipe = (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: 'standard',\n autoFillWidth: true,\n defaultHeaderColWidth: 'auto',\n defaultColWidth: 240,\n\n heightMode: 'standard',\n autoFillHeight: true,\n defaultRowHeight: 180,\n defaultHeaderRowHeight: 'auto',\n\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: 'row',\n },\n animationAppear: {\n duration: 600,\n type: 'all',\n direction: 'row',\n },\n }\n}\n"],"names":["initPivot","spec","result"],"mappings":"AAGO,MAAMA,YAAgC,CAACC;IAC5C,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,eAAe;QACf,uBAAuB;QACvB,iBAAiB;QAEjB,YAAY;QACZ,gBAAgB;QAChB,kBAAkB;QAClB,wBAAwB;QAExB,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"}
@@ -0,0 +1,2 @@
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const boxPlotStyle: VChartSpecPipe;
@@ -0,0 +1,52 @@
1
+ import { selector } from "../../../../../dataSelector/index.js";
2
+ import { isEmpty, isNullish } from "remeda";
3
+ const boxPlotStyle_boxPlotStyle = (spec, context)=>{
4
+ const { advancedVSeed, vseed } = context;
5
+ const { markStyle, config } = advancedVSeed;
6
+ const { boxPlotStyle } = markStyle;
7
+ const theme = config?.[vseed.chartType]?.boxPlotStyle;
8
+ const result = {
9
+ ...spec,
10
+ boxPlot: {
11
+ style: {
12
+ shaftShape: 'filled-line',
13
+ visible: true,
14
+ shaftWidth: '50%',
15
+ stroke: theme?.boxBorderColor
16
+ }
17
+ }
18
+ };
19
+ if (isNullish(boxPlotStyle) || isEmpty(boxPlotStyle)) return result;
20
+ const boxPlotStyles = Array.isArray(boxPlotStyle) ? boxPlotStyle : [
21
+ boxPlotStyle
22
+ ];
23
+ const customMap = boxPlotStyles.reduce((result, style, index)=>{
24
+ const { boxColor, boxColorOpacity, boxBorderColor, boxBorderWidth = 1, boxVisible = true, boxBorderOpacity } = style;
25
+ return {
26
+ ...result,
27
+ [`custom${index + 1}`]: {
28
+ level: index + 1,
29
+ filter: (datum)=>{
30
+ if (selector(datum, style.selector)) return true;
31
+ return false;
32
+ },
33
+ style: {
34
+ visible: boxVisible,
35
+ fill: boxColor,
36
+ fillOpacity: boxColorOpacity,
37
+ lineWidth: boxBorderWidth,
38
+ stroke: boxBorderColor,
39
+ strokeOpacity: boxBorderOpacity
40
+ }
41
+ }
42
+ };
43
+ }, {});
44
+ result.boxPlot.state = {
45
+ ...result.boxPlot.state,
46
+ ...customMap
47
+ };
48
+ return result;
49
+ };
50
+ export { boxPlotStyle_boxPlotStyle as boxPlotStyle };
51
+
52
+ //# sourceMappingURL=boxPlotStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.ts"],"sourcesContent":["import type { IBoxPlotChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BoxPlotStyle, Datum, VChartSpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const boxPlotStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { markStyle, config } = advancedVSeed\n const { boxPlotStyle } = markStyle\n const theme = config?.[vseed.chartType as 'boxPlot']?.boxPlotStyle\n\n const result = {\n ...spec,\n boxPlot: {\n style: {\n shaftShape: 'filled-line',\n visible: true,\n shaftWidth: '50%',\n stroke: theme?.boxBorderColor,\n },\n },\n } as IBoxPlotChartSpec\n\n if (isNullish(boxPlotStyle) || isEmpty(boxPlotStyle)) {\n return result\n }\n\n const boxPlotStyles = (Array.isArray(boxPlotStyle) ? boxPlotStyle : [boxPlotStyle]) as BoxPlotStyle[]\n\n const customMap = boxPlotStyles.reduce<object>((result, style, index) => {\n const { boxColor, boxColorOpacity, boxBorderColor, boxBorderWidth = 1, boxVisible = true, boxBorderOpacity } = style\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n if (selector(datum, style.selector)) {\n return true\n }\n return false\n },\n style: {\n visible: boxVisible,\n fill: boxColor,\n fillOpacity: boxColorOpacity,\n lineWidth: boxBorderWidth,\n stroke: boxBorderColor,\n strokeOpacity: boxBorderOpacity,\n },\n },\n }\n }, {})\n\n result.boxPlot!.state = {\n ...result.boxPlot!.state,\n ...customMap,\n }\n\n return result\n}\n"],"names":["boxPlotStyle","spec","context","advancedVSeed","vseed","markStyle","config","theme","result","isNullish","isEmpty","boxPlotStyles","Array","customMap","style","index","boxColor","boxColorOpacity","boxBorderColor","boxBorderWidth","boxVisible","boxBorderOpacity","datum","selector"],"mappings":";;AAKO,MAAMA,4BAA+B,CAACC,MAAMC;IACjD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAEC,MAAM,EAAE,GAAGH;IAC9B,MAAM,EAAEH,YAAY,EAAE,GAAGK;IACzB,MAAME,QAAQD,QAAQ,CAACF,MAAM,SAAS,CAAc,EAAE;IAEtD,MAAMI,SAAS;QACb,GAAGP,IAAI;QACP,SAAS;YACP,OAAO;gBACL,YAAY;gBACZ,SAAS;gBACT,YAAY;gBACZ,QAAQM,OAAO;YACjB;QACF;IACF;IAEA,IAAIE,UAAUT,iBAAiBU,QAAQV,eACrC,OAAOQ;IAGT,MAAMG,gBAAiBC,MAAM,OAAO,CAACZ,gBAAgBA,eAAe;QAACA;KAAa;IAElF,MAAMa,YAAYF,cAAc,MAAM,CAAS,CAACH,QAAQM,OAAOC;QAC7D,MAAM,EAAEC,QAAQ,EAAEC,eAAe,EAAEC,cAAc,EAAEC,iBAAiB,CAAC,EAAEC,aAAa,IAAI,EAAEC,gBAAgB,EAAE,GAAGP;QAE/G,OAAO;YACL,GAAGN,MAAM;YACT,CAAC,CAAC,MAAM,EAAEO,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACO;oBACP,IAAIC,SAASD,OAAOR,MAAM,QAAQ,GAChC,OAAO;oBAET,OAAO;gBACT;gBACA,OAAO;oBACL,SAASM;oBACT,MAAMJ;oBACN,aAAaC;oBACb,WAAWE;oBACX,QAAQD;oBACR,eAAeG;gBACjB;YACF;QACF;IACF,GAAG,CAAC;IAEJb,OAAO,OAAO,CAAE,KAAK,GAAG;QACtB,GAAGA,OAAO,OAAO,CAAE,KAAK;QACxB,GAAGK,SAAS;IACd;IAEA,OAAOL;AACT"}
@@ -8,3 +8,5 @@ export { funnelStyle } from './funnelStyle';
8
8
  export { pieStyle } from './pieStyle';
9
9
  export { roseStyle } from './roseStyle';
10
10
  export { funnelTransformStyle } from './funnelTransformStyle';
11
+ export { boxPlotStyle } from './boxPlotStyle';
12
+ export { outlierStyle } from './outlierStyle';
@@ -7,5 +7,7 @@ import { funnelStyle } from "./funnelStyle.js";
7
7
  import { pieStyle } from "./pieStyle.js";
8
8
  import { roseStyle } from "./roseStyle.js";
9
9
  import { funnelTransformStyle } from "./funnelTransformStyle.js";
10
+ import { boxPlotStyle } from "./boxPlotStyle.js";
11
+ import { outlierStyle } from "./outlierStyle.js";
10
12
  export * from "./pointState.js";
11
- export { areaStyle, barStyle, cellStyle, funnelStyle, funnelTransformStyle, lineStyle, pieStyle, pointStyle, roseStyle };
13
+ export { areaStyle, barStyle, boxPlotStyle, cellStyle, funnelStyle, funnelTransformStyle, lineStyle, outlierStyle, pieStyle, pointStyle, roseStyle };
@@ -0,0 +1,2 @@
1
+ import type { VChartSpecPipe } from '../../../../../types';
2
+ export declare const outlierStyle: VChartSpecPipe;