@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/init/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/scatter.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/init/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/scatter.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const initScatter: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList } = datasetReshapeInfo[0]\n\n result.type = 'scatter'\n result.direction = 'vertical'\n result.xField = foldInfoList?.[0].measureValue\n if (foldInfoList?.[1]) {\n result.yField = foldInfoList[1].measureValue\n }\n\n result.seriesField = unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initScatter","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfoList"],"mappings":"AAGO,MAAMA,cAA8B,CAACC,MAAMC;IAChD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,YAAY,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAE1DF,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGI,cAAc,CAAC,EAAE,CAAC;IAClC,IAAIA,cAAc,CAAC,EAAE,EACnBJ,OAAO,MAAM,GAAGI,YAAY,CAAC,EAAE,CAAC,YAAY;IAG9CJ,OAAO,WAAW,GAAGG,WAAW,eAAe;IAE/CH,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Datum, Dimensions, Encoding, FoldInfo, Formatter, Label, Measure, Measures, NumFormat,
|
|
2
|
-
export declare const label:
|
|
1
|
+
import type { Datum, Dimensions, Encoding, FoldInfo, Formatter, Label, Measure, Measures, NumFormat, VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const label: VChartSpecPipe;
|
|
3
3
|
export declare const generateMeasureValue: (value: number | string, measure: Measure, labelAutoFormat?: boolean, numFormat?: NumFormat) => string;
|
|
4
4
|
export declare const generateMeasurePercent: (value: number | string, sum: number, formatter: Formatter) => string;
|
|
5
5
|
export declare const buildLabel: (label: Label, vseedMeasures: Measures | undefined, vseedDimensions: Dimensions | undefined, advancedVSeedDimensions: Dimensions, advancedVSeedMeasures: Measures, encoding: Encoding, foldInfoList: FoldInfo[]) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimension,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimension,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n VChartSpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { selector } from 'src/dataSelector'\nimport { MeasureId } from 'src/dataReshape/constant'\n\nexport const label: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n ) as unknown as ILineChartSpec['label']\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelStroke,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureId)\n : [],\n (item: Dimension) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item: Measure) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n dataFilter: (data: Datum[]) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true && selector(entry.data as Datum, label.selector, 'Or')\n })\n },\n formatMethod: (_: unknown, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item: Dimension) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item: Measure) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n // 饼图/环图需要使用实际占比数据\n const measurePercentLabel = isNumber(datum['__VCHART_ARC_RATIO'])\n ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter)\n : generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter)\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n stroke: labelStroke,\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n }\n\n if (labelOverlap) {\n ;(result as any).overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelStroke","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureId","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","selector","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel","isNumber"],"mappings":";;;;AAmBO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAClD,MAAMG,WAAWJ,kBAAkB,CAAC,EAAE,CAAC,QAAQ;IAE/C,MAAM,EAAEN,KAAK,EAAE,GAAGS;IAElBN,OAAO,KAAK,GAAGQ,WACbX,OACAK,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBI,UACA;QAACE;KAAS;IAGZ,OAAOP;AACT;AAEO,MAAMS,uBAAuB,CAClCC,OACAC,SACAC,iBACAC,YAAuB,CAAC,CAAC;IAEzB,MAAMC,SAASC,MAAMF,WAAWF,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MC;YACN,UAAUC;YACV,YAAYC;YACZ,YAAYC;QACd;QACA,aAAaL;IACf;IAEA,IAAID,cACAnC,OAAe,OAAO,GAAG;QACzB,WAAW;QACX,YAAY;IACd;IAGF,OAAOA;AACT"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const labelPrimary:
|
|
3
|
-
export declare const labelSecondary:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const labelPrimary: VChartSpecPipe;
|
|
3
|
+
export declare const labelSecondary: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelDualAxis.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelDualAxis.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, VChartSpecPipe } from 'src/types'\nimport { buildLabel } from './label'\nimport { DUAL_AXIS_LABEL_Z_INDEX } from 'src/pipeline/utils/constant'\n\nexport const labelPrimary: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n result.label = buildLabel(\n baseConfig.label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfoList[0]],\n ) as unknown as ILineChartSpec['label']\n ;(result.label as any)!.zIndex = DUAL_AXIS_LABEL_Z_INDEX\n return result\n}\n\nexport const labelSecondary: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n\n result.label = buildLabel(\n baseConfig.label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfoList[1]],\n ) as unknown as ILineChartSpec['label']\n ;(result.label as any)!.zIndex = DUAL_AXIS_LABEL_Z_INDEX\n return result\n}\n"],"names":["labelPrimary","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","encoding","chartType","baseConfig","foldInfoList","buildLabel","DUAL_AXIS_LABEL_Z_INDEX","labelSecondary"],"mappings":";;AAKO,MAAMA,eAA+B,CAACC,MAAMC;IACjD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACzC,MAAM,EAAEI,SAAS,EAAE,GAAGJ;IACtB,MAAMK,aAAaL,cAAc,MAAM,CAACI,UAAU;IAElD,MAAME,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IACvDH,OAAO,KAAK,GAAGQ,WACbF,WAAW,KAAK,EAChBJ,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBG,UACA;QAACG,YAAY,CAAC,EAAE;KAAC;IAEjBP,OAAO,KAAK,CAAU,MAAM,GAAGS;IACjC,OAAOT;AACT;AAEO,MAAMU,iBAAiC,CAACZ,MAAMC;IACnD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACzC,MAAM,EAAEI,SAAS,EAAE,GAAGJ;IACtB,MAAMK,aAAaL,cAAc,MAAM,CAACI,UAAU;IAElD,MAAME,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IAEvDH,OAAO,KAAK,GAAGQ,WACbF,WAAW,KAAK,EAChBJ,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBG,UACA;QAACG,YAAY,CAAC,EAAE;KAAC;IAEjBP,OAAO,KAAK,CAAU,MAAM,GAAGS;IACjC,OAAOT;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const labelPie:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const labelPie: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelPie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelPie.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, PieLabel,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelPie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelPie.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, PieLabel, VChartSpecPipe } from 'src/types'\nimport { buildLabel } from './label'\n\nexport const labelPie: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as IPieChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: PieLabel }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n ) as unknown as IPieChartSpec['label']\n if (label.labelLayout) {\n ;(result.label as any)!.layout = {\n align: label.labelLayout,\n }\n }\n return result\n}\n"],"names":["labelPie","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","label","buildLabel"],"mappings":";AAIO,MAAMA,WAA2B,CAACC,MAAMC;IAC7C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAClD,MAAMG,WAAWJ,kBAAkB,CAAC,EAAE,CAAC,QAAQ;IAE/C,MAAM,EAAEK,KAAK,EAAE,GAAGF;IAElBN,OAAO,KAAK,GAAGS,WACbD,OACAN,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBI,UACA;QAACE;KAAS;IAEZ,IAAIC,MAAM,WAAW,EACjBR,OAAO,KAAK,CAAU,MAAM,GAAG;QAC/B,OAAOQ,MAAM,WAAW;IAC1B;IAEF,OAAOR;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const labelScatter:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const labelScatter: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelScatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelScatter.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelScatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelScatter.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, VChartSpecPipe } from 'src/types'\nimport { buildLabel } from './label'\n\nexport const labelScatter: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n foldInfoList,\n ) as unknown as IScatterChartSpec['label']\n\n return result\n}\n"],"names":["labelScatter","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfoList","label","buildLabel"],"mappings":";AAIO,MAAMA,eAA+B,CAACC,MAAMC;IACjD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAElD,MAAMG,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IAEvD,MAAM,EAAEK,KAAK,EAAE,GAAGF;IAElBN,OAAO,KAAK,GAAGS,WACbD,OACAN,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBI,UACAE;IAGF,OAAOP;AACT"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { discreteLegend } from "./discreteLegend.js";
|
|
2
|
+
const boxLegend = (spec, context)=>{
|
|
3
|
+
const normalLegend = discreteLegend(spec, context);
|
|
4
|
+
normalLegend.legends = {
|
|
5
|
+
...normalLegend.legends,
|
|
6
|
+
data: (data)=>data.map((obj)=>{
|
|
7
|
+
obj.shape.fill = obj.shape.stroke;
|
|
8
|
+
return obj;
|
|
9
|
+
})
|
|
10
|
+
};
|
|
11
|
+
return normalLegend;
|
|
12
|
+
};
|
|
13
|
+
export { boxLegend };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=boxLegend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/boxLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/boxLegend.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport type { VChartSpecPipe } from 'src/types'\nimport { discreteLegend } from './discreteLegend'\n\nexport const boxLegend: VChartSpecPipe = (spec, context) => {\n const normalLegend = discreteLegend(spec, context) as any\n normalLegend.legends = {\n ...normalLegend.legends,\n data: (data: any[]) => {\n return data.map((obj) => {\n obj.shape.fill = obj.shape.stroke\n return obj\n })\n },\n }\n return normalLegend\n}\n"],"names":["boxLegend","spec","context","normalLegend","discreteLegend","data","obj"],"mappings":";AAMO,MAAMA,YAA4B,CAACC,MAAMC;IAC9C,MAAMC,eAAeC,eAAeH,MAAMC;IAC1CC,aAAa,OAAO,GAAG;QACrB,GAAGA,aAAa,OAAO;QACvB,MAAM,CAACE,OACEA,KAAK,GAAG,CAAC,CAACC;gBACfA,IAAI,KAAK,CAAC,IAAI,GAAGA,IAAI,KAAK,CAAC,MAAM;gBACjC,OAAOA;YACT;IAEJ;IACA,OAAOH;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const colorLegend:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const colorLegend: VChartSpecPipe;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { createFormatterByMeasure, findTreeNodesBy } from "../../../../utils/index.js";
|
|
1
2
|
const colorLegend = (spec, context)=>{
|
|
2
3
|
const result = {
|
|
3
4
|
...spec
|
|
4
5
|
};
|
|
5
6
|
const { advancedVSeed } = context;
|
|
6
|
-
const { datasetReshapeInfo, chartType } = advancedVSeed;
|
|
7
|
+
const { datasetReshapeInfo, chartType, measures = [] } = advancedVSeed;
|
|
7
8
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
|
8
9
|
const baseConfig = advancedVSeed.config[chartType];
|
|
9
10
|
if (!baseConfig || !baseConfig.legend) return result;
|
|
@@ -64,6 +65,11 @@ const colorLegend = (spec, context)=>{
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
};
|
|
68
|
+
const colorMeasure = findTreeNodesBy(measures, (m)=>'color' === m.encoding)?.[0];
|
|
69
|
+
if (colorMeasure) {
|
|
70
|
+
const formatter = createFormatterByMeasure(colorMeasure);
|
|
71
|
+
result.legends.handlerText.formatter = formatter;
|
|
72
|
+
}
|
|
67
73
|
return result;
|
|
68
74
|
};
|
|
69
75
|
export { colorLegend };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/legend/colorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/colorLegend.ts"],"sourcesContent":["import type { Legend,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/colorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/colorLegend.ts"],"sourcesContent":["import { createFormatterByMeasure, findTreeNodesBy } from 'src/pipeline/utils'\nimport type { Legend, Measure, VChartSpecPipe } from 'src/types'\n\nexport const colorLegend: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType, measures = [] } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'color',\n visible: enable,\n orient,\n position: legendPosition,\n padding: 0,\n field: unfoldInfo.encodingColor,\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n }\n const colorMeasure = findTreeNodesBy<Measure>(measures, (m) => m.encoding === 'color')?.[0]\n if (colorMeasure) {\n const formatter = createFormatterByMeasure(colorMeasure)\n result.legends.handlerText!.formatter = formatter\n }\n return result\n}\n"],"names":["colorLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","measures","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","colorMeasure","findTreeNodesBy","m","formatter","createFormatterByMeasure"],"mappings":";AAGO,MAAMA,cAA8B,CAACC,MAAMC;IAChD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,G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;IACA,OAAOnB;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const discreteLegend:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const discreteLegend: VChartSpecPipe;
|
|
@@ -8,7 +8,7 @@ const discreteLegend = (spec, context)=>{
|
|
|
8
8
|
const baseConfig = advancedVSeed.config[chartType];
|
|
9
9
|
if (!baseConfig || !baseConfig.legend) return result;
|
|
10
10
|
const { legend } = baseConfig;
|
|
11
|
-
const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, labelFontWeight, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
|
|
11
|
+
const { enable, position = 'bottom', labelFontColor, labelColor, labelFontSize = 12, pagerIconColor, pagerIconDisableColor, labelFontWeight, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
|
|
12
12
|
const orient = [
|
|
13
13
|
'bottom',
|
|
14
14
|
'bottomLeft',
|
|
@@ -47,6 +47,7 @@ const discreteLegend = (spec, context)=>{
|
|
|
47
47
|
'rt',
|
|
48
48
|
'br'
|
|
49
49
|
].includes(position) ? 'end' : 'middle';
|
|
50
|
+
const labelTextColor = labelColor || labelFontColor;
|
|
50
51
|
result.legends = {
|
|
51
52
|
type: 'discrete',
|
|
52
53
|
visible: enable,
|
|
@@ -60,7 +61,7 @@ const discreteLegend = (spec, context)=>{
|
|
|
60
61
|
maxWidth: '30%',
|
|
61
62
|
focusIconStyle: {
|
|
62
63
|
size: labelFontSize + 2,
|
|
63
|
-
fill:
|
|
64
|
+
fill: labelTextColor,
|
|
64
65
|
fontWeight: labelFontWeight
|
|
65
66
|
},
|
|
66
67
|
shape: {
|
|
@@ -110,6 +111,21 @@ const discreteLegend = (spec, context)=>{
|
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
},
|
|
114
|
+
pager: {
|
|
115
|
+
textStyle: {
|
|
116
|
+
fill: labelTextColor
|
|
117
|
+
},
|
|
118
|
+
handler: {
|
|
119
|
+
style: {
|
|
120
|
+
fill: pagerIconColor
|
|
121
|
+
},
|
|
122
|
+
state: {
|
|
123
|
+
disable: {
|
|
124
|
+
fill: pagerIconDisableColor
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
113
129
|
padding: 0
|
|
114
130
|
};
|
|
115
131
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/legend/discreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/discreteLegend.ts"],"sourcesContent":["import type { Legend,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/discreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/discreteLegend.ts"],"sourcesContent":["import type { Legend, VChartSpecPipe } from 'src/types'\n\nexport const discreteLegend: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n pagerIconColor,\n pagerIconDisableColor,\n labelFontWeight,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n const labelTextColor = labelColor || labelFontColor\n\n result.legends = {\n type: 'discrete',\n visible: enable,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n autoPage: true,\n orient,\n position: legendPosition,\n item: {\n focus: true,\n maxWidth: '30%',\n focusIconStyle: {\n size: labelFontSize + 2,\n fill: labelTextColor,\n fontWeight: labelFontWeight,\n },\n shape: {\n space: border ? 6 : 4,\n style: (item) => {\n return {\n symbolType: shapeType,\n size: border ? 8 : 10,\n fillOpacity: 1,\n opacity: 1,\n stroke: false,\n outerBorder: border\n ? {\n stroke: item.shape.fill,\n distance: 3,\n lineWidth: 1,\n }\n : null,\n }\n },\n state: {\n unSelected: {\n opacity: 0.2,\n fillOpacity: 1, // 覆盖 vchart 里的默认值\n },\n },\n },\n label: {\n formatMethod: (value) => {\n return unfoldInfo.colorIdMap[String(value)]?.alias ?? value\n },\n style: {\n fontSize: labelFontSize,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n state: {\n unSelected: {\n fill: labelColor || labelFontColor, // 覆盖vchart里面的默认值\n fillOpacity: 0.8, // 覆盖 vchart 里的默认值\n },\n },\n },\n background: {\n state: {\n selectedHover: {\n fill: labelColor || labelFontColor,\n fillOpacity: 0.05,\n },\n unSelectedHover: {\n fill: null,\n },\n },\n },\n },\n pager: {\n textStyle: {\n fill: labelTextColor,\n },\n handler: {\n style: {\n fill: pagerIconColor,\n },\n state: {\n disable: {\n fill: pagerIconDisableColor,\n },\n },\n },\n },\n padding: 0,\n }\n return result\n}\n"],"names":["discreteLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","pagerIconColor","pagerIconDisableColor","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","labelTextColor","Math","item","value","String"],"mappings":"AAEO,MAAMA,iBAAiC,CAACC,MAAMC;IACnD,MAAMC,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BACL,OAAOE,SAAS,IAAI;gBACpB,OAAO,CAACM,OACC;wBACL,YAAYL;wBACZ,MAAMD,SAAS,IAAI;wBACnB,aAAa;wBACb,SAAS;wBACT,QAAQ;wBACR,aAAaA,SACT;4BACE,QAAQM,KAAK,KAAK,CAAC,IAAI;4BACvB,UAAU;4BACV,WAAW;wBACb,IACA;oBACN;gBAEF,OAAO;oBACL,YAAY;wBACV,SAAS;wBACT,aAAa;oBACf;gBACF;YACF;YACA,OAAO;gBACL,cAAc,CAACC,QACNnB,WAAW,UAAU,CAACoB,OAAOD,OAAO,EAAE,SAASA;gBAExD,OAAO;oBACL,UAAUZ;oBACV,MAAMD,cAAcD;oBACpB,YAAYK;gBACd;gBACA,OAAO;oBACL,YAAY;wBACV,MAAMJ,cAAcD;wBACpB,aAAa;oBACf;gBACF;YACF;YACA,YAAY;gBACV,OAAO;oBACL,eAAe;wBACb,MAAMC,cAAcD;wBACpB,aAAa;oBACf;oBACA,iBAAiB;wBACf,MAAM;oBACR;gBACF;YACF;QACF;QACA,OAAO;YACL,WAAW;gBACT,MAAMW;YACR;YACA,SAAS;gBACP,OAAO;oBACL,MAAMR;gBACR;gBACA,OAAO;oBACL,SAAS;wBACP,MAAMC;oBACR;gBACF;YACF;QACF;QACA,SAAS;IACX;IACA,OAAOb;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const heatmapColorLegend:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const heatmapColorLegend: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/legend/heatmapColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/heatmapColorLegend.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/heatmapColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/heatmapColorLegend.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport type { VChartSpecPipe } from 'src/types'\nimport { colorLegend } from './colorLegend'\nimport type { Datum, IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\n\nexport const heatmapColorLegend: VChartSpecPipe = (spec, context) => {\n const result = colorLegend(spec, context) as IHeatmapChartSpec\n\n if (result.legends) {\n ;(result.legends as any).customFilter = (data: Datum[], range: number[], key: string) => {\n const min = Math.min(range[0], range[1])\n const max = Math.max(range[0], range[1])\n return (data ?? []).map((entry: Datum) => {\n const val = entry[key]\n const isHide = val - min < -1e-6 || val - max > 1e-6\n\n entry[DATUM_HIDE_KEY] = isHide\n\n return entry\n })\n }\n }\n\n return result\n}\n"],"names":["heatmapColorLegend","spec","context","result","colorLegend","data","range","key","min","Math","max","entry","val","isHide","DATUM_HIDE_KEY"],"mappings":";;AAMO,MAAMA,qBAAqC,CAACC,MAAMC;IACvD,MAAMC,SAASC,YAAYH,MAAMC;IAEjC,IAAIC,OAAO,OAAO,EACdA,OAAO,OAAO,CAAS,YAAY,GAAG,CAACE,MAAeC,OAAiBC;QACvE,MAAMC,MAAMC,KAAK,GAAG,CAACH,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC,EAAE;QACvC,MAAMI,MAAMD,KAAK,GAAG,CAACH,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC,EAAE;QACvC,OAAQD,AAAAA,CAAAA,QAAQ,EAAC,EAAG,GAAG,CAAC,CAACM;YACvB,MAAMC,MAAMD,KAAK,CAACJ,IAAI;YACtB,MAAMM,SAASD,MAAMJ,MAAM,aAASI,MAAMF,MAAM;YAEhDC,KAAK,CAACG,eAAe,GAAGD;YAExB,OAAOF;QACT;IACF;IAGF,OAAOR;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const pivotColorLegend:
|
|
1
|
+
import type { PivotChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const pivotColorLegend: PivotChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { Color, Legend,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { Color, Legend, PivotChartSpecPipe } from 'src/types'\n\nexport const pivotColorLegend: PivotChartSpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n const max = Math.max(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMax))\n const { legend, color } = baseConfig\n const { colorScheme, linearColorScheme } = color\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends = {\n visible: enable,\n type: 'color',\n orient,\n position: legendPosition,\n\n colors: linearColorScheme || colorScheme || [],\n value: [min, max],\n min: min,\n max: max,\n\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n } as unknown\n return { ...result, legends } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotColorLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","max","Math","d","min","legend","color","colorScheme","linearColorScheme","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","legends"],"mappings":"AAGO,MAAMA,mBAAuC,CAACC,MAAMC;IACzD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAC/B,MAAMI,MAAMC,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAMC,MAAMF,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAM,EAAEE,MAAM,EAAEC,KAAK,EAAE,GAAGP;IAC1B,MAAM,EAAEQ,WAAW,EAAEC,iBAAiB,EAAE,GAAGF;IAE3C,MAAM,EACJG,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACtB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMO,UAAU;QACd,SAASR;QACT,MAAM;QACNM;QACA,UAAUC;QAEV,QAAQR,qBAAqBD,eAAe,EAAE;QAC9C,OAAO;YAACH;YAAKH;SAAI;QACjB,KAAKG;QACL,KAAKH;QAEL,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMW,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAO;QAAE,GAAGlB,MAAM;QAAEqB;IAAQ;AAC9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const pivotDiscreteLegend:
|
|
1
|
+
import type { PivotChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const pivotDiscreteLegend: PivotChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { unique } from 'remeda'\nimport type { Color, Legend,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { unique } from 'remeda'\nimport type { Color, Legend, PivotChartSpecPipe } from 'src/types'\nimport { createSpecifiedForColorMapping } from '../color/color'\n\nexport const pivotDiscreteLegend: PivotChartSpecPipe = (spec, context): Partial<PivotChartConstructorOptions> => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n\n const colorItems = unique(\n datasetReshapeInfo.flatMap((d) => {\n return d.unfoldInfo.colorItems\n }),\n )\n\n const colorIdMap = datasetReshapeInfo.reduce<Record<string, { id: string; alias: string }>>((prev, cur) => {\n return { ...prev, ...cur.unfoldInfo.colorIdMap }\n }, {})\n\n const { legend, color } = baseConfig\n const { colorScheme, colorMapping } = color\n\n const colorSpecified = createSpecifiedForColorMapping(colorMapping, colorIdMap, colorItems)\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends = {\n padding: 0,\n visible: enable,\n type: 'discrete',\n orient,\n position: legendPosition,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n data: colorItems.map((d: string, index: number) => {\n const color = colorSpecified?.[d] ?? colorScheme?.[index % colorScheme.length]\n return {\n label: d,\n shape: {\n outerBorder: border\n ? {\n stroke: color,\n distance: 3,\n lineWidth: 1,\n }\n : undefined,\n fill: color,\n },\n }\n }),\n\n item: {\n focus: true,\n maxWidth: '30%',\n focusIconStyle: {\n size: labelFontSize + 2,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n shape: {\n space: border ? 6 : 4,\n style: {\n symbolType: shapeType,\n size: border ? 8 : 10,\n },\n },\n label: {\n formatMethod: (value: string) => {\n return colorIdMap[value]?.alias ?? value\n },\n style: {\n fontSize: labelFontSize,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n },\n background: {\n state: {\n selectedHover: {\n fill: labelColor || labelFontColor,\n fillOpacity: 0.05,\n },\n },\n },\n },\n }\n return { ...result, legends } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotDiscreteLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","colorItems","unique","d","colorIdMap","prev","cur","legend","color","colorScheme","colorMapping","colorSpecified","createSpecifiedForColorMapping","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","legends","Math","index","undefined","value"],"mappings":";;AAKO,MAAMA,sBAA0C,CAACC,MAAMC;IAC5D,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAE/B,MAAMI,aAAaC,OACjBF,mBAAmB,OAAO,CAAC,CAACG,IACnBA,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;oBACL,aAAaiB,SACT;wBACE,QAAQZ;wBACR,UAAU;wBACV,WAAW;oBACb,IACAmB;oBACJ,MAAMnB;gBACR;YACF;QACF;QAEA,MAAM;YACJ,OAAO;YACP,UAAU;YACV,gBAAgB;gBACd,MAAMS,gBAAgB;gBACtB,MAAMD,cAAcD;gBACpB,YAAYG;YACd;YACA,OAAO;gBACL,OAAOE,SAAS,IAAI;gBACpB,OAAO;oBACL,YAAYC;oBACZ,MAAMD,SAAS,IAAI;gBACrB;YACF;YACA,OAAO;gBACL,cAAc,CAACQ,QACNxB,UAAU,CAACwB,MAAM,EAAE,SAASA;gBAErC,OAAO;oBACL,UAAUX;oBACV,MAAMD,cAAcD;oBACpB,YAAYG;gBACd;YACF;YACA,YAAY;gBACV,OAAO;oBACL,eAAe;wBACb,MAAMF,cAAcD;wBACpB,aAAa;oBACf;gBACF;YACF;QACF;IACF;IACA,OAAO;QAAE,GAAGnB,MAAM;QAAE4B;IAAQ;AAC9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const areaStyle:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const areaStyle: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/areaStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/areaStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { AreaStyle, Datum, LineStyle,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/areaStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/areaStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { AreaStyle, Datum, LineStyle, VChartSpecPipe } from 'src/types'\nimport { groupBy, isEmpty, isNullish } from 'remeda'\nimport { getCurveTension, getCurveType } from './curve'\n\nexport const areaStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed\n const { areaStyle, lineStyle } = markStyle\n const { unfoldInfo } = datasetReshapeInfo[0]\n const result = {\n ...spec,\n area: {\n visible: true,\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(areaStyle) || isEmpty(areaStyle)) {\n return result\n }\n\n const areaStyles = (Array.isArray(areaStyle) ? areaStyle : [areaStyle]) as AreaStyle[]\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const group = unfoldInfo.encodingColorId\n\n const areaGroups = groupBy(dataset, (d) => d[group ?? ''] as string)\n\n const customMap = areaStyles.reduce<object>((result, style, index) => {\n const { areaColor, areaColorOpacity, areaVisible = true } = style\n\n const curveType = getCurveType(context.vseed, lineStyles[index]?.lineSmooth)\n const curveTension = getCurveTension(context.vseed, lineStyles[index]?.lineSmooth)\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n const lineData = areaGroups[datum[group ?? ''] as string]\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n curveType,\n curveTension,\n visible: areaVisible,\n fill: areaColor,\n fillOpacity: areaColorOpacity,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n area: {\n ...result.area,\n visible: true,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["areaStyle","spec","context","advancedVSeed","markStyle","datasetReshapeInfo","dataset","lineStyle","unfoldInfo","result","isNullish","isEmpty","areaStyles","Array","lineStyles","group","areaGroups","groupBy","d","customMap","style","index","areaColor","areaColorOpacity","areaVisible","curveType","getCurveType","curveTension","getCurveTension","datum","lineData","selector"],"mappings":";;;AAMO,MAAMA,sBAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC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F,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGd,MAAM;QACT,MAAM;YACJ,GAAGA,OAAO,IAAI;YACd,SAAS;YACT,OAAO;gBACL,GAAGU,SAAS;YACd;QACF;IACF;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const barStyle:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const barStyle: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/barStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/barStyle.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BarStyle, Datum,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/barStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/barStyle.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BarStyle, Datum, VChartSpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const barStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, dataset = [] } = advancedVSeed\n const { barStyle } = markStyle\n\n const showStroke = dataset.length <= 100\n\n const result = {\n ...spec,\n bar: {\n style: {\n visible: true,\n fillOpacity: 1,\n lineWidth: showStroke ? 1 : 0,\n },\n state: {\n hover: {\n fillOpacity: 0.6,\n },\n },\n },\n } as IBarChartSpec\n\n if (isNullish(barStyle) || isEmpty(barStyle)) {\n return result\n }\n\n const barStyles = (Array.isArray(barStyle) ? barStyle : [barStyle]) as BarStyle[]\n\n const customMap = barStyles.reduce<object>((result, style, index) => {\n const {\n barBorderColor,\n barBorderStyle,\n barBorderWidth = 1,\n barColor,\n barColorOpacity,\n barBorderOpacity,\n barRadius,\n barVisible = true,\n } = style\n\n const lineDash = barBorderStyle === 'dashed' ? [5, 2] : barBorderStyle === 'dotted' ? [2, 5] : [0, 0]\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n if (selector(datum, style.selector)) {\n return true\n }\n return false\n },\n style: {\n visible: barVisible,\n fill: barColor,\n fillOpacity: barColorOpacity,\n cornerRadius: barRadius,\n lineWidth: barBorderWidth,\n stroke: barBorderColor,\n strokeOpacity: barBorderOpacity,\n lineDash: lineDash,\n },\n },\n }\n }, {})\n\n result.bar!.state = {\n ...result.bar!.state,\n ...customMap,\n }\n\n return result\n}\n"],"names":["barStyle","spec","context","advancedVSeed","markStyle","dataset","showStroke","result","isNullish","isEmpty","barStyles","Array","customMap","style","index","barBorderColor","barBorderStyle","barBorderWidth","barColor","barColorOpacity","barBorderOpacity","barRadius","barVisible","lineDash","datum","selector"],"mappings":";;AAKO,MAAMA,oBAA2B,CAACC,MAAMC;IAC7C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,UAAU,EAAE,EAAE,GAAGF;IACpC,MAAM,EAAEH,QAAQ,EAAE,GAAGI;IAErB,MAAME,aAAaD,QAAQ,MAAM,IAAI;IAErC,MAAME,SAAS;QACb,GAAGN,IAAI;QACP,KAAK;YACH,OAAO;gBACL,SAAS;gBACT,aAAa;gBACb,WAAWK,aAAa,IAAI;YAC9B;YACA,OAAO;gBACL,OAAO;oBACL,aAAa;gBACf;YACF;QACF;IACF;IAEA,IAAIE,UAAUR,aAAaS,QAAQT,WACjC,OAAOO;IAGT,MAAMG,YAAaC,MAAM,OAAO,CAACX,YAAYA,WAAW;QAACA;KAAS;IAElE,MAAMY,YAAYF,UAAU,MAAM,CAAS,CAACH,QAAQM,OAAOC;QACzD,MAAM,EACJC,cAAc,EACdC,cAAc,EACdC,iBAAiB,CAAC,EAClBC,QAAQ,EACRC,eAAe,EACfC,gBAAgB,EAChBC,SAAS,EACTC,aAAa,IAAI,EAClB,GAAGT;QAEJ,MAAMU,WAAWP,AAAmB,aAAnBA,iBAA8B;YAAC;YAAG;SAAE,GAAGA,AAAmB,aAAnBA,iBAA8B;YAAC;YAAG;SAAE,GAAG;YAAC;YAAG;SAAE;QACrG,OAAO;YACL,GAAGT,MAAM;YACT,CAAC,CAAC,MAAM,EAAEO,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACU;oBACP,IAAIC,SAASD,OAAOX,MAAM,QAAQ,GAChC,OAAO;oBAET,OAAO;gBACT;gBACA,OAAO;oBACL,SAASS;oBACT,MAAMJ;oBACN,aAAaC;oBACb,cAAcE;oBACd,WAAWJ;oBACX,QAAQF;oBACR,eAAeK;oBACf,UAAUG;gBACZ;YACF;QACF;IACF,GAAG,CAAC;IAEJhB,OAAO,GAAG,CAAE,KAAK,GAAG;QAClB,GAAGA,OAAO,GAAG,CAAE,KAAK;QACpB,GAAGK,SAAS;IACd;IAEA,OAAOL;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const cellStyle:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const cellStyle: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/cellStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/cellStyle.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/cellStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/cellStyle.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const cellStyle: VChartSpecPipe = (spec, context) => {\n const result = {\n ...spec,\n cell: {\n style: {},\n },\n } as IHeatmapChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const cell = advancedVSeed.config?.[chartType as 'heatmap']?.cell\n\n return {\n ...result,\n cell: {\n style: {\n visible: (datum: any) => {\n return datum?.[DATUM_HIDE_KEY] !== true\n },\n shape: 'rect',\n stroke: cell?.stroke,\n lineWidth: cell?.lineWidth ?? 1,\n },\n },\n }\n}\n"],"names":["cellStyle","spec","context","result","advancedVSeed","vseed","chartType","cell","datum","DATUM_HIDE_KEY"],"mappings":";AAIO,MAAMA,YAA4B,CAACC,MAAMC;IAC9C,MAAMC,SAAS;QACb,GAAGF,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IACA,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAME,OAAOH,cAAc,MAAM,EAAE,CAACE,UAAuB,EAAE;IAE7D,OAAO;QACL,GAAGH,MAAM;QACT,MAAM;YACJ,OAAO;gBACL,SAAS,CAACK,QACDA,OAAO,CAACC,eAAe,KAAK;gBAErC,OAAO;gBACP,QAAQF,MAAM;gBACd,WAAWA,MAAM,aAAa;YAChC;QACF;IACF;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const funnelStyle:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const funnelStyle: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/funnelStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/funnelStyle.ts"],"sourcesContent":["import type { IFunnelChartSpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/funnelStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/funnelStyle.ts"],"sourcesContent":["import type { IFunnelChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const funnelStyle: VChartSpecPipe = (spec) => {\n const result = {\n ...spec,\n funnel: {\n style: {},\n },\n } as IFunnelChartSpec\n\n return {\n ...result,\n funnel: {\n style: {\n cornerRadius: 0,\n },\n state: {\n hover: {\n fillOpacity: 0.6,\n },\n },\n },\n }\n}\n"],"names":["funnelStyle","spec","result"],"mappings":"AAGO,MAAMA,cAA8B,CAACC;IAC1C,MAAMC,SAAS;QACb,GAAGD,IAAI;QACP,QAAQ;YACN,OAAO,CAAC;QACV;IACF;IAEA,OAAO;QACL,GAAGC,MAAM;QACT,QAAQ;YACN,OAAO;gBACL,cAAc;YAChB;YACA,OAAO;gBACL,OAAO;oBACL,aAAa;gBACf;YACF;QACF;IACF;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const funnelTransformStyle:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const funnelTransformStyle: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/funnelTransformStyle.ts"],"sourcesContent":["import type { VChartSpecPipe } from 'src/types'\n\nexport const funnelTransformStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const config = advancedVSeed.config?.[chartType as 'funnel']?.transform\n\n return {\n ...spec,\n transform: {\n style: {\n fill: config?.backgroundColor,\n },\n },\n transformLabel: {\n visible: true,\n style: {\n fill: config?.textColor,\n },\n },\n }\n}\n"],"names":["funnelTransformStyle","spec","context","advancedVSeed","vseed","chartType","config"],"mappings":"AAEO,MAAMA,uBAAuC,CAACC,MAAMC;IACzD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,SAASH,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAE9D,OAAO;QACL,GAAGJ,IAAI;QACP,WAAW;YACT,OAAO;gBACL,MAAMK,QAAQ;YAChB;QACF;QACA,gBAAgB;YACd,SAAS;YACT,OAAO;gBACL,MAAMA,QAAQ;YAChB;QACF;IACF;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const lineStyle:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const lineStyle: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/lineStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/lineStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, LineStyle,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/lineStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/lineStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, LineStyle, VChartSpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\nimport { getCurveTension, getCurveType } from './curve'\n\nexport const lineStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle } = advancedVSeed\n const { lineStyle } = markStyle\n const result = {\n ...spec,\n line: {\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(lineStyle) || isEmpty(lineStyle)) {\n return result\n }\n\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const customMap = lineStyles.reduce<object>((result, style, index) => {\n const { lineColor, lineColorOpacity, lineSmooth, lineStyle, lineWidth = 2, lineVisible = true } = style\n\n const dashSegment = lineWidth * 2\n const dashGap = lineWidth\n\n const lineDash =\n lineStyle === 'dashed' ? [dashSegment, dashSegment] : lineStyle === 'dotted' ? [dashGap / 2, dashGap * 2] : [0, 0]\n\n const curveType = getCurveType(context.vseed, lineSmooth)\n const curveTension = getCurveTension(context.vseed, lineSmooth)\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (\n _: Datum,\n node: {\n renderNode: {\n context: {\n data: Datum[]\n }\n }\n },\n ) => {\n const lineData = node.renderNode.context.data\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n visible: lineVisible,\n curveType: curveType,\n curveTension: curveTension,\n strokeOpacity: lineColorOpacity,\n stroke: lineColor,\n lineWidth: lineWidth,\n lineDash: lineDash,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n line: {\n ...result.line,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["lineStyle","spec","context","advancedVSeed","markStyle","result","isNullish","isEmpty","lineStyles","Array","customMap","style","index","lineColor","lineColorOpacity","lineSmooth","lineWidth","lineVisible","dashSegment","dashGap","lineDash","curveType","getCurveType","curveTension","getCurveTension","_","node","lineData","d","selector"],"mappings":";;;AAMO,MAAMA,sBAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEH,SAAS,EAAE,GAAGI;IACtB,MAAMC,SAAS;QACb,GAAGJ,IAAI;QACP,M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-
export declare const pieStyle:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const pieStyle: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pieStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pieStyle.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pieStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pieStyle.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const pieStyle: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { dataset } = advancedVSeed\n const showStroke = dataset.length <= 30\n const config = advancedVSeed.config?.[chartType as 'pie']\n\n const result = {\n ...spec,\n pie: {\n style: {\n stroke: config?.backgroundColor ?? '#ffffff',\n lineWidth: showStroke ? 1 : 0,\n },\n },\n } as Required<IPieChartSpec>\n\n if ((spec as IPieChartSpec).outerRadius) {\n result.pie.state = {\n hover: {\n outerRadius: ((spec as IPieChartSpec).outerRadius as number) * 1.1,\n },\n }\n }\n\n if (config?.cornerRadius) {\n result.pie.style!.cornerRadius = config.cornerRadius\n }\n\n return result\n}\n"],"names":["pieStyle","spec","context","advancedVSeed","vseed","chartType","dataset","showStroke","config","result"],"mappings":"AAGO,MAAMA,WAA2B,CAACC,MAAMC;IAC7C,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,OAAO,EAAE,GAAGH;IACpB,MAAMI,aAAaD,QAAQ,MAAM,IAAI;IACrC,MAAME,SAASL,cAAc,MAAM,EAAE,CAACE,UAAmB;IAEzD,MAAMI,SAAS;QACb,GAAGR,IAAI;QACP,KAAK;YACH,OAAO;gBACL,QAAQO,QAAQ,mBAAmB;gBACnC,WAAWD,aAAa,IAAI;YAC9B;QACF;IACF;IAEA,IAAKN,KAAuB,WAAW,EACrCQ,OAAO,GAAG,CAAC,KAAK,GAAG;QACjB,OAAO;YACL,aAAeR,AAAgD,MAAhDA,KAAuB,WAAW;QACnD;IACF;IAGF,IAAIO,QAAQ,cACVC,OAAO,GAAG,CAAC,KAAK,CAAE,YAAY,GAAGD,OAAO,YAAY;IAGtD,OAAOC;AACT"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const pointStateDimensionHover:
|
|
3
|
-
export declare const pointStateHover:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const pointStateDimensionHover: VChartSpecPipe;
|
|
3
|
+
export declare const pointStateHover: VChartSpecPipe;
|