@visactor/vseed 0.1.43 → 0.1.45
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 +4620 -0
- package/dist/esm/dataSelector/selector.d.ts +1 -1
- package/dist/esm/dataSelector/selector.js +1 -2
- package/dist/esm/dataSelector/selector.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +35 -2
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +22 -2
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +22 -3
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js +3 -2
- package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipeline/table.js +2 -1
- package/dist/esm/pipeline/advanced/table/pipeline/table.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/{default/defaultMeasureName.d.ts → cellStyle/cellStyle.d.ts} +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js +16 -0
- package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js.map +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/cellStyle/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/cellStyle/index.js +2 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.d.ts +2 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/{defaultMeasureName.js → defaultMeasureId.js} +5 -5
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.js.map +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/index.d.ts +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/index.js +2 -2
- package/dist/esm/pipeline/advanced/table/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/index.js +1 -0
- 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.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.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 +16 -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 +14 -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 +6 -2
- 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 +2 -0
- 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 +5 -1
- 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 +26 -10
- 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 +2 -1
- 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 +2 -1
- 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 +2 -1
- 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 +2 -1
- 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 +2 -1
- 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 +2 -1
- 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/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/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.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 +4 -0
- 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 +2 -1
- 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/colorLegend.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js +7 -0
- 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 +19 -3
- 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 +1 -0
- 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 +5 -7
- 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 +23 -6
- 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 +39 -34
- 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 +10 -3
- 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 +2 -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 +2 -2
- 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.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 +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +4 -2
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.d.ts +3 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js +31 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js +3 -2
- package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipeline/table.js +3 -2
- package/dist/esm/pipeline/spec/table/pipeline/table.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js +14 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/index.js +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js +49 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js +41 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -0
- 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/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/table/pipes/index.js +1 -0
- 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 +13 -3
- 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/constant.d.ts +3 -1
- package/dist/esm/pipeline/utils/constant.js +4 -2
- package/dist/esm/pipeline/utils/constant.js.map +1 -1
- package/dist/esm/pipeline/utils/measures/depth.js.map +1 -1
- package/dist/esm/pipeline/utils/measures/find.js.map +1 -1
- package/dist/esm/pipeline/utils/tree/traverse.d.ts +1 -11
- package/dist/esm/pipeline/utils/tree/traverse.js +3 -4
- 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 +18 -18
- 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.d.ts +30 -22
- package/dist/esm/theme/common/table.js +10 -2
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/common/tooltip.d.ts +3 -2
- package/dist/esm/theme/common/tooltip.js +24 -2
- package/dist/esm/theme/common/tooltip.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +4 -4
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +4 -4
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +3522 -0
- 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 +82 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +82 -0
- package/dist/esm/types/chartType/bar/zBar.d.ts +82 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +82 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +82 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +82 -0
- package/dist/esm/types/chartType/column/zColumn.d.ts +84 -0
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +82 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +82 -0
- package/dist/esm/types/chartType/donut/zDonut.d.ts +82 -0
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +82 -0
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +80 -0
- package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +80 -0
- package/dist/esm/types/chartType/histogram/histogram.d.ts +2 -2
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +90 -4
- package/dist/esm/types/chartType/histogram/zHistogram.js +2 -2
- package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
- package/dist/esm/types/chartType/line/zLine.d.ts +82 -0
- package/dist/esm/types/chartType/pie/zPie.d.ts +82 -0
- package/dist/esm/types/chartType/pivotTable/pivotTable.d.ts +5 -1
- package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +76 -0
- package/dist/esm/types/chartType/pivotTable/zPivotTable.js +2 -1
- package/dist/esm/types/chartType/pivotTable/zPivotTable.js.map +1 -1
- package/dist/esm/types/chartType/radar/zRadar.d.ts +82 -0
- package/dist/esm/types/chartType/rose/zRose.d.ts +82 -0
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +82 -0
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +90 -0
- package/dist/esm/types/chartType/table/table.d.ts +5 -1
- package/dist/esm/types/chartType/table/zTable.d.ts +76 -0
- package/dist/esm/types/chartType/table/zTable.js +2 -1
- package/dist/esm/types/chartType/table/zTable.js.map +1 -1
- package/dist/esm/types/pipeline/spec/spec.d.ts +11 -2
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.d.ts +138 -0
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.js +16 -0
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -0
- package/dist/esm/types/properties/cellStyle/cellStyle.d.ts +80 -0
- package/dist/esm/types/properties/cellStyle/cellStyle.js +8 -0
- package/dist/esm/types/properties/cellStyle/cellStyle.js.map +1 -0
- package/dist/esm/types/properties/cellStyle/index.d.ts +1 -0
- package/dist/esm/types/properties/cellStyle/index.js +1 -0
- package/dist/esm/types/properties/config/area.d.ts +168 -0
- package/dist/esm/types/properties/config/bar.d.ts +252 -0
- package/dist/esm/types/properties/config/boxplot.d.ts +84 -0
- package/dist/esm/types/properties/config/column.d.ts +264 -0
- package/dist/esm/types/properties/config/config.d.ts +1716 -0
- package/dist/esm/types/properties/config/dualAxis.d.ts +84 -0
- package/dist/esm/types/properties/config/funnel.d.ts +84 -0
- package/dist/esm/types/properties/config/heatmap.d.ts +84 -0
- package/dist/esm/types/properties/config/histogram.d.ts +96 -0
- package/dist/esm/types/properties/config/label/label.d.ts +5 -0
- package/dist/esm/types/properties/config/label/zLabel.d.ts +69 -0
- package/dist/esm/types/properties/config/label/zLabel.js +6 -1
- package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
- package/dist/esm/types/properties/config/label/zPieLabel.d.ts +69 -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 +84 -0
- package/dist/esm/types/properties/config/pie.d.ts +252 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.d.ts +2 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js +3 -1
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js.map +1 -1
- package/dist/esm/types/properties/config/rose.d.ts +168 -0
- package/dist/esm/types/properties/config/scatter.d.ts +96 -0
- package/dist/esm/types/properties/config/tooltip/tooltip.d.ts +12 -0
- package/dist/esm/types/properties/config/tooltip/tooltip.js +12 -1
- package/dist/esm/types/properties/config/tooltip/tooltip.js.map +1 -1
- package/dist/esm/types/properties/index.d.ts +1 -0
- package/dist/esm/types/properties/index.js +1 -0
- package/dist/esm/types/properties/markStyle/barStyle.d.ts +5 -0
- package/dist/esm/types/properties/markStyle/barStyle.js.map +1 -1
- package/dist/esm/types/properties/regressionLine/ecdfRegressionLine.d.ts +4 -0
- package/dist/esm/types/properties/regressionLine/kdeRegressionLine.d.ts +4 -0
- package/dist/esm/types/properties/regressionLine/zRegressionLine.d.ts +18 -0
- package/dist/esm/types/properties/regressionLine/zRegressionLine.js +1 -0
- package/dist/esm/types/properties/regressionLine/zRegressionLine.js.map +1 -1
- package/dist/esm/types/properties/theme/customTheme.d.ts +3432 -0
- package/dist/esm/types/zVseed.d.ts +1926 -124
- package/dist/umd/index.js +884 -439
- package/dist/umd/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureName.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/annotation/splitLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/splitLine.ts"],"sourcesContent":["import type { ICartesianSeries, IChart, ILineChartSpec, IVChart } from '@visactor/vchart'\nimport { array, Color as VUtilColor } from '@visactor/vutils'\nimport { isNullish, isNumber, isPlainObject } from 'remeda'\nimport type { AnnotationHorizontalLine, SpecPipe, Color } from 'src/types'\n\ninterface SplitConfig {\n points: { x: number; y: number }[]\n splitCoordinate: number\n lineStroke: {\n gradient: string\n x0: number\n x1: number\n y0: number\n y1: number\n stops: {\n color: string\n offset: number\n }[]\n }\n areaFill: {\n gradient: string\n x0: number\n x1: number\n y0: number\n y1: number\n stops: {\n color: string\n offset: number\n }[]\n }\n}\n\nexport const splitLine: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { annotation, chartType, datasetReshapeInfo } = advancedVSeed\n\n if (!annotation || !annotation.annotationHorizontalLine) {\n return spec\n }\n const baseConfig = advancedVSeed.config[chartType] as { color: Color }\n\n const splitLineConfig = array(annotation.annotationHorizontalLine).find(\n (item) => !!(item as AnnotationHorizontalLine).splitLine,\n ) as AnnotationHorizontalLine | undefined\n\n const splitValue = +(splitLineConfig?.yValue as number | string)\n\n if (Number.isNaN(splitValue) || !isNumber(splitValue)) {\n return spec\n }\n const result = { ...spec } as Partial<ILineChartSpec>\n const colorTheme = baseConfig?.color ?? {}\n const colorConfig = {\n positiveColor: colorTheme.positiveColor || 'red',\n negativeColor: colorTheme.negativeColor || 'green',\n ...(isPlainObject(splitLineConfig?.splitLine) ? splitLineConfig?.splitLine : {}),\n }\n\n const groupMark = {\n type: 'group',\n name: 'annotationHorizontalLine-splitLine',\n zIndex: 300,\n style: {\n splitConfig: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const lineSeries = chart.getAllSeries().find((s) => s.type === 'line' || s.type === 'area') as ICartesianSeries\n\n if (!lineSeries) {\n return\n }\n const lineMark = lineSeries.getMarkInName('line') ?? lineSeries.getMarkInName('area')\n\n if (!lineMark) {\n return\n }\n const lineGraphics = lineMark.getGraphics()\n\n if (!lineGraphics || lineGraphics.length !== 1 || !lineGraphics[0]) {\n return\n }\n const points = ((lineGraphics[0].attribute as any).points ?? []) as { x: number; y: number }[]\n\n if ((lineGraphics[0].attribute as any).segments?.length) {\n ;((lineGraphics[0].attribute as any).segments as any[]).forEach(\n (seg: { points: { x: number; y: number }[] }) => {\n seg.points.forEach((pt: { x: number; y: number }) => {\n points.push({ x: pt.x, y: pt.y })\n })\n },\n )\n }\n\n if (!points || !points.length) {\n return\n }\n const splitCoordinate = lineSeries.getYAxisHelper().getScale!(0).scale(splitValue)\n const minY = Math.min(...points.map((p) => p.y))\n const maxY = Math.max(...points.map((p) => p.y))\n const ratio = (splitCoordinate - minY) / (maxY - minY)\n const lineStroke = {\n gradient: 'linear',\n x0: 0,\n x1: 0,\n y0: 0,\n y1: 1,\n stops: [\n {\n color: colorConfig.positiveColor,\n offset: 0,\n },\n {\n color: colorConfig.positiveColor,\n offset: ratio,\n },\n {\n color: colorConfig.negativeColor,\n offset: ratio + 0.0000001,\n },\n {\n color: colorConfig.negativeColor,\n offset: 1,\n },\n ],\n }\n const areaFill = {\n gradient: 'linear',\n x0: 0,\n x1: 0,\n y0: 0,\n y1: 1,\n stops: [\n {\n color: colorConfig.positiveColor,\n offset: 0,\n },\n {\n color: new VUtilColor(colorConfig.positiveColor).setOpacity(0).toRGBA(),\n offset: ratio,\n },\n {\n offset: ratio + 0.0000001,\n color: new VUtilColor(colorConfig.negativeColor).setOpacity(0).toRGBA(),\n },\n {\n color: colorConfig.negativeColor,\n offset: 1,\n },\n ],\n }\n const attrs: any = {\n segments: null,\n points,\n }\n\n if (lineGraphics[0].type === 'area') {\n attrs.stroke = lineStroke\n attrs.fill = areaFill\n } else {\n attrs.stroke = lineStroke\n }\n\n lineGraphics[0].setAttributes(attrs as unknown as Record<string, any>)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n lineGraphics[0].setFinalAttributes?.(attrs)\n const start = lineSeries.getRegion().getLayoutStartPoint()\n\n return {\n points: points.map((entry) => ({ x: entry.x + start.x, y: entry.y + start.y })),\n splitCoordinate,\n areaFill,\n lineStroke,\n } as SplitConfig\n },\n },\n children: [\n {\n type: 'area',\n interactive: false,\n zIndex: 500,\n style: {\n fillOpacity: 0.5,\n points: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.splitConfig) {\n const { points, splitCoordinate } = parentNode.attribute.splitConfig as SplitConfig\n\n return points.map((entry: { x: number; y: number }) => {\n return {\n ...entry,\n y1: splitCoordinate,\n }\n })\n }\n\n return []\n },\n fill: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.splitConfig) {\n const { areaFill } = parentNode.attribute.splitConfig as SplitConfig\n\n return areaFill\n }\n\n return\n },\n },\n },\n ],\n }\n\n if (!result.customMark) {\n result.customMark = []\n }\n\n ;(result.customMark as any[]).push(groupMark)\n\n const seriesSpec =\n result.type === 'line' || result.type === 'area'\n ? result\n : result.series?.find((s) => s.type === 'line' || s.type === 'area')\n\n if (seriesSpec) {\n if (!seriesSpec.point) {\n seriesSpec.point = {}\n }\n if (!seriesSpec.line) {\n seriesSpec.line = {}\n }\n\n if (!seriesSpec.point.style) {\n seriesSpec.point.style = {}\n }\n if (!seriesSpec.line.style) {\n seriesSpec.line.style = {}\n }\n\n const measureValueKey = datasetReshapeInfo[0].foldInfo.measureValue\n\n seriesSpec.point.style.fill = (datum) => {\n return datum?.[measureValueKey] >= splitValue ? colorConfig.positiveColor : colorConfig.negativeColor\n }\n seriesSpec.line.style.stroke = (datum) => {\n return datum?.[measureValueKey] >= splitValue ? colorConfig.positiveColor : colorConfig.negativeColor\n }\n if (seriesSpec.label && (seriesSpec.label as any).visible && isNullish((seriesSpec.label as any).style?.fill)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n ;(seriesSpec.label as any).style = {\n ...(seriesSpec.label as any).style,\n fill: (datum: any) => {\n return datum?.[measureValueKey] >= splitValue ? colorConfig.positiveColor : colorConfig.negativeColor\n },\n }\n }\n }\n\n return result\n}\n"],"names":["splitLine","spec","context","advancedVSeed","annotation","chartType","datasetReshapeInfo","baseConfig","splitLineConfig","array","item","splitValue","Number","isNumber","result","colorTheme","colorConfig","isPlainObject","groupMark","datum","ctx","vchart","chart","lineSeries","s","lineMark","lineGraphics","points","seg","pt","splitCoordinate","minY","Math","p","maxY","ratio","lineStroke","areaFill","VUtilColor","attrs","start","entry","opt","parentNode","seriesSpec","measureValueKey","isNullish"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,CAAS,KAAK,GAAG;YACjC,GAAIA,WAAW,KAAK,CAAS,KAAK;YAClC,MAAM,CAACzB,QACEA,OAAO,CAAC0B,gBAAgB,IAAIlC,aAAaK,YAAY,aAAa,GAAGA,YAAY,aAAa;QAEzG;IAEJ;IAEA,OAAOF;AACT"}
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/annotation/splitLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/splitLine.ts"],"sourcesContent":["import type { ICartesianSeries, IChart, ILineChartSpec, IVChart } from '@visactor/vchart'\nimport { array, clamper, Color as VUtilColor } from '@visactor/vutils'\nimport { isNullish, isNumber, isPlainObject } from 'remeda'\nimport type { AnnotationHorizontalLine, VChartSpecPipe, Color } from 'src/types'\n\ninterface SplitConfig {\n points: { x: number; y: number }[]\n splitCoordinate: number\n lineStroke: {\n gradient: string\n x0: number\n x1: number\n y0: number\n y1: number\n stops: {\n color: string\n offset: number\n }[]\n }\n areaFill: {\n gradient: string\n x0: number\n x1: number\n y0: number\n y1: number\n stops: {\n color: string\n offset: number\n }[]\n }\n}\n\nconst formatGradientStops = (stops: { color: string; offset: number }[]) => {\n const firstInvalidateIndex = stops.findIndex((stop) => stop.offset < 0 || stop.offset > 1)\n\n if (firstInvalidateIndex >= 0) {\n if (stops[firstInvalidateIndex].offset > 1) {\n const newStops = stops.slice(0, firstInvalidateIndex + 1)\n newStops[newStops.length - 1].offset = 1\n\n return newStops\n }\n const newStops = stops.slice(firstInvalidateIndex + 1)\n\n newStops[0].offset = 0\n return newStops\n }\n\n return stops\n}\n\nexport const splitLine: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { annotation, chartType, datasetReshapeInfo } = advancedVSeed\n\n if (!annotation || !annotation.annotationHorizontalLine) {\n return spec\n }\n const baseConfig = advancedVSeed.config[chartType] as { color: Color }\n\n const splitLineConfig = array(annotation.annotationHorizontalLine).find(\n (item) => !!(item as AnnotationHorizontalLine).splitLine,\n ) as AnnotationHorizontalLine | undefined\n\n const splitValue = +(splitLineConfig?.yValue as number | string)\n\n if (Number.isNaN(splitValue) || !isNumber(splitValue)) {\n return spec\n }\n const result = { ...spec } as Partial<ILineChartSpec>\n const colorTheme = baseConfig?.color ?? {}\n const colorConfig = {\n positiveColor: colorTheme.positiveColor || 'red',\n negativeColor: colorTheme.negativeColor || 'green',\n ...(isPlainObject(splitLineConfig?.splitLine) ? splitLineConfig?.splitLine : {}),\n }\n\n const groupMark = {\n type: 'group',\n name: 'annotationHorizontalLine-splitLine',\n zIndex: 300,\n style: {\n splitConfig: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const lineSeries = chart.getAllSeries().find((s) => s.type === 'line' || s.type === 'area') as ICartesianSeries\n\n if (!lineSeries) {\n return\n }\n const lineMark = lineSeries.getMarkInName('line') ?? lineSeries.getMarkInName('area')\n\n if (!lineMark) {\n return\n }\n const lineGraphics = lineMark.getGraphics()\n\n if (!lineGraphics || lineGraphics.length !== 1 || !lineGraphics[0]) {\n return\n }\n const points = ((lineGraphics[0].attribute as any).points ?? []) as { x: number; y: number }[]\n\n if ((lineGraphics[0].attribute as any).segments?.length) {\n ;((lineGraphics[0].attribute as any).segments as any[]).forEach(\n (seg: { points: { x: number; y: number }[] }) => {\n seg.points.forEach((pt: { x: number; y: number }) => {\n points.push({ x: pt.x, y: pt.y })\n })\n },\n )\n }\n\n if (!points || !points.length) {\n return\n }\n const scale = lineSeries.getYAxisHelper().getScale!(0)\n const splitCoordinate = scale.scale(splitValue)\n const minY = Math.min(...points.map((p) => p.y))\n const maxY = Math.max(...points.map((p) => p.y))\n const ratio = (splitCoordinate - minY) / (maxY - minY)\n\n const lineStroke = {\n gradient: 'linear',\n x0: 0,\n x1: 0,\n y0: 0,\n y1: 1,\n stops: formatGradientStops([\n {\n color: colorConfig.positiveColor,\n offset: 0,\n },\n {\n color: colorConfig.positiveColor,\n offset: ratio,\n },\n {\n color: colorConfig.negativeColor,\n offset: ratio + 0.0000001,\n },\n {\n color: colorConfig.negativeColor,\n offset: 1,\n },\n ]),\n }\n const areaFill = {\n gradient: 'linear',\n x0: 0,\n x1: 0,\n y0: 0,\n y1: 1,\n stops: formatGradientStops([\n {\n color: colorConfig.positiveColor,\n offset: 0,\n },\n {\n color: new VUtilColor(colorConfig.positiveColor).setOpacity(0).toRGBA(),\n offset: ratio,\n },\n {\n offset: ratio + 0.0000001,\n color: new VUtilColor(colorConfig.negativeColor).setOpacity(0).toRGBA(),\n },\n {\n color: colorConfig.negativeColor,\n offset: 1,\n },\n ]),\n }\n const attrs: any = {\n segments: null,\n points,\n }\n\n if (lineGraphics[0].type === 'area') {\n attrs.stroke = lineStroke\n attrs.fill = areaFill\n } else {\n attrs.stroke = lineStroke\n }\n\n lineGraphics[0].setAttributes(attrs as unknown as Record<string, any>)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n lineGraphics[0].setFinalAttributes?.(attrs)\n const start = lineSeries.getRegion().getLayoutStartPoint()\n const range = scale.range() as number[]\n\n return {\n points: points.map((entry) => ({ x: entry.x + start.x, y: entry.y + start.y })),\n splitCoordinate: clamper(range[0], range[range.length - 1])(splitCoordinate as number) + start.y,\n areaFill,\n lineStroke,\n } as SplitConfig\n },\n },\n children: [\n {\n type: 'area',\n interactive: false,\n zIndex: 500,\n style: {\n fillOpacity: 0.5,\n points: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.splitConfig) {\n const { points, splitCoordinate } = parentNode.attribute.splitConfig as SplitConfig\n\n return points.map((entry: { x: number; y: number }) => {\n return {\n ...entry,\n y1: splitCoordinate,\n }\n })\n }\n\n return []\n },\n fill: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.splitConfig) {\n const { areaFill } = parentNode.attribute.splitConfig as SplitConfig\n\n return areaFill\n }\n\n return\n },\n },\n },\n ],\n }\n\n if (!result.customMark) {\n result.customMark = []\n }\n\n ;(result.customMark as any[]).push(groupMark)\n\n const seriesSpec =\n result.type === 'line' || result.type === 'area'\n ? result\n : result.series?.find((s) => s.type === 'line' || s.type === 'area')\n\n if (seriesSpec) {\n if (!seriesSpec.point) {\n seriesSpec.point = {}\n }\n if (!seriesSpec.line) {\n seriesSpec.line = {}\n }\n\n if (!seriesSpec.point.style) {\n seriesSpec.point.style = {}\n }\n if (!seriesSpec.line.style) {\n seriesSpec.line.style = {}\n }\n\n const measureValueKey = datasetReshapeInfo[0].foldInfo.measureValue\n\n seriesSpec.point.style.fill = (datum) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n }\n seriesSpec.line.style.stroke = (datum) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n }\n if (seriesSpec.label && (seriesSpec.label as any).visible && isNullish((seriesSpec.label as any).style?.fill)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n ;(seriesSpec.label as any).style = {\n ...(seriesSpec.label as any).style,\n fill: (datum: any) => {\n return datum?.[measureValueKey] < splitValue ? colorConfig.negativeColor : colorConfig.positiveColor\n },\n }\n }\n }\n\n return result\n}\n"],"names":["formatGradientStops","stops","firstInvalidateIndex","stop","newStops","splitLine","spec","context","advancedVSeed","annotation","chartType","datasetReshapeInfo","baseConfig","splitLineConfig","array","item","splitValue","Number","isNumber","result","colorTheme","colorConfig","isPlainObject","groupMark","datum","ctx","vchart","chart","lineSeries","s","lineMark","lineGraphics","points","seg","pt","scale","splitCoordinate","minY","Math","p","maxY","ratio","lineStroke","areaFill","VUtilColor","attrs","start","range","entry","clamper","opt","parentNode","seriesSpec","measureValueKey","isNullish"],"mappings":";;AAgCA,MAAMA,sBAAsB,CAACC;IAC3B,MAAMC,uBAAuBD,MAAM,SAAS,CAAC,CAACE,OAASA,KAAK,MAAM,GAAG,KAAKA,KAAK,MAAM,GAAG;IAExF,IAAID,wBAAwB,GAAG;Q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xBA,WAAW,IAAI,CAAC,KAAK,GAAG,CAAC;QAG3B,MAAMC,kBAAkB1C,kBAAkB,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY;QAEnEyC,WAAW,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC5B,QACtBA,OAAO,CAAC6B,gBAAgB,GAAGrC,aAAaK,YAAY,aAAa,GAAGA,YAAY,aAAa;QAEtG+B,WAAW,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC5B,QACvBA,OAAO,CAAC6B,gBAAgB,GAAGrC,aAAaK,YAAY,aAAa,GAAGA,YAAY,aAAa;QAEtG,IAAI+B,WAAW,KAAK,IAAKA,WAAW,KAAK,CAAS,OAAO,IAAIE,UAAWF,WAAW,KAAK,CAAS,KAAK,EAAE,OAEpGA,WAAW,KAAK,CAAS,KAAK,GAAG;YACjC,GAAIA,WAAW,KAAK,CAAS,KAAK;YAClC,MAAM,CAAC5B,QACEA,OAAO,CAAC6B,gBAAgB,GAAGrC,aAAaK,YAAY,aAAa,GAAGA,YAAY,aAAa;QAExG;IAEJ;IAEA,OAAOF;AACT"}
|
|
@@ -1,2 +1,36 @@
|
|
|
1
1
|
import type { Datum } from '../../../../../types';
|
|
2
2
|
export declare const isSubset: (sub: Datum, obj: Datum) => boolean;
|
|
3
|
+
export declare const ANNOTATION_AREA_TEXT_STYLE_BY_POSITION: {
|
|
4
|
+
top: {
|
|
5
|
+
textAlign: string;
|
|
6
|
+
textBaseline: string;
|
|
7
|
+
};
|
|
8
|
+
topRight: {
|
|
9
|
+
textAlign: string;
|
|
10
|
+
textBaseline: string;
|
|
11
|
+
};
|
|
12
|
+
topLeft: {
|
|
13
|
+
textAlign: string;
|
|
14
|
+
textBaseline: string;
|
|
15
|
+
};
|
|
16
|
+
bottom: {
|
|
17
|
+
textAlign: string;
|
|
18
|
+
textBaseline: string;
|
|
19
|
+
};
|
|
20
|
+
bottomLeft: {
|
|
21
|
+
textAlign: string;
|
|
22
|
+
textBaseline: string;
|
|
23
|
+
};
|
|
24
|
+
bottomRight: {
|
|
25
|
+
textAlign: string;
|
|
26
|
+
textBaseline: string;
|
|
27
|
+
};
|
|
28
|
+
left: {
|
|
29
|
+
textAlign: string;
|
|
30
|
+
textBaseline: string;
|
|
31
|
+
};
|
|
32
|
+
right: {
|
|
33
|
+
textAlign: string;
|
|
34
|
+
textBaseline: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -3,6 +3,40 @@ const isSubset = (sub, obj)=>Object.entries(sub).every(([key, value])=>{
|
|
|
3
3
|
if ('number' == typeof value) return obj[key] === value;
|
|
4
4
|
return true;
|
|
5
5
|
});
|
|
6
|
-
|
|
6
|
+
const ANNOTATION_AREA_TEXT_STYLE_BY_POSITION = {
|
|
7
|
+
top: {
|
|
8
|
+
textAlign: 'center',
|
|
9
|
+
textBaseline: 'top'
|
|
10
|
+
},
|
|
11
|
+
topRight: {
|
|
12
|
+
textAlign: 'right',
|
|
13
|
+
textBaseline: 'top'
|
|
14
|
+
},
|
|
15
|
+
topLeft: {
|
|
16
|
+
textAlign: 'left',
|
|
17
|
+
textBaseline: 'top'
|
|
18
|
+
},
|
|
19
|
+
bottom: {
|
|
20
|
+
textAlign: 'center',
|
|
21
|
+
textBaseline: 'bottom'
|
|
22
|
+
},
|
|
23
|
+
bottomLeft: {
|
|
24
|
+
textAlign: 'left',
|
|
25
|
+
textBaseline: 'bottom'
|
|
26
|
+
},
|
|
27
|
+
bottomRight: {
|
|
28
|
+
textAlign: 'right',
|
|
29
|
+
textBaseline: 'bottom'
|
|
30
|
+
},
|
|
31
|
+
left: {
|
|
32
|
+
textAlign: 'left',
|
|
33
|
+
textBaseline: 'middle'
|
|
34
|
+
},
|
|
35
|
+
right: {
|
|
36
|
+
textAlign: 'right',
|
|
37
|
+
textBaseline: 'middle'
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export { ANNOTATION_AREA_TEXT_STYLE_BY_POSITION, isSubset };
|
|
7
41
|
|
|
8
42
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/annotation/utils.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/utils.ts"],"sourcesContent":["import type { Datum } from 'src/types'\n\nexport const isSubset = (sub: Datum, obj: Datum) => {\n return Object.entries(sub).every(([key, value]) => {\n if (typeof value === 'string') {\n return obj[key] === value\n }\n if (typeof value === 'number') {\n return obj[key] === value\n }\n return true\n })\n}\n"],"names":["isSubset","sub","obj","Object","key","value"],"mappings":"AAEO,MAAMA,WAAW,CAACC,KAAYC,MAC5BC,OAAO,OAAO,CAACF,KAAK,KAAK,CAAC,CAAC,CAACG,KAAKC,MAAM;QAC5C,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOH,GAAG,CAACE,IAAI,KAAKC;QAEtB,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOH,GAAG,CAACE,IAAI,KAAKC;QAEtB,OAAO;IACT"}
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/annotation/utils.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/utils.ts"],"sourcesContent":["import type { Datum } from 'src/types'\n\nexport const isSubset = (sub: Datum, obj: Datum) => {\n return Object.entries(sub).every(([key, value]) => {\n if (typeof value === 'string') {\n return obj[key] === value\n }\n if (typeof value === 'number') {\n return obj[key] === value\n }\n return true\n })\n}\n\nexport const ANNOTATION_AREA_TEXT_STYLE_BY_POSITION = {\n top: {\n textAlign: 'center',\n textBaseline: 'top',\n },\n topRight: {\n textAlign: 'right',\n textBaseline: 'top',\n },\n topLeft: {\n textAlign: 'left',\n textBaseline: 'top',\n },\n bottom: {\n textAlign: 'center',\n textBaseline: 'bottom',\n },\n bottomLeft: {\n textAlign: 'left',\n textBaseline: 'bottom',\n },\n bottomRight: {\n textAlign: 'right',\n textBaseline: 'bottom',\n },\n left: {\n textAlign: 'left',\n textBaseline: 'middle',\n },\n right: {\n textAlign: 'right',\n textBaseline: 'middle',\n },\n}\n"],"names":["isSubset","sub","obj","Object","key","value","ANNOTATION_AREA_TEXT_STYLE_BY_POSITION"],"mappings":"AAEO,MAAMA,WAAW,CAACC,KAAYC,MAC5BC,OAAO,OAAO,CAACF,KAAK,KAAK,CAAC,CAAC,CAACG,KAAKC,MAAM;QAC5C,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOH,GAAG,CAACE,IAAI,KAAKC;QAEtB,IAAI,AAAiB,YAAjB,OAAOA,OACT,OAAOH,GAAG,CAACE,IAAI,KAAKC;QAEtB,OAAO;IACT;AAGK,MAAMC,yCAAyC;IACpD,KAAK;QACH,WAAW;QACX,cAAc;IAChB;IACA,UAAU;QACR,WAAW;QACX,cAAc;IAChB;IACA,SAAS;QACP,WAAW;QACX,cAAc;IAChB;IACA,QAAQ;QACN,WAAW;QACX,cAAc;IAChB;IACA,YAAY;QACV,WAAW;QACX,cAAc;IAChB;IACA,aAAa;QACX,WAAW;QACX,cAAc;IAChB;IACA,MAAM;QACJ,WAAW;QACX,cAAc;IAChB;IACA,OAAO;QACL,WAAW;QACX,cAAc;IAChB;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const radarAngleAxis:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const radarAngleAxis: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/radarAngle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radarAngle.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/radarAngle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radarAngle.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radarAngleAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n orient: 'angle',\n visible: true,\n zero: true,\n nice: true,\n grid: {\n visible: true,\n },\n domainLine: {\n visible: true,\n },\n tick: {\n visible: true,\n },\n })\n\n return result\n}\n"],"names":["radarAngleAxis","spec","result"],"mappings":"AAGO,MAAMA,iBAAiC,CAACC;IAC7C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,MAAM;YACJ,SAAS;QACX;QACA,YAAY;YACV,SAAS;QACX;QACA,MAAM;YACJ,SAAS;QACX;IACF;IAEA,OAAOA;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const radarRadiusAxis:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const radarRadiusAxis: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/radarRadius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radarRadius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/radarRadius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radarRadius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radarRadiusAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n orient: 'radius',\n visible: true,\n zero: true,\n nice: true,\n grid: {\n visible: true,\n },\n tick: {\n visible: true,\n },\n label: {\n visible: true,\n },\n domainLine: {\n visible: true,\n },\n })\n\n return result\n}\n"],"names":["radarRadiusAxis","spec","result"],"mappings":"AAGO,MAAMA,kBAAkC,CAACC;IAC9C,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,MAAM;YACJ,SAAS;QACX;QACA,MAAM;YACJ,SAAS;QACX;QACA,OAAO;YACL,SAAS;QACX;QACA,YAAY;YACV,SAAS;QACX;IACF;IAEA,OAAOA;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const radiusAxis:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const radiusAxis: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/radius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/radius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { VChartSpecPipe } from 'src/types'\n\nexport const radiusAxis: VChartSpecPipe = (spec) => {\n const result = { ...spec } as IRoseChartSpec\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n type: 'linear',\n orient: 'radius',\n visible: false,\n zero: true,\n nice: false,\n })\n\n return result\n}\n"],"names":["radiusAxis","spec","result"],"mappings":"AAGO,MAAMA,aAA6B,CAACC;IACzC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,IAAI,CAACC,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,MAAM;QACN,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;IACR;IAEA,OAAOA;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const xBand:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const xBand: VChartSpecPipe;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defaultTitleText } from "./title/defaultTitleText.js";
|
|
2
|
+
import { AXIS_LABEL_SPACE } from "../../../../utils/index.js";
|
|
2
3
|
const xBand = (spec, context)=>{
|
|
3
4
|
const result = {
|
|
4
5
|
...spec
|
|
@@ -20,7 +21,7 @@ const xBand = (spec, context)=>{
|
|
|
20
21
|
label: {
|
|
21
22
|
visible: label?.visible,
|
|
22
23
|
flush: true,
|
|
23
|
-
space:
|
|
24
|
+
space: AXIS_LABEL_SPACE,
|
|
24
25
|
style: {
|
|
25
26
|
maxLineWidth: labelAutoLimitLength,
|
|
26
27
|
fill: label?.labelColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/xBand.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/xBand.ts"],"sourcesContent":["import type { ICartesianBandAxisSpec, ISpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/xBand.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/xBand.ts"],"sourcesContent":["import type { ICartesianBandAxisSpec, ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis } from 'src/types'\nimport { defaultTitleText } from './title/defaultTitleText'\nimport { AXIS_LABEL_SPACE } from 'src/pipeline/utils'\n\nexport const xBand: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { measures, dimensions, encoding } = advancedVSeed\n const config = advancedVSeed.config?.[chartType as 'column']?.xAxis as XBandAxis\n\n if (!result.axes) {\n result.axes = []\n }\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n labelAutoHide,\n labelAutoHideGap,\n labelAutoLimit,\n labelAutoLimitLength = 80,\n labelAutoRotate,\n labelAutoRotateAngleRange,\n } = config\n\n const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit)\n\n const bandAxis = {\n visible,\n type: 'band',\n orient: 'bottom',\n maxHeight: labelAutoLimitLength + 60,\n sampling,\n hover: true,\n label: {\n visible: label?.visible,\n flush: true,\n space: AXIS_LABEL_SPACE,\n style: {\n maxLineWidth: labelAutoLimitLength,\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n\n // 防重叠相关\n minGap: labelAutoHideGap,\n autoHide: labelAutoHide,\n autoHideMethod: 'greedy',\n autoHideSeparation: labelAutoHideGap,\n autoLimit: labelAutoLimit,\n autoRotate: labelAutoRotate,\n autoRotateAngle: labelAutoRotateAngleRange,\n lastVisible: true,\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n paddingInner: [0.15, 0.1],\n paddingOuter: [0.075, 0.1],\n } as ICartesianBandAxisSpec\n\n result.axes = [...result.axes, bandAxis] as ISpec['axes']\n return result\n}\n"],"names":["xBand","spec","context","result","advancedVSeed","vseed","chartType","measures","dimensions","encoding","config","visible","label","tick","title","grid","line","labelAutoHide","labelAutoHideGap","labelAutoLimit","labelAutoLimitLength","labelAutoRotate","labelAutoRotateAngleRange","sampling","bandAxis","AXIS_LABEL_SPACE","defaultTitleText"],"mappings":";;AAKO,MAAMA,QAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGL;IAC3C,MAAMM,SAASN,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAE9D,IAAI,CAACH,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAM,EACJQ,UAAU,IAAI,EACdC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,IAAI,EACJC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,uBAAuB,EAAE,EACzBC,eAAe,EACfC,yBAAyB,EAC1B,GAAGZ;IAEJ,MAAMa,WAAW,CAAEN,CAAAA,iBAAiBI,mBAAmBF,cAAa;IAEpE,MAAMK,WAAW;QACfb;QACA,MAAM;QACN,QAAQ;QACR,WAAWS,uBAAuB;QAClCG;QACA,OAAO;QACP,OAAO;YACL,SAASX,OAAO;YAChB,OAAO;YACP,OAAOa;YACP,OAAO;gBACL,cAAcL;gBACd,MAAMR,OAAO;gBACb,OAAOA,OAAO;gBACd,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;YAGA,QAAQM;YACR,UAAUD;YACV,gBAAgB;YAChB,oBAAoBC;YACpB,WAAWC;YACX,YAAYE;YACZ,iBAAiBC;YACjB,aAAa;QACf;QACA,OAAO;YACL,SAASR,OAAO;YAChB,MAAMA,OAAO,aAAaY,iBAAiBnB,UAAUC,YAAYC,SAAS,CAAC;YAC3E,OAAO;gBACL,MAAMK,OAAO;gBACb,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,MAAM;YACJ,SAASD,MAAM;YACf,UAAUA,MAAM;YAChB,QAAQA,MAAM;YACd,OAAO;gBACL,QAAQA,MAAM;YAChB;QACF;QACA,MAAM;YACJ,SAASE,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;gBACd,UAAUA,MAAM;YAClB;QACF;QACA,YAAY;YACV,SAASC,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;YAChB;QACF;QACA,cAAc;YAAC;YAAM;SAAI;QACzB,cAAc;YAAC;YAAO;SAAI;IAC5B;IAEAb,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAEqB;KAAS;IACxC,OAAOrB;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const xLinear:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const xLinear: VChartSpecPipe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LINEAR_AXIS_INNER_OFFSET_TOP, createNumFormatter, isAreaPercent, isBarPercent, isColumnPercent } from "../../../../utils/index.js";
|
|
1
|
+
import { AXIS_LABEL_SPACE, LINEAR_AXIS_INNER_OFFSET_TOP, createNumFormatter, isAreaPercent, isBarPercent, isColumnPercent } from "../../../../utils/index.js";
|
|
2
2
|
import { createLinearFormat, createLinearPercentFormat } from "./format/linearFormat.js";
|
|
3
3
|
import { defaultTitleText } from "./title/defaultTitleText.js";
|
|
4
4
|
const xLinear = (spec, context)=>{
|
|
@@ -26,6 +26,7 @@ const xLinear = (spec, context)=>{
|
|
|
26
26
|
max,
|
|
27
27
|
min,
|
|
28
28
|
label: {
|
|
29
|
+
space: AXIS_LABEL_SPACE,
|
|
29
30
|
visible: label?.visible,
|
|
30
31
|
formatMethod: (value)=>{
|
|
31
32
|
if (isBarPercent(vseed) || isColumnPercent(vseed) || isAreaPercent(vseed)) return createLinearPercentFormat(value, autoFormat, numFormat, formatter, percentFormatter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/xLinear.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/xLinear.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/xLinear.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/xLinear.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XLinearAxis } from 'src/types'\nimport {\n AXIS_LABEL_SPACE,\n createNumFormatter,\n isAreaPercent,\n isBarPercent,\n isColumnPercent,\n LINEAR_AXIS_INNER_OFFSET_TOP,\n} from 'src/pipeline/utils'\nimport { createLinearFormat, createLinearPercentFormat } from './format/linearFormat'\nimport { defaultTitleText } from './title/defaultTitleText'\n\nexport const xLinear: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { encoding, dimensions, measures } = advancedVSeed\n const { chartType } = vseed\n const config = advancedVSeed.config?.[chartType as 'bar']?.xAxis as XLinearAxis\n\n if (!result.axes) {\n result.axes = []\n }\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n\n zero,\n nice,\n inverse,\n max,\n min,\n log,\n logBase = 10,\n autoFormat,\n numFormat = {},\n } = config\n\n const formatter = createNumFormatter(numFormat)\n const percentFormatter = createNumFormatter({\n type: 'percent',\n })\n\n const linearAxis = {\n visible,\n type: log ? 'log' : 'linear',\n base: logBase,\n orient: 'bottom',\n nice,\n zero: log ? false : zero,\n inverse,\n max,\n min,\n label: {\n space: AXIS_LABEL_SPACE,\n visible: label?.visible,\n formatMethod: (value: string) => {\n if (isBarPercent(vseed) || isColumnPercent(vseed) || isAreaPercent(vseed)) {\n return createLinearPercentFormat(value, autoFormat, numFormat, formatter, percentFormatter)\n }\n return createLinearFormat(value, autoFormat, numFormat, formatter)\n },\n style: {\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n innerOffset: {\n right: LINEAR_AXIS_INNER_OFFSET_TOP,\n // left: LINEAR_AXIS_INNER_OFFSET_TOP,\n },\n }\n\n result.axes = [...result.axes, linearAxis] as ISpec['axes']\n\n return result\n}\n"],"names":["xLinear","spec","context","result","advancedVSeed","vseed","encoding","dimensions","measures","chartType","config","visible","label","tick","title","grid","line","zero","nice","inverse","max","min","log","logBase","autoFormat","numFormat","formatter","createNumFormatter","percentFormatter","linearAxis","AXIS_LABEL_SPACE","value","isBarPercent","isColumnPercent","isAreaPercent","createLinearPercentFormat","createLinearFormat","defaultTitleText","LINEAR_AXIS_INNER_OFFSET_TOP"],"mappings":";;;AAaO,MAAMA,UAA0B,CAACC,MAAMC;IAC5C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,M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ACd,OAAO;gBACL,QAAQA,MAAM;YAChB;QACF;QACA,MAAM;YACJ,SAASE,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;gBACd,UAAUA,MAAM;YAClB;QACF;QACA,YAAY;YACV,SAASC,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;YAChB;QACF;QACA,aAAa;YACX,OAAOsB;QAET;IACF;IAEAnC,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAE0B;KAAW;IAE1C,OAAO1B;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const yBand:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const yBand: VChartSpecPipe;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defaultTitleText } from "./title/defaultTitleText.js";
|
|
2
|
+
import { AXIS_LABEL_SPACE } from "../../../../utils/index.js";
|
|
2
3
|
const yBand = (spec, context)=>{
|
|
3
4
|
const result = {
|
|
4
5
|
...spec
|
|
@@ -21,7 +22,7 @@ const yBand = (spec, context)=>{
|
|
|
21
22
|
visible: label?.visible,
|
|
22
23
|
flush: true,
|
|
23
24
|
containerAlign: 'right',
|
|
24
|
-
space:
|
|
25
|
+
space: AXIS_LABEL_SPACE,
|
|
25
26
|
style: {
|
|
26
27
|
maxLineWidth: labelAutoLimitLength,
|
|
27
28
|
fill: label?.labelColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/yBand.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yBand.ts"],"sourcesContent":["import type { ICartesianBandAxisSpec, ISpec } from '@visactor/vchart'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/yBand.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yBand.ts"],"sourcesContent":["import type { ICartesianBandAxisSpec, ISpec } from '@visactor/vchart'\nimport type { VChartSpecPipe, XBandAxis } from 'src/types'\nimport { defaultTitleText } from './title/defaultTitleText'\nimport { AXIS_LABEL_SPACE } from 'src/pipeline/utils'\n\nexport const yBand: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { measures, dimensions, encoding } = advancedVSeed\n const config = advancedVSeed.config?.[chartType as 'bar']?.yAxis as XBandAxis\n\n if (!result.axes) {\n result.axes = []\n }\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n labelAutoHide,\n labelAutoHideGap,\n labelAutoLimit,\n labelAutoLimitLength = 80,\n labelAutoRotate,\n labelAutoRotateAngleRange,\n } = config\n\n const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit)\n\n const bandAxis = {\n visible,\n type: 'band',\n orient: 'left',\n maxWidth: labelAutoLimitLength + 60,\n sampling,\n hover: true,\n label: {\n visible: label?.visible,\n flush: true,\n containerAlign: 'right',\n space: AXIS_LABEL_SPACE,\n style: {\n maxLineWidth: labelAutoLimitLength,\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n // 防重叠相关\n minGap: labelAutoHideGap,\n autoHide: labelAutoHide,\n autoHideMethod: 'greedy',\n autoHideSeparation: labelAutoHideGap,\n autoLimit: labelAutoLimit,\n autoRotate: labelAutoRotate,\n autoRotateAngle: labelAutoRotateAngleRange,\n lastVisible: true,\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n paddingInner: [0.15, 0.1],\n paddingOuter: [0.075, 0.1],\n } as ICartesianBandAxisSpec\n\n result.axes = [...result.axes, bandAxis] as ISpec['axes']\n return result\n}\n"],"names":["yBand","spec","context","result","advancedVSeed","vseed","chartType","measures","dimensions","encoding","config","visible","label","tick","title","grid","line","labelAutoHide","labelAutoHideGap","labelAutoLimit","labelAutoLimitLength","labelAutoRotate","labelAutoRotateAngleRange","sampling","bandAxis","AXIS_LABEL_SPACE","defaultTitleText"],"mappings":";;AAKO,MAAMA,QAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGL;IAC3C,MAAMM,SAASN,cAAc,MAAM,EAAE,CAACE,UAAmB,EAAE;IAE3D,IAAI,CAACH,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAM,EACJQ,UAAU,IAAI,EACdC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,IAAI,EACJC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,uBAAuB,EAAE,EACzBC,eAAe,EACfC,yBAAyB,EAC1B,GAAGZ;IAEJ,MAAMa,WAAW,CAAEN,CAAAA,iBAAiBI,mBAAmBF,cAAa;IAEpE,MAAMK,WAAW;QACfb;QACA,MAAM;QACN,QAAQ;QACR,UAAUS,uBAAuB;QACjCG;QACA,OAAO;QACP,OAAO;YACL,SAASX,OAAO;YAChB,OAAO;YACP,gBAAgB;YAChB,OAAOa;YACP,OAAO;gBACL,cAAcL;gBACd,MAAMR,OAAO;gBACb,OAAOA,OAAO;gBACd,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;YAEA,QAAQM;YACR,UAAUD;YACV,gBAAgB;YAChB,oBAAoBC;YACpB,WAAWC;YACX,YAAYE;YACZ,iBAAiBC;YACjB,aAAa;QACf;QACA,OAAO;YACL,SAASR,OAAO;YAChB,MAAMA,OAAO,aAAaY,iBAAiBnB,UAAUC,YAAYC,SAAS,CAAC;YAC3E,OAAO;gBACL,MAAMK,OAAO;gBACb,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,MAAM;YACJ,SAASD,MAAM;YACf,UAAUA,MAAM;YAChB,QAAQA,MAAM;YACd,OAAO;gBACL,QAAQA,MAAM;YAChB;QACF;QACA,MAAM;YACJ,SAASE,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;gBACd,UAAUA,MAAM;YAClB;QACF;QACA,YAAY;YACV,SAASC,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;YAChB;QACF;QACA,cAAc;YAAC;YAAM;SAAI;QACzB,cAAc;YAAC;YAAO;SAAI;IAC5B;IAEAb,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAEqB;KAAS;IACxC,OAAOrB;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const yLinear:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const yLinear: VChartSpecPipe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LINEAR_AXIS_INNER_OFFSET_TOP, createNumFormatter, isAreaPercent, isBarPercent, isColumnPercent } from "../../../../utils/index.js";
|
|
1
|
+
import { AXIS_LABEL_SPACE, LINEAR_AXIS_INNER_OFFSET_TOP, createNumFormatter, isAreaPercent, isBarPercent, isColumnPercent } from "../../../../utils/index.js";
|
|
2
2
|
import { createLinearFormat, createLinearPercentFormat } from "./format/linearFormat.js";
|
|
3
3
|
import { defaultTitleText } from "./title/defaultTitleText.js";
|
|
4
4
|
const yLinear = (spec, context)=>{
|
|
@@ -26,6 +26,7 @@ const yLinear = (spec, context)=>{
|
|
|
26
26
|
max,
|
|
27
27
|
min,
|
|
28
28
|
label: {
|
|
29
|
+
space: AXIS_LABEL_SPACE,
|
|
29
30
|
visible: label?.visible,
|
|
30
31
|
formatMethod: (value)=>{
|
|
31
32
|
if (isBarPercent(vseed) || isColumnPercent(vseed) || isAreaPercent(vseed)) return createLinearPercentFormat(value, autoFormat, numFormat, formatter, percentFormatter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/yLinear.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yLinear.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport {\n createNumFormatter,\n isAreaPercent,\n isBarPercent,\n isColumnPercent,\n LINEAR_AXIS_INNER_OFFSET_TOP,\n} from 'src/pipeline/utils'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/yLinear.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yLinear.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport {\n AXIS_LABEL_SPACE,\n createNumFormatter,\n isAreaPercent,\n isBarPercent,\n isColumnPercent,\n LINEAR_AXIS_INNER_OFFSET_TOP,\n} from 'src/pipeline/utils'\nimport type { VChartSpecPipe, YLinearAxis } from 'src/types'\nimport { createLinearFormat, createLinearPercentFormat } from './format/linearFormat'\nimport { defaultTitleText } from './title/defaultTitleText'\n\nexport const yLinear: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { measures, dimensions, encoding } = advancedVSeed\n const config = advancedVSeed.config?.[chartType as 'column']?.yAxis as YLinearAxis\n\n if (!result.axes) {\n result.axes = []\n }\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n\n zero,\n nice,\n inverse,\n max,\n min,\n log,\n logBase = 10,\n autoFormat,\n numFormat = {},\n } = config\n\n const formatter = createNumFormatter(numFormat)\n const percentFormatter = createNumFormatter({\n type: 'percent',\n })\n\n const linearAxis = {\n visible,\n type: log ? 'log' : 'linear',\n base: logBase,\n orient: 'left',\n nice,\n zero: log ? false : zero,\n inverse,\n max,\n min,\n label: {\n space: AXIS_LABEL_SPACE,\n visible: label?.visible,\n formatMethod: (value: string) => {\n if (isBarPercent(vseed) || isColumnPercent(vseed) || isAreaPercent(vseed)) {\n return createLinearPercentFormat(value, autoFormat, numFormat, formatter, percentFormatter)\n }\n return createLinearFormat(value, autoFormat, numFormat, formatter)\n },\n style: {\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n innerOffset: {\n top: LINEAR_AXIS_INNER_OFFSET_TOP,\n // bottom: LINEAR_AXIS_INNER_OFFSET_TOP,\n },\n }\n\n result.axes = [...result.axes, linearAxis] as ISpec['axes']\n\n return result\n}\n"],"names":["yLinear","spec","context","result","advancedVSeed","vseed","chartType","measures","dimensions","encoding","config","visible","label","tick","title","grid","line","zero","nice","inverse","max","min","log","logBase","autoFormat","numFormat","formatter","createNumFormatter","percentFormatter","linearAxis","AXIS_LABEL_SPACE","value","isBarPercent","isColumnPercent","isAreaPercent","createLinearPercentFormat","createLinearFormat","defaultTitleText","LINEAR_AXIS_INNER_OFFSET_TOP"],"mappings":";;;AAaO,MAAMA,UAA0B,CAACC,MAAMC;IAC5C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGL;IAC3C,MAAMM,SAASN,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAE9D,IAAI,CAACH,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlB,MAAM,EACJQ,UAAU,IAAI,EACdC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,IAAI,EAEJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,GAAG,EACHC,GAAG,EACHC,GAAG,EACHC,UAAU,EAAE,EACZC,UAAU,EACVC,YAAY,CAAC,CAAC,EACf,GAAGf;IAEJ,MAAMgB,YAAYC,mBAAmBF;IACrC,MAAMG,mBAAmBD,mBAAmB;QAC1C,MAAM;IACR;IAEA,MAAME,aAAa;QACjBlB;QACA,MAAMW,MAAM,QAAQ;QACpB,MAAMC;QACN,QAAQ;QACRL;QACA,MAAMI,MAAM,QAAQL;QACpBE;QACAC;QACAC;QACA,OAAO;YACL,OAAOS;YACP,SAASlB,OAAO;YAChB,cAAc,CAACmB;gBACb,IAAIC,aAAa3B,UAAU4B,gBAAgB5B,UAAU6B,cAAc7B,QACjE,OAAO8B,0BAA0BJ,OAAOP,YAAYC,WAAWC,WAAWE;gBAE5E,OAAOQ,mBAAmBL,OAAOP,YAAYC,WAAWC;YAC1D;YACA,OAAO;gBACL,MAAMd,OAAO;gBACb,OAAOA,OAAO;gBACd,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,OAAO;YACL,SAASE,OAAO;YAChB,MAAMA,OAAO,aAAauB,iBAAiB9B,UAAUC,YAAYC,SAAS,CAAC;YAC3E,OAAO;gBACL,MAAMK,OAAO;gBACb,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,MAAM;YACJ,SAASD,MAAM;YACf,UAAUA,MAAM;YAChB,QAAQA,MAAM;YACd,OAAO;gBACL,QAAQA,MAAM;YAChB;QACF;QACA,MAAM;YACJ,SAASE,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;gBACd,UAAUA,MAAM;YAClB;QACF;QACA,YAAY;YACV,SAASC,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;YAChB;QACF;QACA,aAAa;YACX,KAAKsB;QAEP;IACF;IAEAnC,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAE0B;KAAW;IAE1C,OAAO1B;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const yLinearPrimary:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const yLinearPrimary: VChartSpecPipe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LINEAR_AXIS_INNER_OFFSET_TOP } from "../../../../utils/constant.js";
|
|
1
|
+
import { AXIS_LABEL_SPACE, LINEAR_AXIS_INNER_OFFSET_TOP } from "../../../../utils/constant.js";
|
|
2
2
|
import { createNumFormatter } from "../../../../utils/index.js";
|
|
3
3
|
import { isEmpty, isNullish } from "remeda";
|
|
4
4
|
import { createLinearFormat } from "./format/linearFormat.js";
|
|
@@ -39,6 +39,7 @@ const yLinearPrimary = (spec, context)=>{
|
|
|
39
39
|
max,
|
|
40
40
|
min,
|
|
41
41
|
label: {
|
|
42
|
+
space: AXIS_LABEL_SPACE,
|
|
42
43
|
visible: label?.visible,
|
|
43
44
|
formatMethod: (value)=>createLinearFormat(value, autoFormat, numFormat, formatter),
|
|
44
45
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/yLinearPrimary.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yLinearPrimary.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport { LINEAR_AXIS_INNER_OFFSET_TOP } from '../../../../utils/constant'\nimport { createNumFormatter } from '../../../../utils'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/yLinearPrimary.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yLinearPrimary.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport { AXIS_LABEL_SPACE, LINEAR_AXIS_INNER_OFFSET_TOP } from '../../../../utils/constant'\nimport { createNumFormatter } from '../../../../utils'\nimport type { VChartSpecPipe, YLinearAxis } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\nimport { createLinearFormat } from './format/linearFormat'\nimport { defaultTitleText } from './title/defaultTitleText'\n\nexport const yLinearPrimary: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { datasetReshapeInfo, encoding, measures, dimensions } = advancedVSeed\n const { index, id: reshapeInfoId, foldInfoList } = datasetReshapeInfo[0]\n // TODO: default config missing\n const primaryYAxis = advancedVSeed.config?.[chartType as 'dualAxis']?.primaryYAxis as YLinearAxis | YLinearAxis[]\n const yAxisConfig = Array.isArray(primaryYAxis) ? primaryYAxis[index] || primaryYAxis[0] : primaryYAxis\n const alignTicks = advancedVSeed.config?.[chartType as 'dualAxis']?.alignTicks as boolean | boolean[]\n const alignTicksConfig = Array.isArray(alignTicks) ? alignTicks[index] || alignTicks[0] : alignTicks\n\n if (isNullish(foldInfoList?.[0])) {\n return result\n }\n\n const isEmptySecondary = isEmpty(foldInfoList?.[0].foldMap)\n\n const id = `${reshapeInfoId}-primary-axis`\n const seriesIds = [`${reshapeInfoId}-primary-series`, `${reshapeInfoId}-secondary-series`]\n const seriesId = alignTicksConfig ? seriesIds : seriesIds[0]\n\n if (!result.axes) {\n result.axes = []\n }\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n\n zero,\n nice,\n inverse,\n max,\n min,\n log,\n logBase = 10,\n\n autoFormat,\n numFormat = {},\n } = yAxisConfig\n\n const formatter = createNumFormatter(numFormat)\n\n const linearAxis = {\n visible: isEmptySecondary ? false : visible,\n id,\n seriesId,\n\n type: log ? 'log' : 'linear',\n base: logBase,\n orient: 'left',\n nice,\n zero: log ? false : zero,\n inverse,\n max,\n min,\n label: {\n space: AXIS_LABEL_SPACE,\n visible: label?.visible,\n formatMethod: (value: string) => {\n return createLinearFormat(value, autoFormat, numFormat, formatter)\n },\n style: {\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n innerOffset: {\n top: LINEAR_AXIS_INNER_OFFSET_TOP,\n // bottom: LINEAR_AXIS_INNER_OFFSET_TOP,\n },\n }\n\n result.axes = [...result.axes, linearAxis] as ISpec['axes']\n\n return result\n}\n"],"names":["yLinearPrimary","spec","context","result","advancedVSeed","vseed","chartType","datasetReshapeInfo","encoding","measures","dimensions","index","reshapeInfoId","foldInfoList","primaryYAxis","yAxisConfig","Array","alignTicks","alignTicksConfig","isNullish","isEmptySecondary","isEmpty","id","seriesIds","seriesId","visible","label","tick","title","grid","line","zero","nice","inverse","max","min","log","logBase","autoFormat","numFormat","formatter","createNumFormatter","linearAxis","AXIS_LABEL_SPACE","value","createLinearFormat","defaultTitleText","LINEAR_AXIS_INNER_OFFSET_TOP"],"mappings":";;;;;AAQO,MAAMA,iBAAiC,CAACC,MAAMC;IACnD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAM,EAAEE,kBAAkB,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGN;IAC/D,MAAM,EAAEO,KAAK,EAAE,IAAIC,aAAa,EAAEC,YAAY,EAAE,GAAGN,kBAAkB,CAAC,EAAE;IAExE,MAAMO,eAAeV,cAAc,MAAM,EAAE,CAACE,UAAwB,EAAE;IACtE,MAAMS,cAAcC,MAAM,OAAO,CAACF,gBAAgBA,YAAY,CAACH,MAAM,IAAIG,YAAY,CAAC,EAAE,GAAGA;IAC3F,MAAMG,aAAab,cAAc,MAAM,EAAE,CAACE,UAAwB,EAAE;IACpE,MAAMY,mBAAmBF,MAAM,OAAO,CAACC,cAAcA,UAAU,CAACN,MAAM,IAAIM,UAAU,CAAC,EAAE,GAAGA;IAE1F,IAAIE,UAAUN,cAAc,CAAC,EAAE,GAC7B,OAAOV;IAGT,MAAMiB,mBAAmBC,QAAQR,cAAc,CAAC,EAAE,CAAC;IAEnD,MAAMS,KAAK,GAAGV,cAAc,aAAa,CAAC;IAC1C,MAAMW,YAAY;QAAC,GAAGX,cAAc,eAAe,CAAC;QAAE,GAAGA,cAAc,iBAAiB,CAAC;KAAC;IAC1F,MAAMY,WAAWN,mBAAmBK,YAAYA,SAAS,CAAC,EA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,GAAG;WAAIA,OAAO,IAAI;QAAEuC;KAAW;IAE1C,OAAOvC;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const yLinearSecondary:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const yLinearSecondary: VChartSpecPipe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LINEAR_AXIS_INNER_OFFSET_TOP } from "../../../../utils/constant.js";
|
|
1
|
+
import { AXIS_LABEL_SPACE, LINEAR_AXIS_INNER_OFFSET_TOP } from "../../../../utils/constant.js";
|
|
2
2
|
import { createNumFormatter } from "../../../../utils/index.js";
|
|
3
3
|
import { isEmpty, isNullish } from "remeda";
|
|
4
4
|
import { createLinearFormat } from "./format/linearFormat.js";
|
|
@@ -45,6 +45,7 @@ const yLinearSecondary = (spec, context)=>{
|
|
|
45
45
|
max,
|
|
46
46
|
min,
|
|
47
47
|
label: {
|
|
48
|
+
space: AXIS_LABEL_SPACE,
|
|
48
49
|
visible: label?.visible,
|
|
49
50
|
formatMethod: (value)=>createLinearFormat(value, autoFormat, numFormat, formatter),
|
|
50
51
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/yLinearSecondary.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yLinearSecondary.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport { LINEAR_AXIS_INNER_OFFSET_TOP } from '../../../../utils/constant'\nimport { createNumFormatter } from '../../../../utils'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/yLinearSecondary.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/yLinearSecondary.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport { AXIS_LABEL_SPACE, LINEAR_AXIS_INNER_OFFSET_TOP } from '../../../../utils/constant'\nimport { createNumFormatter } from '../../../../utils'\nimport type { VChartSpecPipe, YLinearAxis } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\nimport { createLinearFormat } from './format/linearFormat'\nimport { defaultTitleText } from './title/defaultTitleText'\n\nexport const yLinearSecondary: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const { datasetReshapeInfo, measures, dimensions, encoding } = advancedVSeed\n const { index, id: reshapeInfoId, foldInfoList } = datasetReshapeInfo[0]\n // TODO: default config missing\n const secondaryYAxis = advancedVSeed.config?.[chartType as 'dualAxis']?.secondaryYAxis as YLinearAxis | YLinearAxis[]\n const yAxisConfig = Array.isArray(secondaryYAxis) ? secondaryYAxis[index] || secondaryYAxis[0] : secondaryYAxis\n const alignTicks = advancedVSeed.config?.[chartType as 'dualAxis']?.alignTicks as boolean | boolean[]\n const alignTicksConfig = Array.isArray(alignTicks) ? alignTicks[index] || alignTicks[0] : alignTicks\n\n if (isNullish(foldInfoList?.[1])) {\n return result\n }\n\n const isEmptySecondary = isEmpty(foldInfoList?.[1].foldMap)\n const onlySecondary = isEmpty(foldInfoList?.[0].foldMap) && !isEmptySecondary\n\n const sync = {\n axisId: `${reshapeInfoId}-primary-axis`,\n zeroAlign: true,\n }\n\n const id = `${reshapeInfoId}-secondary-axis`\n const seriesIds = [`${reshapeInfoId}-primary-series`, `${reshapeInfoId}-secondary-series`]\n const seriesId = alignTicksConfig ? seriesIds : seriesIds[1]\n if (!result.axes) {\n result.axes = []\n }\n\n const {\n visible = true,\n label,\n tick,\n title,\n grid,\n line,\n\n zero,\n nice,\n inverse,\n max,\n min,\n log,\n logBase = 10,\n numFormat = {},\n autoFormat,\n } = yAxisConfig\n\n const formatter = createNumFormatter(numFormat)\n\n const linearAxis = {\n visible: isEmptySecondary ? false : visible,\n id,\n seriesId,\n sync,\n type: log ? 'log' : 'linear',\n base: logBase,\n orient: 'right',\n nice,\n zero: log ? false : zero,\n inverse,\n max,\n min,\n label: {\n space: AXIS_LABEL_SPACE,\n visible: label?.visible,\n formatMethod: (value: string) => {\n return createLinearFormat(value, autoFormat, numFormat, formatter)\n },\n style: {\n fill: label?.labelColor,\n angle: label?.labelAngle,\n fontSize: label?.labelFontSize,\n fontWeight: label?.labelFontWeight,\n },\n },\n title: {\n visible: title?.visible,\n text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y as string[]),\n style: {\n fill: title?.titleColor,\n fontSize: title?.titleFontSize,\n fontWeight: title?.titleFontWeight,\n },\n },\n tick: {\n visible: tick?.visible,\n tickSize: tick?.tickSize,\n inside: tick?.tickInside,\n style: {\n stroke: tick?.tickColor,\n },\n },\n grid: {\n visible: onlySecondary ? true : grid?.visible,\n style: {\n lineWidth: grid?.gridWidth,\n stroke: grid?.gridColor,\n lineDash: grid?.gridLineDash,\n },\n },\n domainLine: {\n visible: line?.visible,\n style: {\n lineWidth: line?.lineWidth,\n stroke: line?.lineColor,\n },\n },\n innerOffset: {\n top: LINEAR_AXIS_INNER_OFFSET_TOP,\n // bottom: LINEAR_AXIS_INNER_OFFSET_TOP,\n },\n }\n\n result.axes = [...result.axes, linearAxis] as ISpec['axes']\n\n return result\n}\n"],"names":["yLinearSecondary","spec","context","result","advancedVSeed","vseed","chartType","datasetReshapeInfo","measures","dimensions","encoding","index","reshapeInfoId","foldInfoList","secondaryYAxis","yAxisConfig","Array","alignTicks","alignTicksConfig","isNullish","isEmptySecondary","isEmpty","onlySecondary","sync","id","seriesIds","seriesId","visible","label","tick","title","grid","line","zero","nice","inverse","max","min","log","logBase","numFormat","autoFormat","formatter","createNumFormatter","linearAxis","AXIS_LABEL_SPACE","value","createLinearFormat","defaultTitleText","LINEAR_AXIS_INNER_OFFSET_TOP"],"mappings":";;;;;AAQO,MAAMA,mBAAmC,CAACC,MAAMC;IACrD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI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AAU,EACX,GAAG1B;IAEJ,MAAM2B,YAAYC,mBAAmBH;IAErC,MAAMI,aAAa;QACjB,SAASxB,mBAAmB,QAAQO;QACpCH;QACAE;QACAH;QACA,MAAMe,MAAM,QAAQ;QACpB,MAAMC;QACN,QAAQ;QACRL;QACA,MAAMI,MAAM,QAAQL;QACpBE;QACAC;QACAC;QACA,OAAO;YACL,OAAOQ;YACP,SAASjB,OAAO;YAChB,cAAc,CAACkB,QACNC,mBAAmBD,OAAOL,YAAYD,WAAWE;YAE1D,OAAO;gBACL,MAAMd,OAAO;gBACb,OAAOA,OAAO;gBACd,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,OAAO;YACL,SAASE,OAAO;YAChB,MAAMA,OAAO,aAAakB,iBAAiBxC,UAAUC,YAAYC,SAAS,CAAC;YAC3E,OAAO;gBACL,MAAMoB,OAAO;gBACb,UAAUA,OAAO;gBACjB,YAAYA,OAAO;YACrB;QACF;QACA,MAAM;YACJ,SAASD,MAAM;YACf,UAAUA,MAAM;YAChB,QAAQA,MAAM;YACd,OAAO;gBACL,QAAQA,MAAM;YAChB;QACF;QACA,MAAM;YACJ,SAASP,gBAAgB,OAAOS,MAAM;YACtC,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;gBACd,UAAUA,MAAM;YAClB;QACF;QACA,YAAY;YACV,SAASC,MAAM;YACf,OAAO;gBACL,WAAWA,MAAM;gBACjB,QAAQA,MAAM;YAChB;QACF;QACA,aAAa;YACX,KAAKiB;QAEP;IACF;IAEA9C,OAAO,IAAI,GAAG;WAAIA,OAAO,IAAI;QAAEyC;KAAW;IAE1C,OAAOzC;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const backgroundColor:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const backgroundColor: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/backgroundColor/background.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/backgroundColor/background.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { BackgroundColor,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/backgroundColor/background.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/backgroundColor/background.ts"],"sourcesContent":["import type { ISpec } from '@visactor/vchart'\nimport type { BackgroundColor, VChartSpecPipe } from 'src/types'\n\nexport const backgroundColor: VChartSpecPipe = (spec, context) => {\n const result = { ...spec } as ISpec\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { backgroundColor: BackgroundColor }\n\n const { backgroundColor } = baseConfig\n\n return {\n ...result,\n background: backgroundColor,\n }\n}\n"],"names":["backgroundColor","spec","context","result","advancedVSeed","chartType","baseConfig"],"mappings":"AAGO,MAAMA,6BAAkC,CAACC,MAAMC;IACpD,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,MAAM,EAAEL,eAAe,EAAE,GAAGM;IAE5B,OAAO;QACL,GAAGH,MAAM;QACT,YAAYH;IACd;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const barGapInGroup:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const barGapInGroup: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/barWidth/barGapInGroup.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/barWidth/barGapInGroup.ts"],"sourcesContent":["import { isNullish } from 'remeda'\nimport type { BarGapInGroup,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/barWidth/barGapInGroup.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/barWidth/barGapInGroup.ts"],"sourcesContent":["import { isNullish } from 'remeda'\nimport type { BarGapInGroup, VChartSpecPipe } from 'src/types'\n\nexport const barGapInGroup: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const barGapInGroup = advancedVSeed.config?.[chartType as 'columnParallel']?.barGapInGroup as BarGapInGroup\n\n if (!isNullish(barGapInGroup)) {\n return {\n ...spec,\n barGapInGroup,\n }\n }\n\n return spec\n}\n"],"names":["barGapInGroup","spec","context","advancedVSeed","vseed","chartType","isNullish"],"mappings":";AAGO,MAAMA,8BAAgC,CAACC,MAAMC;IAClD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAMJ,gBAAgBG,cAAc,MAAM,EAAE,CAACE,UAA8B,EAAE;IAE7E,IAAI,CAACC,UAAUN,gBACb,OAAO;QACL,GAAGC,IAAI;QACPD;IACF;IAGF,OAAOC;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const barMaxWidth:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const barMaxWidth: VChartSpecPipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/barWidth/barMaxWidth.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/barWidth/barMaxWidth.ts"],"sourcesContent":["import { isNullish } from 'remeda'\nimport type { BarMaxWidth,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/barWidth/barMaxWidth.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/barWidth/barMaxWidth.ts"],"sourcesContent":["import { isNullish } from 'remeda'\nimport type { BarMaxWidth, VChartSpecPipe } from 'src/types'\n\nexport const barMaxWidth: VChartSpecPipe = (spec, context) => {\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const barMaxWidth = advancedVSeed.config?.[chartType as 'column']?.barMaxWidth as BarMaxWidth\n\n if (!isNullish(barMaxWidth)) {\n return {\n ...spec,\n barMaxWidth,\n }\n }\n\n return spec\n}\n"],"names":["barMaxWidth","spec","context","advancedVSeed","vseed","chartType","isNullish"],"mappings":";AAGO,MAAMA,0BAA8B,CAACC,MAAMC;IAChD,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAE,GAAGF;IACjC,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAMJ,cAAcG,cAAc,MAAM,EAAE,CAACE,UAAsB,EAAE;IAEnE,IAAI,CAACC,UAAUN,cACb,OAAO;QACL,GAAGC,IAAI;QACPD;IACF;IAGF,OAAOC;AACT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const color:
|
|
1
|
+
import type { VChartSpecPipe } from '../../../../../types';
|
|
2
|
+
export declare const color: VChartSpecPipe;
|
|
3
3
|
export declare const createSpecifiedForColorMapping: (colorMapping?: Record<string, string>, colorIdMap?: Record<string, {
|
|
4
4
|
id: string;
|
|
5
5
|
alias: string;
|