@visactor/vseed 0.1.44 → 0.1.46
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.
- package/dist/cjs/index.cjs +3 -3
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/buildSpec.js.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +326 -14
- package/dist/esm/dataReshape/constant.d.ts +2 -2
- package/dist/esm/dataReshape/constant.js +3 -3
- package/dist/esm/dataReshape/constant.js.map +1 -1
- package/dist/esm/i18n/i18n.js +2 -2
- package/dist/esm/i18n/i18n.js.map +1 -1
- package/dist/esm/i18n/i18nData.d.ts +2 -0
- package/dist/esm/i18n/i18nData.js +41 -5
- package/dist/esm/i18n/i18nData.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/area.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/area.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/bar.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/column.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/line.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/line.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/radar.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/radar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/rose.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/rose.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/dimensions/index.d.ts +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/dimensions/index.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/dimensions/pickDimensionsForReshape.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/dimensions/pickDimensionsForReshape.js +14 -0
- package/dist/esm/pipeline/advanced/chart/pipes/dimensions/pickDimensionsForReshape.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/index.d.ts +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/index.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipes/measures/pickMeasuresForReshape.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/pickMeasuresForReshape.js +14 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/pickMeasuresForReshape.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +8 -6
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +5 -3
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js +8 -6
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +3 -5
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/donut.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/funnel.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/heatmap.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +3 -3
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/line.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/pie.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.d.ts +1 -2
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js +14 -13
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js +12 -19
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +2 -17
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +2 -17
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.d.ts +34 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js +35 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/radarAngle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/radarRadius.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/radarRadius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/radius.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/backgroundColor/background.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/backgroundColor/background.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/color.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/color.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.d.ts +3 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/linearColor.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/linearColor.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/linearColorForDualAxis.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/linearColorForDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/histogramCrosshair.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/histogramCrosshair.js +27 -0
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/histogramCrosshair.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetDualAxis.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetPivot.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetPivot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetScatter.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetXY.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetXY.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetYX.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetYX.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/dual/dualChartType.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/area.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/area.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/bar.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/column.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/column.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/donut.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/donut.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/funnel.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/funnel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/heatmap.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/line.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/line.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/pie.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/pie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/radar.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/radar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/rose.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/rose.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/scatter.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/boxLegend.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/legend/boxLegend.js +15 -0
- package/dist/esm/pipeline/spec/chart/pipes/legend/boxLegend.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js +7 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js +18 -2
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pieStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pieStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/roseStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/roseStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/percent/percent.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/percent/percent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.js +4 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAdapter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.d.ts +4 -4
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotTitle.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotTitle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/region/addRegionPadding.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/region/addRegionPadding.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +32 -2
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.d.ts +6 -6
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js +5 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/series/series.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/series/series.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/stack/stack.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/stack/stack.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +5 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +14 -5
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +6 -4
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/utils/histogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/utils/histogram.js +12 -0
- package/dist/esm/pipeline/spec/chart/utils/histogram.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/columns/dimensionsToColumns.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/columns/dimensionsToColumns.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/init/table.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/init/table.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/scrollStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/theme/scrollStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/selectionStyle.d.ts +2 -2
- package/dist/esm/pipeline/spec/table/pipes/theme/selectionStyle.js.map +1 -1
- package/dist/esm/pipeline/utils/measures/delete.d.ts +2 -2
- package/dist/esm/pipeline/utils/measures/delete.js +7 -3
- package/dist/esm/pipeline/utils/measures/delete.js.map +1 -1
- package/dist/esm/pipeline/utils/tree/traverse.d.ts +1 -0
- package/dist/esm/pipeline/utils/tree/traverse.js +12 -1
- package/dist/esm/pipeline/utils/tree/traverse.js.map +1 -1
- package/dist/esm/theme/common/annotaion.js +7 -7
- package/dist/esm/theme/common/annotaion.js.map +1 -1
- package/dist/esm/theme/common/axes.js +16 -16
- package/dist/esm/theme/common/axes.js.map +1 -1
- package/dist/esm/theme/common/legend.d.ts +2 -0
- package/dist/esm/theme/common/legend.js +13 -2
- package/dist/esm/theme/common/legend.js.map +1 -1
- package/dist/esm/theme/common/table.js +0 -2
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +2 -2
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +2 -2
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +196 -3
- package/dist/esm/types/advancedVSeed.js +2 -0
- package/dist/esm/types/advancedVSeed.js.map +1 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +14 -3
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +14 -3
- package/dist/esm/types/chartType/bar/zBar.d.ts +14 -3
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +14 -3
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +14 -3
- package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +14 -3
- package/dist/esm/types/chartType/column/zColumn.d.ts +14 -3
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +14 -3
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +14 -3
- package/dist/esm/types/chartType/donut/zDonut.d.ts +14 -3
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +44 -15
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +12 -3
- package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +12 -3
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +14 -3
- package/dist/esm/types/chartType/line/zLine.d.ts +14 -3
- package/dist/esm/types/chartType/pie/zPie.d.ts +14 -3
- package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +12 -3
- package/dist/esm/types/chartType/radar/zRadar.d.ts +14 -3
- package/dist/esm/types/chartType/rose/zRose.d.ts +14 -3
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +14 -3
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +44 -15
- package/dist/esm/types/chartType/table/zTable.d.ts +12 -3
- package/dist/esm/types/pipeline/spec/spec.d.ts +11 -2
- package/dist/esm/types/properties/config/area.d.ts +4 -0
- package/dist/esm/types/properties/config/bar.d.ts +6 -0
- package/dist/esm/types/properties/config/boxplot.d.ts +2 -0
- package/dist/esm/types/properties/config/column.d.ts +6 -0
- package/dist/esm/types/properties/config/config.d.ts +40 -0
- package/dist/esm/types/properties/config/dualAxis.d.ts +2 -0
- package/dist/esm/types/properties/config/funnel.d.ts +2 -0
- package/dist/esm/types/properties/config/heatmap.d.ts +2 -0
- package/dist/esm/types/properties/config/histogram.d.ts +2 -0
- package/dist/esm/types/properties/config/legend/legend.d.ts +10 -0
- package/dist/esm/types/properties/config/legend/legend.js +2 -0
- package/dist/esm/types/properties/config/legend/legend.js.map +1 -1
- package/dist/esm/types/properties/config/line.d.ts +2 -0
- package/dist/esm/types/properties/config/pie.d.ts +6 -0
- package/dist/esm/types/properties/config/rose.d.ts +4 -0
- package/dist/esm/types/properties/config/scatter.d.ts +2 -0
- package/dist/esm/types/properties/measures/zDualMeasures.d.ts +60 -24
- package/dist/esm/types/properties/measures/zMeasures.d.ts +36 -9
- package/dist/esm/types/properties/measures/zMeasures.js +13 -4
- package/dist/esm/types/properties/measures/zMeasures.js.map +1 -1
- package/dist/esm/types/properties/measures/zScatterMeasures.d.ts +60 -24
- package/dist/esm/types/properties/regressionLine/linearRegressionLine.d.ts +5 -0
- package/dist/esm/types/properties/regressionLine/logisticRegressionLine.d.ts +5 -0
- package/dist/esm/types/properties/regressionLine/lowessRegressionLine.d.ts +5 -0
- package/dist/esm/types/properties/regressionLine/polynomialRegressionLine.d.ts +5 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +80 -0
- package/dist/esm/types/zVseed.d.ts +360 -90
- package/dist/umd/index.js +478 -281
- package/dist/umd/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/esm/pipeline/advanced/chart/pipes/dimensions/deleteTooltipAndLabelDimensions.d.ts +0 -2
- package/dist/esm/pipeline/advanced/chart/pipes/dimensions/deleteTooltipAndLabelDimensions.js +0 -12
- package/dist/esm/pipeline/advanced/chart/pipes/dimensions/deleteTooltipAndLabelDimensions.js.map +0 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.d.ts +0 -2
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.js +0 -12
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Datum,
|
|
1
|
+
import type { Datum, VChartSpecPipe } from '../../../../../types';
|
|
2
2
|
export declare const generateRegressionLinePipe: (type: "linearRegressionLine" | "lowessRegressionLine" | "polynomialRegressionLine" | "logisticRegressionLine", regressionFunction: (arr: Datum[], xAccessor: (d: Datum) => number, yAccessor: (d: Datum) => number, options?: any) => {
|
|
3
3
|
confidenceInterval: (N: number) => {
|
|
4
4
|
lower: number;
|
|
@@ -9,8 +9,8 @@ export declare const generateRegressionLinePipe: (type: "linearRegressionLine" |
|
|
|
9
9
|
x: number;
|
|
10
10
|
y: number;
|
|
11
11
|
}[];
|
|
12
|
-
}, getOptions?: (lineConfig: any) => any) =>
|
|
13
|
-
export declare const linearRegressionLine:
|
|
14
|
-
export declare const lowessRegressionLine:
|
|
15
|
-
export declare const polynomialRegressionLine:
|
|
16
|
-
export declare const logisticRegressionLine:
|
|
12
|
+
}, getOptions?: (lineConfig: any) => any) => VChartSpecPipe;
|
|
13
|
+
export declare const linearRegressionLine: VChartSpecPipe;
|
|
14
|
+
export declare const lowessRegressionLine: VChartSpecPipe;
|
|
15
|
+
export declare const polynomialRegressionLine: VChartSpecPipe;
|
|
16
|
+
export declare const logisticRegressionLine: VChartSpecPipe;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNullish } from "remeda";
|
|
2
2
|
import { array, clamper, regressionLinear, regressionLogistic, regressionLowess, regressionPolynomial } from "@visactor/vutils";
|
|
3
|
-
const generateRegressionLinePipe = (type, regressionFunction, getOptions)=>(spec, context)=>{
|
|
3
|
+
const generateRegressionLinePipe = (type, regressionFunction, getOptions = getDefaultRegressionOptions)=>(spec, context)=>{
|
|
4
4
|
const result = {
|
|
5
5
|
...spec
|
|
6
6
|
};
|
|
@@ -148,9 +148,13 @@ const generateRegressionLinePipe = (type, regressionFunction, getOptions)=>(spec
|
|
|
148
148
|
});
|
|
149
149
|
return result;
|
|
150
150
|
};
|
|
151
|
+
const getDefaultRegressionOptions = (lineConfig)=>({
|
|
152
|
+
alpha: lineConfig?.confidenceLevel ?? 0.95
|
|
153
|
+
});
|
|
151
154
|
const linearRegressionLine = generateRegressionLinePipe('linearRegressionLine', regressionLinear);
|
|
152
155
|
const lowessRegressionLine = generateRegressionLinePipe('lowessRegressionLine', regressionLowess);
|
|
153
156
|
const polynomialRegressionLine = generateRegressionLinePipe('polynomialRegressionLine', regressionPolynomial, (lineConfig)=>({
|
|
157
|
+
...getDefaultRegressionOptions(lineConfig),
|
|
154
158
|
degree: lineConfig.degree ?? 2
|
|
155
159
|
}));
|
|
156
160
|
const logisticRegressionLine = generateRegressionLinePipe('logisticRegressionLine', regressionLogistic);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.ts"],"sourcesContent":["import type { ICartesianSeries, IChart, IScatterChartSpec, IVChart } from '@visactor/vchart'\nimport { isNullish } from 'remeda'\nimport {\n array,\n clamper,\n regressionLinear,\n regressionLowess,\n regressionPolynomial,\n regressionLogistic,\n} from '@visactor/vutils'\nimport type {\n Datum,\n SpecPipe,\n RegressionLineConfig,\n LinearRegressionLine,\n SpecPipelineContext,\n PolynomialRegressionLine,\n} from 'src/types'\n\nexport const generateRegressionLinePipe = (\n type: 'linearRegressionLine' | 'lowessRegressionLine' | 'polynomialRegressionLine' | 'logisticRegressionLine',\n regressionFunction: (\n arr: Datum[],\n xAccessor: (d: Datum) => number,\n yAccessor: (d: Datum) => number,\n options?: any,\n ) => {\n confidenceInterval: (N: number) => { lower: number; upper: number; x: number }[]\n evaluateGrid: (N: number) => { x: number; y: number }[]\n },\n getOptions?: (lineConfig: any) => any,\n): SpecPipe => {\n return ((spec: Partial<IScatterChartSpec>, context: SpecPipelineContext): Partial<IScatterChartSpec> => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { chartType, regressionLine } = advancedVSeed\n const lineTheme = advancedVSeed.config[chartType as 'scatter']?.regressionLine as RegressionLineConfig\n\n if (!regressionLine || !regressionLine[type]) {\n return result\n }\n\n const lineList = array(regressionLine[type])\n\n if (!result.customMark) {\n result.customMark = []\n }\n\n lineList.forEach((line, lineIndex) => {\n const theme = (lineTheme.linearRegressionLine ?? {}) as LinearRegressionLine\n const {\n color,\n lineWidth,\n lineDash,\n text,\n textColor,\n textFontSize,\n textFontWeight,\n confidenceIntervalOpacity,\n confidenceIntervalVisible = theme.confidenceIntervalVisible,\n } = line as LinearRegressionLine\n\n const childrenMarks: any[] = []\n\n ;(result.customMark as any[]).push({\n type: 'group',\n interactive: false,\n zIndex: 500,\n name: `${type}-${lineIndex}`,\n style: {\n data: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const s = chart.getAllSeries()[0] as ICartesianSeries\n\n if (s) {\n const rect = s.getRegion().getLayoutRect()\n const segments: {\n areaPoints?: { x: number; y: number; y1: number }[]\n linePoints: { x: number; y: number }[]\n color: string\n }[] = []\n\n if (rect.width === 0 || rect.height === 0) {\n return segments\n }\n\n const start = s.getRegion().getLayoutStartPoint()\n const yClamper = clamper(start.y, start.y + rect.height)\n const colorAttrOptions = s.getColorAttribute()\n const groups: (string | undefined)[] = s.getSeriesKeys()\n const data = s.getViewData()?.latestData as Datum[]\n const fieldX = s.fieldX?.[0]\n const fieldY = s.fieldY?.[0]\n\n if (!groups.length) {\n groups.push(undefined)\n }\n\n groups.forEach((group) => {\n const groupData = data.filter((d: Datum) => d[colorAttrOptions?.field] === group)\n\n if (!groupData.length) {\n return\n }\n const { confidenceInterval, evaluateGrid } = regressionFunction(\n groupData,\n (datum: Datum) => datum?.[fieldX],\n (datum: Datum) => datum?.[fieldY],\n getOptions?.(line),\n )\n const N = Math.max(3, Math.floor(groupData.length / 4))\n const mainColor = color ?? colorAttrOptions?.scale?.scale(group)\n\n const lineData = evaluateGrid(N)\n const linePoints = lineData.map((ld: Datum) => {\n const d = { [fieldX]: ld.x, [fieldY]: ld.y }\n return {\n x: s.dataToPositionX(d)! + start.x,\n y: yClamper(s.dataToPositionY(d)! + start.y),\n }\n })\n\n segments.push({\n color: mainColor,\n linePoints,\n })\n\n if (confidenceIntervalVisible) {\n const intervalData = confidenceInterval(N)\n const areaPoints = intervalData.map((datum: Datum) => {\n const d = { [fieldX]: datum.x, [fieldY]: datum.lower }\n return {\n x: s.dataToPositionX(d)! + start.x,\n y: yClamper(s.dataToPositionY(d)! + start.y),\n y1: yClamper(s.dataToPositionY({ [fieldY]: datum.upper })! + start.y),\n }\n })\n\n segments[segments.length - 1].areaPoints = areaPoints\n }\n })\n\n return segments\n }\n return []\n },\n },\n children: childrenMarks,\n })\n\n if (confidenceIntervalVisible) {\n childrenMarks.push({\n type: 'area',\n interactive: false,\n zIndex: 500,\n style: {\n lineWidth: lineWidth ?? theme.lineWidth,\n lineDash: lineDash ?? theme.lineDash,\n fillOpacity: confidenceIntervalOpacity ?? theme.confidenceIntervalOpacity,\n fill: 'red', // vrender bug,必须要设置一个全局的fill,才会绘制\n segments: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.length) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n return parentNode.attribute.data.map((d: any) => {\n return {\n points: d.areaPoints ?? [],\n fill: d.color,\n }\n })\n }\n\n return []\n },\n },\n })\n }\n\n childrenMarks.push({\n type: 'line',\n interactive: false,\n zIndex: 500,\n style: {\n lineWidth: lineWidth ?? theme.lineWidth,\n lineDash: lineDash ?? theme.lineDash,\n stroke: 'red', // vrender bug,必须要设置一个全局的stroke,才会绘制\n segments: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.length) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n return parentNode.attribute.data.map((d: any) => {\n return {\n points: d.linePoints,\n stroke: d.color,\n }\n })\n }\n\n return []\n },\n },\n })\n\n if (!isNullish(text)) {\n childrenMarks.push({\n type: 'text',\n interactive: false,\n zIndex: 500,\n style: {\n textAlign: 'end',\n fill: textColor ?? theme.textColor,\n fontSize: textFontSize ?? theme.textFontSize,\n fontWeight: textFontWeight ?? theme.textFontWeight,\n text: text,\n x: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.length) {\n const point = parentNode.attribute.data[parentNode.attribute.data.length - 1].linePoints\n return point[point.length - 1]?.x\n }\n\n return undefined\n },\n y: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.length) {\n const point = parentNode.attribute.data[parentNode.attribute.data.length - 1].linePoints\n return point[point.length - 1]?.y\n }\n\n return undefined\n },\n },\n })\n }\n })\n\n return result\n }) as SpecPipe\n}\n\nexport const linearRegressionLine: SpecPipe = generateRegressionLinePipe('linearRegressionLine', regressionLinear)\nexport const lowessRegressionLine: SpecPipe = generateRegressionLinePipe('lowessRegressionLine', regressionLowess)\nexport const polynomialRegressionLine: SpecPipe = generateRegressionLinePipe(\n 'polynomialRegressionLine',\n regressionPolynomial,\n (lineConfig: PolynomialRegressionLine) => {\n return { degree: lineConfig.degree ?? 2 }\n },\n)\nexport const logisticRegressionLine: SpecPipe = generateRegressionLinePipe('logisticRegressionLine', regressionLogistic)\n"],"names":["generateRegressionLinePipe","type","regressionFunction","getOptions","spec","context","result","advancedVSeed","chartType","regressionLine","lineTheme","lineList","array","line","lineIndex","theme","color","lineWidth","lineDash","text","textColor","textFontSize","textFontWeight","confidenceIntervalOpacity","confidenceIntervalVisible","childrenMarks","datum","ctx","vchart","chart","s","rect","segments","start","yClamper","clamper","colorAttrOptions","groups","data","fieldX","fieldY","undefined","group","groupData","d","confidenceInterval","evaluateGrid","N","Math","mainColor","lineData","linePoints","ld","intervalData","areaPoints","opt","parentNode","isNullish","point","linearRegressionLine","regressionLinear","lowessRegressionLine","regressionLowess","polynomialRegressionLine","regressionPolynomial","lineConfig","logisticRegressionLine","regressionLogistic"],"mappings":";;AAmBO,MAAMA,6BAA6B,CACxCC,MACAC,oBASAC,aAEQ,CAACC,MAAkCC;QACzC,MAAMC,SAAS;YAAE,GAAGF,IAAI;QAAC;QACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,SAAS,EAAEC,cAAc,EAAE,GAAGF;QACtC,MAAMG,YAAYH,cAAc,MAAM,CAACC,UAAuB,EAAE;QAEhE,IAAI,CAACC,kBAAkB,CAACA,cAAc,CAACR,KAAK,EAC1C,OAAOK;QAGT,MAAMK,WAAWC,MAAMH,cAAc,CAACR,KAAK;QAE3C,IAAI,CAACK,OAAO,UAAU,EACpBA,OAAO,UAAU,GAAG,EAAE;QAGxBK,SAAS,OAAO,CAAC,CAACE,MAAMC;YACtB,MAAMC,QAASL,UAAU,oBAAoB,IAAI,CAAC;YAClD,MAAM,EACJM,KAAK,EACLC,SAAS,EACTC,QAAQ,EACRC,IAAI,EACJC,SAAS,EACTC,YAAY,EACZC,cAAc,EACdC,yBAAyB,EACzBC,4BAA4BT,MAAM,yBAAyB,EAC5D,GAAGF;YAEJ,MAAMY,gBAAuB,EAAE;YAE7BnB,OAAO,UAAU,CAAW,IAAI,CAAC;gBACjC,MAAM;gBACN,aAAa;gBACb,QAAQ;gBACR,MAAM,GAAGL,KAAK,CAAC,EAAEa,WAAW;gBAC5B,OAAO;oBACL,MAAM,CAACY,OAAYC;wBACjB,MAAMC,SAASD,IAAI,MAAM;wBACzB,MAAME,QAAQD,OAAO,QAAQ;wBAC7B,MAAME,IAAID,MAAM,YAAY,EAAE,CAAC,EAAE;wBAEjC,IAAIC,GAAG;4BACL,MAAMC,OAAOD,EAAE,SAAS,GAAG,aAAa;4BACxC,MAAME,WAIA,EAAE;4BAER,IAAID,AAAe,MAAfA,KA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EJ;QAEA,OAAOpD;IACT;AAGK,MAAMqD,uBAAiC3D,2BAA2B,wBAAwB4D;AAC1F,MAAMC,uBAAiC7D,2BAA2B,wBAAwB8D;AAC1F,MAAMC,2BAAqC/D,2BAChD,4BACAgE,sBACA,CAACC,aACQ;QAAE,QAAQA,WAAW,MAAM,IAAI;IAAE;AAGrC,MAAMC,yBAAmClE,2BAA2B,0BAA0BmE"}
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.ts"],"sourcesContent":["import type { ICartesianSeries, IChart, IScatterChartSpec, IVChart } from '@visactor/vchart'\nimport { isNullish } from 'remeda'\nimport {\n array,\n clamper,\n regressionLinear,\n regressionLowess,\n regressionPolynomial,\n regressionLogistic,\n} from '@visactor/vutils'\nimport type {\n Datum,\n VChartSpecPipe,\n RegressionLineConfig,\n LinearRegressionLine,\n PolynomialRegressionLine,\n SpecPipelineContext,\n LogisticRegressionLine,\n LowessRegressionLine,\n} from 'src/types'\n\nexport const generateRegressionLinePipe = (\n type: 'linearRegressionLine' | 'lowessRegressionLine' | 'polynomialRegressionLine' | 'logisticRegressionLine',\n regressionFunction: (\n arr: Datum[],\n xAccessor: (d: Datum) => number,\n yAccessor: (d: Datum) => number,\n options?: any,\n ) => {\n confidenceInterval: (N: number) => { lower: number; upper: number; x: number }[]\n evaluateGrid: (N: number) => { x: number; y: number }[]\n },\n getOptions: (lineConfig: any) => any = getDefaultRegressionOptions,\n): VChartSpecPipe => {\n return ((spec: Partial<IScatterChartSpec>, context: SpecPipelineContext): Partial<IScatterChartSpec> => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { chartType, regressionLine } = advancedVSeed\n const lineTheme = advancedVSeed.config[chartType as 'scatter']?.regressionLine as RegressionLineConfig\n\n if (!regressionLine || !regressionLine[type]) {\n return result\n }\n\n const lineList = array(regressionLine[type])\n\n if (!result.customMark) {\n result.customMark = []\n }\n\n lineList.forEach((line, lineIndex) => {\n const theme = (lineTheme.linearRegressionLine ?? {}) as LinearRegressionLine\n const {\n color,\n lineWidth,\n lineDash,\n text,\n textColor,\n textFontSize,\n textFontWeight,\n confidenceIntervalOpacity,\n confidenceIntervalVisible = theme.confidenceIntervalVisible,\n } = line as LinearRegressionLine\n\n const childrenMarks: any[] = []\n\n ;(result.customMark as any[]).push({\n type: 'group',\n interactive: false,\n zIndex: 500,\n name: `${type}-${lineIndex}`,\n style: {\n data: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const s = chart.getAllSeries()[0] as ICartesianSeries\n\n if (s) {\n const rect = s.getRegion().getLayoutRect()\n const segments: {\n areaPoints?: { x: number; y: number; y1: number }[]\n linePoints: { x: number; y: number }[]\n color: string\n }[] = []\n\n if (rect.width === 0 || rect.height === 0) {\n return segments\n }\n\n const start = s.getRegion().getLayoutStartPoint()\n const yClamper = clamper(start.y, start.y + rect.height)\n const colorAttrOptions = s.getColorAttribute()\n const groups: (string | undefined)[] = s.getSeriesKeys()\n const data = s.getViewData()?.latestData as Datum[]\n const fieldX = s.fieldX?.[0]\n const fieldY = s.fieldY?.[0]\n\n if (!groups.length) {\n groups.push(undefined)\n }\n\n groups.forEach((group) => {\n const groupData = data.filter((d: Datum) => d[colorAttrOptions?.field] === group)\n\n if (!groupData.length) {\n return\n }\n const { confidenceInterval, evaluateGrid } = regressionFunction(\n groupData,\n (datum: Datum) => datum?.[fieldX],\n (datum: Datum) => datum?.[fieldY],\n getOptions?.(line),\n )\n const N = Math.max(3, Math.floor(groupData.length / 4))\n const mainColor = color ?? colorAttrOptions?.scale?.scale(group)\n\n const lineData = evaluateGrid(N)\n const linePoints = lineData.map((ld: Datum) => {\n const d = { [fieldX]: ld.x, [fieldY]: ld.y }\n return {\n x: s.dataToPositionX(d)! + start.x,\n y: yClamper(s.dataToPositionY(d)! + start.y),\n }\n })\n\n segments.push({\n color: mainColor,\n linePoints,\n })\n\n if (confidenceIntervalVisible) {\n const intervalData = confidenceInterval(N)\n const areaPoints = intervalData.map((datum: Datum) => {\n const d = { [fieldX]: datum.x, [fieldY]: datum.lower }\n return {\n x: s.dataToPositionX(d)! + start.x,\n y: yClamper(s.dataToPositionY(d)! + start.y),\n y1: yClamper(s.dataToPositionY({ [fieldY]: datum.upper })! + start.y),\n }\n })\n\n segments[segments.length - 1].areaPoints = areaPoints\n }\n })\n\n return segments\n }\n return []\n },\n },\n children: childrenMarks,\n })\n\n if (confidenceIntervalVisible) {\n childrenMarks.push({\n type: 'area',\n interactive: false,\n zIndex: 500,\n style: {\n lineWidth: lineWidth ?? theme.lineWidth,\n lineDash: lineDash ?? theme.lineDash,\n fillOpacity: confidenceIntervalOpacity ?? theme.confidenceIntervalOpacity,\n fill: 'red', // vrender bug,必须要设置一个全局的fill,才会绘制\n segments: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.length) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n return parentNode.attribute.data.map((d: any) => {\n return {\n points: d.areaPoints ?? [],\n fill: d.color,\n }\n })\n }\n\n return []\n },\n },\n })\n }\n\n childrenMarks.push({\n type: 'line',\n interactive: false,\n zIndex: 500,\n style: {\n lineWidth: lineWidth ?? theme.lineWidth,\n lineDash: lineDash ?? theme.lineDash,\n stroke: 'red', // vrender bug,必须要设置一个全局的stroke,才会绘制\n segments: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.length) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n return parentNode.attribute.data.map((d: any) => {\n return {\n points: d.linePoints,\n stroke: d.color,\n }\n })\n }\n\n return []\n },\n },\n })\n\n if (!isNullish(text)) {\n childrenMarks.push({\n type: 'text',\n interactive: false,\n zIndex: 500,\n style: {\n textAlign: 'end',\n fill: textColor ?? theme.textColor,\n fontSize: textFontSize ?? theme.textFontSize,\n fontWeight: textFontWeight ?? theme.textFontWeight,\n text: text,\n x: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.length) {\n const point = parentNode.attribute.data[parentNode.attribute.data.length - 1].linePoints\n return point[point.length - 1]?.x\n }\n\n return undefined\n },\n y: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.length) {\n const point = parentNode.attribute.data[parentNode.attribute.data.length - 1].linePoints\n return point[point.length - 1]?.y\n }\n\n return undefined\n },\n },\n })\n }\n })\n\n return result\n }) as VChartSpecPipe\n}\n\nconst getDefaultRegressionOptions = (\n lineConfig: PolynomialRegressionLine | LinearRegressionLine | LogisticRegressionLine | LowessRegressionLine,\n) => {\n return { alpha: lineConfig?.confidenceLevel ?? 0.95 }\n}\n\nexport const linearRegressionLine: VChartSpecPipe = generateRegressionLinePipe('linearRegressionLine', regressionLinear)\nexport const lowessRegressionLine: VChartSpecPipe = generateRegressionLinePipe('lowessRegressionLine', regressionLowess)\nexport const polynomialRegressionLine: VChartSpecPipe = generateRegressionLinePipe(\n 'polynomialRegressionLine',\n regressionPolynomial,\n (lineConfig: PolynomialRegressionLine) => {\n return { ...getDefaultRegressionOptions(lineConfig), degree: lineConfig.degree ?? 2 }\n },\n)\nexport const logisticRegressionLine: VChartSpecPipe = generateRegressionLinePipe(\n 'logisticRegressionLine',\n regressionLogistic,\n)\n"],"names":["generateRegressionLinePipe","type","regressionFunction","getOptions","getDefaultRegressionOptions","spec","context","result","advancedVSeed","chartType","regressionLine","lineTheme","lineList","array","line","lineIndex","theme","color","lineWidth","lineDash","text","textColor","textFontSize","textFontWeight","confidenceIntervalOpacity","confidenceIntervalVisible","childrenMarks","datum","ctx","vchart","chart","s","rect","segments","start","yClamper","clamper","colorAttrOptions","groups","data","fieldX","fieldY","undefined","group","groupData","d","confidenceInterval","evaluateGrid","N","Math","mainColor","lineData","linePoints","ld","intervalData","areaPoints","opt","parentNode","isNullish","point","lineConfig","linearRegressionLine","regressionLinear","lowessRegressionLine","regressionLowess","polynomialRegressionLine","regressionPolynomial","logisticRegressionLine","regressionLogistic"],"mappings":";;AAqBO,MAAMA,6BAA6B,CACxCC,MACAC,oBASAC,aAAuCC,2BAA2B,GAE1D,CAACC,MAAkCC;QACzC,MAAMC,SAAS;YAAE,GAAGF,IAAI;QAAC;QACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,SAAS,EAAEC,cAAc,EAAE,GAAGF;QACtC,MAAMG,YAAYH,cAAc,MAAM,CAACC,UAAuB,EAAE;QAEhE,IAAI,CAACC,kBAAkB,CAACA,cAAc,CAACT,KAAK,EAC1C,OAAOM;QAGT,MAAMK,WAAWC,MAAMH,cAAc,CAACT,KAAK;QAE3C,IAAI,CAACM,OAAO,UAAU,EACpBA,OAAO,UAAU,GAAG,EAAE;QAGxBK,SAAS,OAAO,CAAC,CAACE,MAAMC;YACtB,MAAMC,QAASL,UAAU,oBAAoB,IAAI,CAAC;YAClD,MAAM,EACJM,KAAK,EACLC,SAAS,EACTC,QAAQ,EACRC,IAAI,EACJC,SAAS,EACTC,YAAY,EACZC,cAAc,EACdC,yBAAyB,EACzBC,4BAA4BT,MAAM,yBAAyB,EAC5D,GAAGF;YAEJ,MAAMY,gBAAuB,EAAE;YAE7BnB,OAAO,UAAU,CAAW,IAAI,CAAC;gBACjC,MAAM;gBACN,aAAa;gBACb,QAAQ;gBACR,MAAM,GAAGN,KAAK,CAAC,EAAEc,WAAW;gBAC5B,OAAO;oBACL,MAAM,CAACY,OAAYC;wBACjB,MAAMC,SAASD,IAAI,MAAM;wBACzB,MAAME,QAAQD,OAAO,QAAQ;wBAC7B,MAAME,IAAID,MAAM,YAAY,EAAE,CAAC,EAAE;wBAEjC,IAAIC,GAAG;4BACL,MAAMC,OAAOD,EAAE,SAAS,GAAG,a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MAAM,MAAM,GAAG,EAAE,EAAE;wBAClC;oBAGF;gBACF;YACF;QAEJ;QAEA,OAAOpD;IACT;AAGF,MAAMH,8BAA8B,CAClCwD,aAEO;QAAE,OAAOA,YAAY,mBAAmB;IAAK;AAG/C,MAAMC,uBAAuC7D,2BAA2B,wBAAwB8D;AAChG,MAAMC,uBAAuC/D,2BAA2B,wBAAwBgE;AAChG,MAAMC,2BAA2CjE,2BACtD,4BACAkE,sBACA,CAACN,aACQ;QAAE,GAAGxD,4BAA4BwD,WAAW;QAAE,QAAQA,WAAW,MAAM,IAAI;IAAE;AAGjF,MAAMO,yBAAyCnE,2BACpD,0BACAoE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const series: (...args:
|
|
1
|
+
import type { VChartSpecPipe, VChartSpecPipeline } from '../../../../../types';
|
|
2
|
+
export declare const series: (...args: VChartSpecPipeline[]) => VChartSpecPipe;
|
|
3
3
|
/**
|
|
4
4
|
* @description 双轴图的透视场景, 不能使用此pipe, 请使用series
|
|
5
5
|
* 因为VTable.PivotVChart会自行解析数据, 而非VChart解析.
|
|
6
6
|
*/
|
|
7
|
-
export declare const seriesDualAxis: (...args:
|
|
7
|
+
export declare const seriesDualAxis: (...args: VChartSpecPipeline[]) => VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/series/series.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/series/series.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/series/series.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/series/series.ts"],"sourcesContent":["import type { SpecPipelineContext, VChartSpecPipe, VChartSpecPipeline } from 'src/types'\nimport { execPipeline } from '../../../../utils'\nimport type { ICommonChartSpec, ILineSeriesSpec, ISpec } from '@visactor/vchart'\n\nexport const series = (...args: VChartSpecPipeline[]): VChartSpecPipe => {\n const result = {\n type: 'common',\n padding: 0,\n region: [\n {\n clip: true,\n },\n ],\n } as ICommonChartSpec\n\n return (_: Partial<ISpec>, context: SpecPipelineContext) => {\n result.series = args.map((pipeline) => {\n return execPipeline<Partial<ISpec>, SpecPipelineContext>(pipeline, context, {})\n }) as ILineSeriesSpec[]\n\n return result as Partial<ISpec>\n }\n}\n\n/**\n * @description 双轴图的透视场景, 不能使用此pipe, 请使用series\n * 因为VTable.PivotVChart会自行解析数据, 而非VChart解析.\n */\nexport const seriesDualAxis = (...args: VChartSpecPipeline[]): VChartSpecPipe => {\n const result = {\n type: 'common',\n padding: 0,\n labelLayout: 'region',\n region: [\n {\n clip: true,\n },\n ],\n } as ICommonChartSpec\n\n const createDualContext = <T extends SpecPipelineContext>(context: T, index: number): T => {\n const { advancedVSeed } = context\n const dataset = advancedVSeed.dataset[index]\n return {\n ...context,\n advancedVSeed: {\n ...advancedVSeed,\n dataset: dataset,\n },\n }\n }\n\n return (_: Partial<ISpec>, context: SpecPipelineContext) => {\n result.series = args.map((pipeline, index) => {\n const seriesContext = createDualContext(context, index)\n return execPipeline<ISpec, SpecPipelineContext>(pipeline, seriesContext, {})\n }) as ILineSeriesSpec[]\n\n return result\n }\n}\n"],"names":["series","args","result","_","context","pipeline","execPipeline","seriesDualAxis","createDualContext","index","advancedVSeed","dataset","seriesContext"],"mappings":";AAIO,MAAMA,SAAS,CAAC,GAAGC;IACxB,MAAMC,SAAS;QACb,MAAM;QACN,SAAS;QACT,QAAQ;YACN;gBACE,MAAM;YACR;SACD;IACH;IAEA,OAAO,CAACC,GAAmBC;QACzBF,OAAO,MAAM,GAAGD,KAAK,GAAG,CAAC,CAACI,WACjBC,aAAkDD,UAAUD,SAAS,CAAC;QAG/E,OAAOF;IACT;AACF;AAMO,MAAMK,iBAAiB,CAAC,GAAGN;IAChC,MAAMC,SAAS;QACb,MAAM;QACN,SAAS;QACT,aAAa;QACb,QAAQ;YACN;gBACE,MAAM;YACR;SACD;IACH;IAEA,MAAMM,oBAAoB,CAAgCJ,SAAYK;QACpE,MAAM,EAAEC,aAAa,EAAE,GAAGN;QAC1B,MAAMO,UAAUD,cAAc,OAAO,CAACD,MAAM;QAC5C,OAAO;YACL,GAAGL,OAAO;YACV,eAAe;gBACb,GAAGM,aAAa;gBAChB,SAASC;YACX;QACF;IACF;IAEA,OAAO,CAACR,GAAmBC;QACzBF,OAAO,MAAM,GAAGD,KAAK,GAAG,CAAC,CAACI,UAAUI;YAClC,MAAMG,gBAAgBJ,kBAAkBJ,SAASK;YACjD,OAAOH,aAAyCD,UAAUO,eAAe,CAAC;QAC5E;QAEA,OAAOV;IACT;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const scatterSize:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const scatterSize: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/size/scatterSize.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/size/scatterSize.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/size/scatterSize.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/size/scatterSize.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const scatterSize: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed } = context\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as {\n sizeRange: number | number[]\n size?: number | number[]\n }\n const hasSizeEncoding = encoding?.size?.[0]\n if (!hasSizeEncoding) {\n return result\n }\n\n const size = baseConfig.size ?? baseConfig.sizeRange\n\n result.size = {\n type: 'linear',\n range: Array.isArray(size) ? size : [size, size],\n } as IScatterChartSpec['size']\n\n result.sizeField = encoding?.size?.[0] || undefined\n\n return result\n}\n"],"names":["scatterSize","spec","context","result","advancedVSeed","chartType","encoding","baseConfig","hasSizeEncoding","size","Array","undefined"],"mappings":"AAGO,MAAMA,cAA8B,CAACC,MAAMC;IAChD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGF;IAChC,MAAMG,aAAaH,cAAc,MAAM,CAACC,UAAU;IAIlD,MAAMG,kBAAkBF,UAAU,MAAM,CAAC,EAAE;IAC3C,IAAI,CAACE,iBACH,OAAOL;IAGT,MAAMM,OAAOF,WAAW,IAAI,IAAIA,WAAW,SAAS;IAEpDJ,OAAO,IAAI,GAAG;QACZ,MAAM;QACN,OAAOO,MAAM,OAAO,CAACD,QAAQA,OAAO;YAACA;YAAMA;SAAK;IAClD;IAEAN,OAAO,SAAS,GAAGG,UAAU,MAAM,CAAC,EAAE,IAAIK;IAE1C,OAAOR;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const stackInverse:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const stackInverse: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/stack/stack.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/stack/stack.ts"],"sourcesContent":["import type { IAreaChartSpec, IBarChartSpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/stack/stack.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/stack/stack.ts"],"sourcesContent":["import type { IAreaChartSpec, IBarChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const stackInverse: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IAreaChartSpec | IBarChartSpec\n result.stackInverse = true\n return result\n}\n"],"names":["stackInverse","spec","result"],"mappings":"AAGO,MAAMA,eAA+B,CAACC;IAC3C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IACzBC,OAAO,YAAY,GAAG;IACtB,OAAOA;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const stackCornerRadius:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const stackCornerRadius: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/stack/stackCornerRadius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/stack/stackCornerRadius.ts"],"sourcesContent":["import type { Datum,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/stack/stackCornerRadius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/stack/stackCornerRadius.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport type { Datum, VChartSpecPipe, StackCornerRadius } from 'src/types'\n\nexport const stackCornerRadius: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const stackCornerRadius = advancedVSeed.config?.[chartType as 'column']?.stackCornerRadius as StackCornerRadius\n const { datasetReshapeInfo } = advancedVSeed\n const { foldInfo } = datasetReshapeInfo[0]\n\n if (chartType === 'dualAxis' && (spec as any).type !== 'bar') {\n return spec\n }\n\n return {\n ...spec,\n stackCornerRadius: (_: unknown, datum: Datum) => {\n if (datum[foldInfo.measureValue] > 0) {\n return stackCornerRadius\n }\n\n return 0\n },\n } as IBarChartSpec\n}\n"],"names":["stackCornerRadius","spec","context","advancedVSeed","vseed","chartType","datasetReshapeInfo","foldInfo","_","datum"],"mappings":"AAGO,MAAMA,sCAAoC,CAACC,MAAMC;IACtD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAMJ,oBAAoBG,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IACzE,MAAM,EAAEC,kBAAkB,EAAE,GAAGH;IAC/B,MAAM,EAAEI,QAAQ,EAAE,GAAGD,kBAAkB,CAAC,EAAE;IAE1C,IAAID,AAAc,eAAdA,aAA6BJ,AAAsB,UAAtBA,KAAa,IAAI,EAChD,OAAOA;IAGT,OAAO;QACL,GAAGA,IAAI;QACP,mBAAmB,CAACO,GAAYC;YAC9B,IAAIA,KAAK,CAACF,SAAS,YAAY,CAAC,GAAG,GACjC,OAAOP;YAGT,OAAO;QACT;IACF;AACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Dimensions, FoldInfo, Measures,
|
|
2
|
-
export declare const tooltip:
|
|
1
|
+
import type { Dimensions, FoldInfo, Measures, VChartSpecPipe, UnfoldInfo } from '../../../../../types';
|
|
2
|
+
export declare const tooltip: VChartSpecPipe;
|
|
3
3
|
export declare const createDimensionContent: (dimensions: Dimensions, measures: Measures, foldInfo: FoldInfo, unfoldInfo: UnfoldInfo) => {
|
|
4
4
|
visible: boolean;
|
|
5
5
|
shapeType: string;
|
|
6
6
|
hasShape: boolean;
|
|
7
|
-
key:
|
|
7
|
+
key: (v: unknown) => string;
|
|
8
8
|
value: (v: unknown) => string;
|
|
9
9
|
}[];
|
|
10
10
|
export declare const createMarkContent: (tooltip: string[], dimensions: Dimensions, measures: Measures, foldInfo: FoldInfo, unfoldInfo: UnfoldInfo) => ({
|
|
@@ -44,7 +44,11 @@ const createDimensionContent = (dimensions, measures, foldInfo, unfoldInfo)=>{
|
|
|
44
44
|
const datum = v;
|
|
45
45
|
const key = datum && datum[encodingColor] || '';
|
|
46
46
|
return unfoldInfo.colorIdMap[key].alias ?? key;
|
|
47
|
-
} :
|
|
47
|
+
} : (v)=>{
|
|
48
|
+
const datum = v;
|
|
49
|
+
const key = datum && datum[measureId] || '';
|
|
50
|
+
return foldMap[key] ?? key;
|
|
51
|
+
},
|
|
48
52
|
value: (v)=>{
|
|
49
53
|
const datum = v;
|
|
50
54
|
if (!datum) return '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltip.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltip.ts"],"sourcesContent":["import { pipe, uniqueBy } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures, findMeasureById } from '../../../../utils'\nimport type { Datum, Dimensions, FoldInfo, Measures,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltip.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltip.ts"],"sourcesContent":["import { pipe, uniqueBy } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures, findMeasureById } from '../../../../utils'\nimport type { Datum, Dimensions, FoldInfo, Measures, VChartSpecPipe, TooltipConfig, UnfoldInfo } from 'src/types'\nimport { ORIGINAL_DATA } from 'src/dataReshape'\nimport { getTooltipStyle } from './tooltipStyle'\n\nexport const tooltip: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed, vseed } = context\n const { measures, datasetReshapeInfo, chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: TooltipConfig }\n const { tooltip = { enable: true } } = baseConfig\n const { enable = true } = tooltip\n const { foldInfo, unfoldInfo } = datasetReshapeInfo[0] as unknown as {\n foldInfo: FoldInfo\n unfoldInfo: UnfoldInfo\n }\n\n result.tooltip = {\n style: getTooltipStyle(tooltip),\n visible: !!enable,\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(\n encoding.tooltip || [],\n dimensions,\n findAllMeasures(vseed.measures),\n foldInfo,\n unfoldInfo,\n ),\n },\n dimension: {\n title: {\n visible: true,\n },\n content: createDimensionContent(dimensions, measures, foldInfo, unfoldInfo),\n },\n }\n return result\n}\n\nexport const createDimensionContent = (\n dimensions: Dimensions,\n measures: Measures,\n foldInfo: FoldInfo,\n unfoldInfo: UnfoldInfo,\n) => {\n const { measureId, measureValue, foldMap } = foldInfo\n const { encodingColor } = unfoldInfo\n\n return [\n {\n visible: true,\n shapeType: 'rectRound',\n hasShape: true,\n key: dimensions.some((d) => d.encoding === 'color')\n ? (v: unknown) => {\n const datum = v as Datum\n const key = (datum && (datum[encodingColor] as string)) || ''\n return unfoldInfo.colorIdMap[key].alias ?? key\n }\n : (v: unknown) => {\n const datum = v as Datum\n const key = (datum && (datum[measureId] as string)) || ''\n return foldMap[key] ?? key\n },\n value: (v: unknown) => {\n const datum = v as Datum\n if (!datum) {\n return ''\n }\n const value = datum[measureValue] as string | number\n const id = datum[measureId] as string\n const measure = findMeasureById(measures, id)\n const formatter = createFormatterByMeasure(measure)\n return formatter(value)\n },\n },\n ]\n}\n\nexport const createMarkContent = (\n tooltip: string[],\n dimensions: Dimensions,\n measures: Measures,\n foldInfo: FoldInfo,\n unfoldInfo: UnfoldInfo,\n) => {\n const dims = pipe(\n dimensions.filter((item) => tooltip.includes(item.id)),\n uniqueBy((item) => item.id),\n uniqueBy((item) => item.alias),\n )\n const meas = pipe(\n measures.filter((item) => tooltip.includes(item.id)),\n uniqueBy((item) => item.id),\n uniqueBy((item) => item.alias),\n )\n\n const dimContent = dims.map((item) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: (v: unknown) => {\n const datum = v as Datum\n if (item.alias || item.id) {\n return item.alias || item.id\n }\n return datum && (datum[item.id] as string)\n },\n value: (v: unknown) => {\n const datum = v as Datum\n return datum && (datum[item.id] as string)\n },\n }))\n\n const meaContent = meas.map((item) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: item.alias || item.id,\n value: (v: unknown) => {\n const datum = v as Datum\n if (!datum) {\n return ''\n }\n const id = item.id\n if (!datum || !datum[ORIGINAL_DATA] || !datum[ORIGINAL_DATA]) {\n return ''\n }\n const originalData = datum[ORIGINAL_DATA] as Datum\n const value = originalData[id] as string | number\n const measure = findMeasureById(measures, id)\n const formatter = createFormatterByMeasure(measure)\n return formatter(value)\n },\n }))\n\n const defaultContent = {\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: (v: unknown) => {\n const { measureName } = foldInfo\n const { encodingColor: colorName } = unfoldInfo\n\n const datum = v as Datum\n return (datum && (datum[measureName || colorName] as string)) || ''\n },\n value: (v: unknown) => {\n const { measureId, measureValue } = foldInfo\n\n const datum = v as Datum\n if (!datum) {\n return ''\n }\n const value = datum[measureValue] as string | number\n const id = datum[measureId] as string\n const measure = findMeasureById(measures, id)\n if (!measure) {\n return String(value)\n }\n\n const formatter = createFormatterByMeasure(measure)\n return formatter(value)\n },\n }\n\n return [...dimContent, defaultContent, ...meaContent]\n}\n"],"names":["tooltip","spec","context","result","advancedVSeed","vseed","measures","datasetReshapeInfo","chartType","dimensions","encoding","baseConfig","enable","foldInfo","unfoldInfo","getTooltipStyle","createMarkContent","findAllMeasures","createDimensionContent","measureId","measureValue","foldMap","encodingColor","d","v","datum","key","value","id","measure","findMeasureById","formatter","createFormatterByMeasure","dims","pipe","item","uniqueBy","meas","dimContent","meaContent","ORIGINAL_DATA","originalData","defaultContent","measureName","colorName","String"],"mappings":";;;;AAMO,MAAMA,kBAA0B,CAACC,MAAMC;IAC5C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,QAAQ,EAAEC,kBAAkB,EAAEC,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGN;IAC1E,MAAMO,aAAaP,cAAc,MAAM,CAACI,UAAU;IAClD,MAAM,EAAER,UAAU;QAAE,QAAQ;IAAK,CAAC,EAAE,GAAGW;IACvC,MAAM,EAAEC,SAAS,IAAI,EAAE,GAAGZ;IAC1B,MAAM,EAAEa,QAAQ,EAAEC,UAAU,EAAE,G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;QACrB,SAAS;QACT,UAAU;QACV,WAAW;QACX,KAAK,CAAClB;YACJ,MAAM,EAAEmB,WAAW,EAAE,GAAG9B;YACxB,MAAM,EAAE,eAAe+B,SAAS,EAAE,GAAG9B;YAErC,MAAMW,QAAQD;YACd,OAAQC,SAAUA,KAAK,CAACkB,eAAeC,UAAU,IAAgB;QACnE;QACA,OAAO,CAACpB;YACN,MAAM,EAAEL,SAAS,EAAEC,YAAY,EAAE,GAAGP;YAEpC,MAAMY,QAAQD;YACd,IAAI,CAACC,OACH,OAAO;YAET,MAAME,QAAQF,KAAK,CAACL,aAAa;YACjC,MAAMQ,KAAKH,KAAK,CAACN,UAAU;YAC3B,MAAMU,UAAUC,gBAAgBxB,UAAUsB;YAC1C,IAAI,CAACC,SACH,OAAOgB,OAAOlB;YAGhB,MAAMI,YAAYC,yBAAyBH;YAC3C,OAAOE,UAAUJ;QACnB;IACF;IAEA,OAAO;WAAIW;QAAYI;WAAmBH;KAAW;AACvD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const tooltipBoxplot:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const tooltipBoxplot: VChartSpecPipe;
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { isNullish, pipe, uniqueBy } from "remeda";
|
|
2
2
|
import { createFormatterByMeasure, findAllMeasures } from "../../../../utils/index.js";
|
|
3
|
-
import { ColorEncoding,
|
|
3
|
+
import { ColorEncoding, LowerWhisker, MedianMeasureId, OutliersMeasureId, Q1MeasureValue, Q3MeasureValue, UpperWhisker, XEncoding } from "../../../../../dataReshape/index.js";
|
|
4
4
|
import { getTooltipStyle } from "./tooltipStyle.js";
|
|
5
|
+
import { intl } from "../../../../../i18n/index.js";
|
|
5
6
|
const boxPlotMeasureKeys = [
|
|
6
|
-
|
|
7
|
+
UpperWhisker,
|
|
7
8
|
Q3MeasureValue,
|
|
8
9
|
MedianMeasureId,
|
|
9
10
|
Q1MeasureValue,
|
|
10
|
-
|
|
11
|
+
LowerWhisker
|
|
11
12
|
];
|
|
13
|
+
const measureAliasMapping = {
|
|
14
|
+
[OutliersMeasureId]: intl.i18n`异常点`,
|
|
15
|
+
[UpperWhisker]: intl.i18n`上边界`,
|
|
16
|
+
[Q3MeasureValue]: intl.i18n`上四分位数`,
|
|
17
|
+
[MedianMeasureId]: intl.i18n`中位数`,
|
|
18
|
+
[Q1MeasureValue]: intl.i18n`下四分位数`,
|
|
19
|
+
[LowerWhisker]: intl.i18n`下边界`
|
|
20
|
+
};
|
|
12
21
|
const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
13
22
|
const tooltipBoxplot = (spec, context)=>{
|
|
14
23
|
const result = {
|
|
@@ -40,7 +49,7 @@ const tooltipBoxplot = (spec, context)=>{
|
|
|
40
49
|
const formatter = outerlierMeasure ? createFormatterByMeasure(outerlierMeasure) : defaultFormatter;
|
|
41
50
|
tooltipItems.push({
|
|
42
51
|
...tooltipItems[0],
|
|
43
|
-
key: outerlierMeasure?.alias ?? OutliersMeasureId,
|
|
52
|
+
key: outerlierMeasure?.alias ?? measureAliasMapping[OutliersMeasureId],
|
|
44
53
|
value: formatter(datum?.[VCHART_OUTLIER_KEY])
|
|
45
54
|
});
|
|
46
55
|
return tooltipItems;
|
|
@@ -52,7 +61,7 @@ const tooltipBoxplot = (spec, context)=>{
|
|
|
52
61
|
return {
|
|
53
62
|
...entry,
|
|
54
63
|
value: formatter(datum?.[entry.key]),
|
|
55
|
-
key: mea?.alias ?? entry.key
|
|
64
|
+
key: mea?.alias ?? measureAliasMapping[entry?.key] ?? entry.key
|
|
56
65
|
};
|
|
57
66
|
}
|
|
58
67
|
return entry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.ts"],"sourcesContent":["import { pipe, uniqueBy, isNullish } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures } from '../../../../utils'\nimport type { Dimension, Dimensions, Encoding,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.ts"],"sourcesContent":["import { pipe, uniqueBy, isNullish } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures } from '../../../../utils'\nimport type { Dimension, Dimensions, Encoding, VChartSpecPipe, Tooltip } from 'src/types'\nimport type { Datum, ISpec, ITooltipLinePattern, ITooltipLineActual, TooltipData } from '@visactor/vchart'\nimport {\n ColorEncoding,\n LowerWhisker,\n MedianMeasureId,\n OutliersMeasureId,\n Q1MeasureValue,\n Q3MeasureValue,\n UpperWhisker,\n XEncoding,\n} from 'src/dataReshape'\nimport { getTooltipStyle } from './tooltipStyle'\nimport { intl } from 'src/i18n'\n\nconst boxPlotMeasureKeys = [UpperWhisker, Q3MeasureValue, MedianMeasureId, Q1MeasureValue, LowerWhisker]\nconst measureAliasMapping: Record<string, string> = {\n [OutliersMeasureId]: intl.i18n`异常点`,\n [UpperWhisker]: intl.i18n`上边界`,\n [Q3MeasureValue]: intl.i18n`上四分位数`,\n [MedianMeasureId]: intl.i18n`中位数`,\n [Q1MeasureValue]: intl.i18n`下四分位数`,\n [LowerWhisker]: intl.i18n`下边界`,\n}\nconst VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE'\n\nexport const tooltipBoxplot: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed, vseed } = context\n const { chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n const meas = findAllMeasures(vseed.measures)\n const valueMeasure = meas.find((item) => item.encoding === 'value' || isNullish(item.encoding))\n const defaultFormatter = valueMeasure ? createFormatterByMeasure(valueMeasure) : (v: unknown) => v\n\n result.tooltip = {\n visible: enable,\n style: getTooltipStyle(tooltip),\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(encoding.tooltip || [], dimensions, encoding as Encoding),\n updateContent: (prev: ITooltipLineActual[] | undefined, data: TooltipData | undefined) => {\n const datum = (data as any)?.[0]?.datum?.[0]\n\n if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {\n const tooltipItems: ITooltipLineActual[] = (prev ?? []).filter(\n (item: any) => !boxPlotMeasureKeys.includes(item.key as string),\n )\n const outerlierMeasure = meas.find((item) => item.id === OutliersMeasureId)\n const formatter = outerlierMeasure ? createFormatterByMeasure(outerlierMeasure) : defaultFormatter\n\n tooltipItems.push({\n ...(tooltipItems[0] as any),\n key: outerlierMeasure?.alias ?? measureAliasMapping[OutliersMeasureId],\n value: formatter(datum?.[VCHART_OUTLIER_KEY] as number) as string,\n } as ITooltipLineActual)\n\n return tooltipItems\n }\n\n return (prev ?? []).map((entry) => {\n if (boxPlotMeasureKeys.includes((entry as any).key as string)) {\n const mea = meas.find((item) => item.id === (entry as any).key)\n const formatter = mea ? createFormatterByMeasure(mea) : defaultFormatter\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return {\n ...(entry as any),\n value: formatter(datum?.[(entry as any).key] as number) as string,\n key: mea?.alias ?? measureAliasMapping[entry?.key as string] ?? (entry as any).key,\n }\n }\n\n return entry\n }) as ITooltipLineActual[]\n },\n },\n dimension: {\n visible: false,\n },\n }\n return result as unknown as ISpec\n}\n\nconst createMarkContent = (tooltip: string[], dimensions: Dimensions, encoding: Encoding) => {\n const dims = pipe(\n dimensions.filter((item) => tooltip.includes(item.id)),\n uniqueBy((item: Dimension) => item.id),\n uniqueBy((item: Dimension) => item.alias),\n )\n\n const dimContent = dims.map((item: Dimension) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: item.alias ?? item.id,\n value: (datum: Datum | undefined) => {\n if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {\n if (encoding.color?.includes(item.id)) {\n return datum?.[ColorEncoding] as string\n }\n if (encoding.x?.includes(item.id)) {\n return datum?.[XEncoding] as string\n }\n }\n\n return datum?.[item.id] as string\n },\n }))\n\n const defaultContent = boxPlotMeasureKeys.map((key: string) => {\n return {\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key,\n value: (datum: Datum | undefined) => {\n if (!datum) {\n return ''\n }\n return datum[key] as string | number\n },\n }\n })\n\n return [...dimContent, defaultContent] as ITooltipLinePattern[]\n}\n"],"names":["boxPlotMeasureKeys","UpperWhisker","Q3MeasureValue","MedianMeasureId","Q1MeasureValue","LowerWhisker","measureAliasMapping","OutliersMeasureId","intl","VCHART_OUTLIER_KEY","tooltipBoxplot","spec","context","result","advancedVSeed","vseed","chartType","dimensions","encoding","baseConfig","tooltip","enable","meas","findAllMeasures","valueMeasure","item","isNullish","defaultFormatter","createFormatterByMeasure","v","getTooltipStyle","createMarkContent","prev","data","datum","tooltipItems","outerlierMeasure","formatter","entry","mea","dims","pipe","uniqueBy","dimContent","ColorEncoding","XEncoding","defaultContent","key"],"mappings":";;;;;AAiBA,MAAMA,qBAAqB;IAACC;IAAcC;IAAgBC;IAAiBC;IAAgBC;CAAa;AACxG,MAAMC,sBAA8C;IAClD,CAACC,kBAAkB,EAAEC,KAAK,IAAI,CAAC,GAAG,CAAC;IACnC,CAACP,aAAa,EAAEO,KAAK,IAAI,CAAC,GAAG,CAAC;IAC9B,CAACN,eAAe,EAAEM,KAAK,IAAI,CAAC,KAAK,CAAC;IAClC,CAACL,gBAAgB,EAAEK,KAAK,IAAI,CAAC,GAAG,CAAC;IACjC,CAACJ,eAAe,EAAEI,KAAK,IAAI,CAAC,KAAK,CAAC;IAClC,CAACH,aAAa,EAAEG,KAAK,IAAI,CAAC,GAAG,CAAC;AAChC;AACA,MAAMC,qBAAqB;AAEpB,MAAMC,iBAAiC,CAACC,MAAMC;IACnD,MA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BAAmB,GAAG,CAAC,CAAC+C,MACtC;YACL,SAAS;YACT,UAAU;YACV,WAAW;YACXA;YACA,OAAO,CAACb;gBACN,IAAI,CAACA,OACH,OAAO;gBAET,OAAOA,KAAK,CAACa,IAAI;YACnB;QACF;IAGF,OAAO;WAAIJ;QAAYG;KAAe;AACxC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const tooltipPrimary:
|
|
3
|
-
export declare const tooltipSecondary:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const tooltipPrimary: VChartSpecPipe;
|
|
3
|
+
export declare const tooltipSecondary: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.ts"],"sourcesContent":["import { isNullish } from 'remeda'\nimport { createDimensionContent, createMarkContent } from './tooltip'\nimport type { FoldInfo,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.ts"],"sourcesContent":["import { isNullish } from 'remeda'\nimport { createDimensionContent, createMarkContent } from './tooltip'\nimport type { FoldInfo, VChartSpecPipe, Tooltip, UnfoldInfo } from 'src/types'\nimport { findAllMeasures } from 'src/pipeline/utils'\nimport { getTooltipStyle } from './tooltipStyle'\n\nexport const tooltipPrimary: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed, vseed } = context\n const { measures, datasetReshapeInfo, chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n const unfoldInfo = datasetReshapeInfo[0].unfoldInfo\n\n result.tooltip = {\n style: getTooltipStyle(tooltip),\n visible: enable,\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(\n encoding.tooltip || [],\n dimensions,\n findAllMeasures(vseed.measures),\n foldInfoList[0],\n unfoldInfo,\n ),\n },\n dimension: {\n title: {\n visible: true,\n },\n content: createDimensionContent(dimensions, measures, foldInfoList[0], unfoldInfo),\n },\n }\n return result\n}\n\nexport const tooltipSecondary: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed, vseed } = context\n const { measures, datasetReshapeInfo, chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n\n if (isNullish(datasetReshapeInfo[0].foldInfoList?.[1])) {\n return result\n }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n const unfoldInfo = datasetReshapeInfo[0].unfoldInfo as UnfoldInfo\n result.tooltip = {\n visible: enable,\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(\n encoding.tooltip || [],\n dimensions,\n findAllMeasures(vseed.measures),\n foldInfoList[1],\n unfoldInfo,\n ),\n },\n dimension: {\n title: {\n visible: true,\n },\n content: createDimensionContent(dimensions, measures, foldInfoList[1], unfoldInfo),\n },\n }\n return result\n}\n"],"names":["tooltipPrimary","spec","context","result","advancedVSeed","vseed","measures","datasetReshapeInfo","chartType","dimensions","encoding","baseConfig","tooltip","enable","foldInfoList","unfoldInfo","getTooltipStyle","createMarkContent","findAllMeasures","createDimensionContent","tooltipSecondary","isNullish"],"mappings":";;;;AAMO,MAAMA,iBAAiC,CAACC,MAAMC;IACnD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,QAAQ,EAAEC,kBAAkB,EAAEC,SAAS,EAAEC,UAAU,EAAEC,QAA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T,MAAM;YACJ,OAAO;gBACL,SAAS;YACX;YACA,SAASI,kBACPP,SAAS,OAAO,IAAI,EAAE,EACtBD,YACAS,gBAAgBb,MAAM,QAAQ,GAC9BS,YAAY,CAAC,EAAE,EACfC;QAEJ;QACA,WAAW;YACT,OAAO;gBACL,SAAS;YACX;YACA,SAASI,uBAAuBV,YAAYH,UAAUQ,YAAY,CAAC,EAAE,EAAEC;QACzE;IACF;IACA,OAAOZ;AACT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Dimensions, FoldInfo, Locale, Measures,
|
|
2
|
-
export declare const tooltipHeatmap:
|
|
1
|
+
import type { Dimensions, FoldInfo, Locale, Measures, VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const tooltipHeatmap: VChartSpecPipe;
|
|
3
3
|
export declare const createMarkContent: (tooltip: string[], dimensions: Dimensions, measures: Measures, locale: Locale, foldInfo: FoldInfo) => ({
|
|
4
4
|
visible: boolean;
|
|
5
5
|
hasShape: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures, findMeasureById } from '../../../../utils'\nimport type { Datum, Dimensions, FoldInfo, Locale, Measures,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures, findMeasureById } from '../../../../utils'\nimport type { Datum, Dimensions, FoldInfo, Locale, Measures, VChartSpecPipe, Tooltip, UnfoldInfo } from 'src/types'\nimport { ORIGINAL_DATA } from 'src/dataReshape'\nimport { getTooltipStyle } from './tooltipStyle'\n\nexport const tooltipHeatmap: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, chartType, locale, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n const { foldInfo } = datasetReshapeInfo[0] as unknown as {\n foldInfo: FoldInfo\n unfoldInfo: UnfoldInfo\n }\n\n result.tooltip = {\n style: getTooltipStyle(tooltip),\n visible: enable,\n\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(encoding.tooltip || [], dimensions, findAllMeasures(vseed.measures), locale, foldInfo),\n },\n dimension: {\n visible: false,\n },\n }\n return result\n}\n\nexport const createMarkContent = (\n tooltip: string[],\n dimensions: Dimensions,\n measures: Measures,\n locale: Locale,\n foldInfo: FoldInfo,\n) => {\n const dims = uniqueBy(\n dimensions.filter((item) => tooltip.includes(item.id)),\n (item) => item.id,\n )\n const meas = uniqueBy(\n measures.filter((item) => tooltip.includes(item.id)),\n (item) => item.id,\n )\n\n const dimContent = dims.map((item) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: (v: unknown) => {\n const datum = v as Datum\n if (item.alias || item.id) {\n return item.alias || item.id\n }\n return datum && (datum[item.id] as string)\n },\n value: (v: unknown) => {\n const datum = v as Datum\n return datum && (datum[item.id] as string)\n },\n }))\n\n const meaContent = meas.map((item) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: item.alias || item.id,\n value: (v: unknown) => {\n const datum = v as Datum\n if (!datum) {\n return ''\n }\n const id = item.id\n if (!datum || !datum[ORIGINAL_DATA] || !datum[ORIGINAL_DATA]) {\n return ''\n }\n const originalData = datum[ORIGINAL_DATA] as Datum\n const value = originalData[id] as string | number\n const measure = findMeasureById(measures, id)\n const formatter = createFormatterByMeasure(measure)\n return formatter(value)\n },\n }))\n\n const foldMeaContent = [foldInfo].map((foldInfo) => {\n return {\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: (v: unknown) => {\n const { measureId, foldMap } = foldInfo\n const datum = v as Datum\n const id = datum[measureId] as string\n return foldMap[id] || id\n },\n value: (v: unknown) => {\n const { measureId, measureValue } = foldInfo\n\n const datum = v as Datum\n if (!datum) {\n return ''\n }\n const value = datum[measureValue] as string | number\n const id = datum[measureId] as string\n const measure = findMeasureById(measures, id)\n const formatter = createFormatterByMeasure(measure)\n return formatter(value)\n },\n }\n })\n return [...dimContent, ...foldMeaContent, ...meaContent]\n}\n"],"names":["tooltipHeatmap","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","locale","dimensions","encoding","baseConfig","tooltip","enable","foldInfo","getTooltipStyle","createMarkContent","findAllMeasures","measures","dims","uniqueBy","item","meas","dimContent","v","datum","meaContent","id","ORIGINAL_DATA","originalData","value","measure","findMeasureById","formatter","createFormatterByMeasure","foldMeaContent","measureId","foldMap","measureValue"],"mappings":";;;;AAMO,MAAMA,iBAAiC,CAACC,MAAMC;IACnD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,SAAS,EAAEC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGN;IACxE,MAAMO,aAAaP,cAAc,MAAM,CAACG,UAAU;IAClD,MAAM,EAAEK,UAAU;QAAE,QAAQ;IAAK,CAAC,EAAE,GAAGD;IACvC,MAAM,EAAEE,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,QAAQ,EAAE,GAAGR,kBAAkB,CAAC,EAAE;IAK1CH,OAAO,OAAO,GAAG;QACf,OAAOY,gBAAgBH;QACvB,SAASC;QAET,MAAM;YACJ,OAAO;gBACL,SAAS;YACX;YACA,SAASG,kBAAkBN,SAAS,OAAO,IAAI,EAAE,EAAED,YAAYQ,gBAAgBZ,MAAM,QAAQ,GAAGG,QAAQM;Q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,MAAMK,iBAAiB;QAACrB;KAAS,CAAC,GAAG,CAAC,CAACA,WAC9B;YACL,SAAS;YACT,UAAU;YACV,WAAW;YACX,KAAK,CAACU;gBACJ,MAAM,EAAEY,SAAS,EAAEC,OAAO,EAAE,GAAGvB;gBAC/B,MAAMW,QAAQD;gBACd,MAAMG,KAAKF,KAAK,CAACW,UAAU;gBAC3B,OAAOC,OAAO,CAACV,GAAG,IAAIA;YACxB;YACA,OAAO,CAACH;gBACN,MAAM,EAAEY,SAAS,EAAEE,YAAY,EAAE,GAAGxB;gBAEpC,MAAMW,QAAQD;gBACd,IAAI,CAACC,OACH,OAAO;gBAET,MAAMK,QAAQL,KAAK,CAACa,aAAa;gBACjC,MAAMX,KAAKF,KAAK,CAACW,UAAU;gBAC3B,MAAML,UAAUC,gBAAgBd,UAAUS;gBAC1C,MAAMM,YAAYC,yBAAyBH;gBAC3C,OAAOE,UAAUH;YACnB;QACF;IAEF,OAAO;WAAIP;WAAeY;WAAmBT;KAAW;AAC1D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const tooltipHistogram:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const tooltipHistogram: VChartSpecPipe;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isNullish, pipe, uniqueBy } from "remeda";
|
|
2
2
|
import { BinEndMeasureId, BinStartMeasureId, ColorEncoding, FoldMeasureValue, XEncoding } from "../../../../../dataReshape/index.js";
|
|
3
3
|
import { getTooltipStyle } from "./tooltipStyle.js";
|
|
4
|
+
import { getDefaultXFormatterOfHistogram } from "../../utils/histogram.js";
|
|
4
5
|
const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
5
6
|
const tooltipHistogram = (spec, context)=>{
|
|
6
7
|
const result = {
|
|
@@ -13,6 +14,7 @@ const tooltipHistogram = (spec, context)=>{
|
|
|
13
14
|
enable: true
|
|
14
15
|
} } = baseConfig;
|
|
15
16
|
const { enable } = tooltip;
|
|
17
|
+
const defaultXFormatter = getDefaultXFormatterOfHistogram(advancedVSeed);
|
|
16
18
|
result.tooltip = {
|
|
17
19
|
style: getTooltipStyle(tooltip),
|
|
18
20
|
visible: enable,
|
|
@@ -20,18 +22,18 @@ const tooltipHistogram = (spec, context)=>{
|
|
|
20
22
|
title: {
|
|
21
23
|
visible: false
|
|
22
24
|
},
|
|
23
|
-
content: createMarkContent(encoding.tooltip || [], dimensions, encoding)
|
|
25
|
+
content: createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter)
|
|
24
26
|
},
|
|
25
27
|
dimension: {
|
|
26
28
|
title: {
|
|
27
29
|
visible: false
|
|
28
30
|
},
|
|
29
|
-
content: createMarkContent(encoding.tooltip || [], dimensions, encoding)
|
|
31
|
+
content: createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter)
|
|
30
32
|
}
|
|
31
33
|
};
|
|
32
34
|
return result;
|
|
33
35
|
};
|
|
34
|
-
const createMarkContent = (tooltip, dimensions, encoding)=>{
|
|
36
|
+
const createMarkContent = (tooltip, dimensions, encoding, dimFormatter)=>{
|
|
35
37
|
const dims = pipe(dimensions.filter((item)=>tooltip.includes(item.id)), uniqueBy((item)=>item.id), uniqueBy((item)=>item.alias));
|
|
36
38
|
const dimContent = dims.map((item)=>({
|
|
37
39
|
visible: true,
|
|
@@ -53,7 +55,7 @@ const createMarkContent = (tooltip, dimensions, encoding)=>{
|
|
|
53
55
|
shapeType: 'rectRound',
|
|
54
56
|
key: (datum)=>{
|
|
55
57
|
if (!datum) return '';
|
|
56
|
-
return
|
|
58
|
+
return `[${dimFormatter(+datum[BinStartMeasureId])}, ${dimFormatter(+datum[BinEndMeasureId])})`;
|
|
57
59
|
},
|
|
58
60
|
value: (datum)=>{
|
|
59
61
|
if (!datum) return '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.ts"],"sourcesContent":["import { pipe, uniqueBy, isNullish } from 'remeda'\nimport type { Dimension, Dimensions, Encoding,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.ts"],"sourcesContent":["import { pipe, uniqueBy, isNullish } from 'remeda'\nimport type { Dimension, Dimensions, Encoding, VChartSpecPipe, Tooltip } from 'src/types'\nimport type { Datum, ISpec, ITooltipLinePattern } from '@visactor/vchart'\nimport { BinEndMeasureId, BinStartMeasureId, ColorEncoding, FoldMeasureValue, XEncoding } from 'src/dataReshape'\nimport { getTooltipStyle } from './tooltipStyle'\nimport { getDefaultXFormatterOfHistogram } from '../../utils/histogram'\n\nconst VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE'\n\nexport const tooltipHistogram: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n const defaultXFormatter = getDefaultXFormatterOfHistogram(advancedVSeed)\n\n result.tooltip = {\n style: getTooltipStyle(tooltip),\n visible: enable,\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(encoding.tooltip || [], dimensions, encoding as Encoding, defaultXFormatter),\n },\n dimension: {\n title: {\n visible: false,\n },\n content: createMarkContent(encoding.tooltip || [], dimensions, encoding as Encoding, defaultXFormatter),\n },\n }\n return result as unknown as ISpec\n}\n\nconst createMarkContent = (\n tooltip: string[],\n dimensions: Dimensions,\n encoding: Encoding,\n dimFormatter: (value: number) => string,\n) => {\n const dims = pipe(\n dimensions.filter((item) => tooltip.includes(item.id)),\n uniqueBy((item: Dimension) => item.id),\n uniqueBy((item: Dimension) => item.alias),\n )\n\n const dimContent = dims.map((item: Dimension) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: item.alias ?? item.id,\n value: (datum: Datum | undefined) => {\n if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {\n if (encoding.color?.includes(item.id)) {\n return datum?.[ColorEncoding] as string\n }\n if (encoding.x?.includes(item.id)) {\n return datum?.[XEncoding] as string\n }\n }\n\n return datum?.[item.id] as string\n },\n }))\n\n const defaultContent = [\n {\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: (datum: Datum | undefined) => {\n if (!datum) {\n return ''\n }\n return `[${dimFormatter(+datum[BinStartMeasureId])}, ${dimFormatter(+datum[BinEndMeasureId])})`\n },\n value: (datum: Datum | undefined) => {\n if (!datum) {\n return ''\n }\n return datum[FoldMeasureValue] as string | number\n },\n },\n ]\n\n return [...dimContent, defaultContent] as ITooltipLinePattern[]\n}\n"],"names":["VCHART_OUTLIER_KEY","tooltipHistogram","spec","context","result","advancedVSeed","chartType","dimensions","encoding","baseConfig","tooltip","enable","defaultXFormatter","getDefaultXFormatterOfHistogram","getTooltipStyle","createMarkContent","dimFormatter","dims","pipe","item","uniqueBy","dimContent","datum","isNullish","ColorEncoding","XEncoding","defaultContent","BinStartMeasureId","BinEndMeasureId","FoldMeasureValue"],"mappings":";;;;AAOA,MAAMA,qBAAqB;AAEpB,MAAMC,mBAAmC,CAACC,MAAMC;IACrD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IAC5C,MAAMI,aAAaJ,cAAc,MAAM,CAACC,UAAU;IAClD,MAAM,EAAEI,UAAU;QAAE,QAAQ;IAAK,CAAC,EAAE,GAAGD;IACvC,MAAM,EAAEE,MAAM,EAAE,GAAGD;IACnB,MAAME,oBAAoBC,gCAAgCR;IAE1DD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,OACH,OAAO;gBAET,OAAOA,KAAK,CAACO,iBAAiB;YAChC;QACF;KACD;IAED,OAAO;WAAIR;QAAYK;KAAe;AACxC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Dimensions, FoldInfo, Locale, Measures,
|
|
2
|
-
export declare const tooltipScatter:
|
|
1
|
+
import type { Dimensions, FoldInfo, Locale, Measures, VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const tooltipScatter: VChartSpecPipe;
|
|
3
3
|
export declare const createMarkContent: (tooltip: string[], dimensions: Dimensions, measures: Measures, locale: Locale, foldInfoList: FoldInfo[]) => ({
|
|
4
4
|
visible: boolean;
|
|
5
5
|
hasShape: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipScatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipScatter.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures, findMeasureById } from '../../../../utils'\nimport type { Datum, Dimensions, FoldInfo, Locale, Measures,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipScatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipScatter.ts"],"sourcesContent":["import { uniqueBy } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures, findMeasureById } from '../../../../utils'\nimport type { Datum, Dimensions, FoldInfo, Locale, Measures, VChartSpecPipe, Tooltip, UnfoldInfo } from 'src/types'\nimport { ORIGINAL_DATA } from 'src/dataReshape'\nimport { getTooltipStyle } from './tooltipStyle'\n\nexport const tooltipScatter: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, chartType, locale, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n const { foldInfoList } = datasetReshapeInfo[0] as unknown as {\n foldInfoList: FoldInfo[]\n unfoldInfo: UnfoldInfo\n }\n\n result.tooltip = {\n style: getTooltipStyle(tooltip),\n visible: enable,\n\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(\n encoding.tooltip || [],\n dimensions,\n findAllMeasures(vseed.measures),\n locale,\n foldInfoList,\n ),\n },\n dimension: {\n visible: false,\n },\n }\n return result\n}\n\nexport const createMarkContent = (\n tooltip: string[],\n dimensions: Dimensions,\n measures: Measures,\n locale: Locale,\n foldInfoList: FoldInfo[],\n) => {\n const dims = uniqueBy(\n dimensions.filter((item) => tooltip.includes(item.id)),\n (item) => item.id,\n )\n const meas = uniqueBy(\n measures.filter((item) => tooltip.includes(item.id)),\n (item) => item.id,\n )\n\n const dimContent = dims.map((item) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: (v: unknown) => {\n const datum = v as Datum\n if (item.alias || item.id) {\n return item.alias || item.id\n }\n return datum && (datum[item.id] as string)\n },\n value: (v: unknown) => {\n const datum = v as Datum\n return datum && (datum[item.id] as string)\n },\n }))\n\n const meaContent = meas.map((item) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: item.alias || item.id,\n value: (v: unknown) => {\n const datum = v as Datum\n if (!datum) {\n return ''\n }\n const id = item.id\n if (!datum || !datum[ORIGINAL_DATA] || !datum[ORIGINAL_DATA]) {\n return ''\n }\n const originalData = datum[ORIGINAL_DATA] as Datum\n const value = originalData[id] as string | number\n const measure = findMeasureById(measures, id)\n const formatter = createFormatterByMeasure(measure)\n return formatter(value)\n },\n }))\n\n const foldMeaContent = foldInfoList.map((foldInfo) => {\n return {\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: Object.values(foldInfo.foldMap)[0],\n value: (v: unknown) => {\n const { measureId, measureValue } = foldInfo\n\n const datum = v as Datum\n if (!datum) {\n return ''\n }\n const value = datum[measureValue] as string | number\n const id = datum[measureId] as string\n const measure = findMeasureById(measures, id)\n const formatter = createFormatterByMeasure(measure)\n return formatter(value)\n },\n }\n })\n return [...dimContent, ...foldMeaContent, ...meaContent]\n}\n"],"names":["tooltipScatter","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","locale","dimensions","encoding","baseConfig","tooltip","enable","foldInfoList","getTooltipStyle","createMarkContent","findAllMeasures","measures","dims","uniqueBy","item","meas","dimContent","v","datum","meaContent","id","ORIGINAL_DATA","originalData","value","measure","findMeasureById","formatter","createFormatterByMeasure","foldMeaContent","foldInfo","Object","measureId","measureValue"],"mappings":";;;;AAMO,MAAMA,iBAAiC,CAACC,MAAMC;IACnD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,SAAS,EAAEC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGN;IACxE,MAAMO,aAAaP,cAAc,MAAM,CAACG,UAAU;IAClD,MAAM,EAAEK,UAAU;QAAE,QAAQ;IAAK,CAAC,EAAE,GAAGD;IACvC,MAAM,EAAEE,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,YAAY,EAAE,GAAGR,kBAAkB,CAAC,EAAE;IAK9CH,OAAO,OAAO,GAAG;QACf,OAAOY,gBAAgBH;QACvB,SAASC;QAET,MAAM;YACJ,OAAO;gBACL,SAAS;YACX;YACA,SAASG,kBACPN,SAAS,OAAO,IAAI,EAAE,EACtBD,YACAQ,gBAAgBZ,MAAM,QAAQ,GAC9BG,QACAM;QAEJ;QACA,WAAW;YACT,SAAS;QACX;IACF;IACA,OAAOX;AACT;AAEO,MAAMa,oBAAoB,CAC/BJ,SACAH,YACAS,UACAV,QACAM;IAEA,MAAMK,OAAOC,SACXX,WAAW,MAAM,CAAC,CAACY,OAAST,QAAQ,QAAQ,CAACS,KAAK,EAAE,IACpD,CAACA,OAASA,KAAK,EAAE;IAE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