@visactor/vseed 0.1.37 → 0.1.39
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 +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +4147 -965
- package/dist/esm/builder/register/all.js +3 -1
- package/dist/esm/builder/register/all.js.map +1 -1
- package/dist/esm/builder/register/chartType/boxplot.d.ts +1 -0
- package/dist/esm/builder/register/chartType/boxplot.js +9 -0
- package/dist/esm/builder/register/chartType/boxplot.js.map +1 -0
- package/dist/esm/builder/register/chartType/histogram.d.ts +1 -0
- package/dist/esm/builder/register/chartType/histogram.js +9 -0
- package/dist/esm/builder/register/chartType/histogram.js.map +1 -0
- package/dist/esm/builder/register/chartType/index.d.ts +2 -0
- package/dist/esm/builder/register/chartType/index.js +3 -1
- package/dist/esm/dataReshape/constant.d.ts +10 -0
- package/dist/esm/dataReshape/constant.js +11 -1
- package/dist/esm/dataReshape/constant.js.map +1 -1
- package/dist/esm/dataReshape/unfoldDimensions.js +2 -2
- package/dist/esm/dataReshape/unfoldDimensions.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js +33 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +34 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js +31 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +33 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.d.ts +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js +80 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js +78 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/index.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js +8 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/index.d.ts +4 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/index.js +5 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +96 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +96 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js +84 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +86 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js +0 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +52 -0
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +5 -1
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +52 -0
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js +18 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js +18 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js +4 -8
- package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js +37 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js +21 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +15 -4
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +49 -14
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js +126 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +98 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +69 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js +1 -2
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/init/table.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/init/table.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/scrollStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/selectionStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/type.d.ts +13 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/type.js +0 -0
- package/dist/esm/pipeline/utils/constant.d.ts +2 -0
- package/dist/esm/pipeline/utils/constant.js +3 -1
- package/dist/esm/pipeline/utils/constant.js.map +1 -1
- package/dist/esm/theme/common/regressionLine.d.ts +4 -0
- package/dist/esm/theme/common/regressionLine.js +16 -0
- package/dist/esm/theme/common/regressionLine.js.map +1 -0
- package/dist/esm/theme/common/table.d.ts +17 -8
- package/dist/esm/theme/common/table.js +11 -8
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +18 -0
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +18 -0
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +1441 -17
- package/dist/esm/types/advancedVSeed.js +3 -2
- package/dist/esm/types/advancedVSeed.js.map +1 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +9 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +9 -0
- package/dist/esm/types/chartType/bar/zBar.d.ts +9 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +9 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +9 -0
- package/dist/esm/types/chartType/boxplot/boxplot.d.ts +144 -0
- package/dist/esm/types/chartType/boxplot/boxplot.js +0 -0
- package/dist/esm/types/chartType/boxplot/index.d.ts +2 -0
- package/dist/esm/types/chartType/boxplot/index.js +1 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +1185 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.js +30 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.js.map +1 -0
- package/dist/esm/types/chartType/column/zColumn.d.ts +25 -0
- package/dist/esm/types/chartType/column/zColumn.js +3 -1
- package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +9 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +9 -0
- package/dist/esm/types/chartType/donut/zDonut.d.ts +9 -0
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +9 -0
- package/dist/esm/types/chartType/histogram/histogram.d.ts +127 -0
- package/dist/esm/types/chartType/histogram/histogram.js +0 -0
- package/dist/esm/types/chartType/histogram/index.d.ts +2 -0
- package/dist/esm/types/chartType/histogram/index.js +1 -0
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +1377 -0
- package/dist/esm/types/chartType/histogram/zHistogram.js +32 -0
- package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -0
- package/dist/esm/types/chartType/index.d.ts +3 -0
- package/dist/esm/types/chartType/index.js +2 -0
- package/dist/esm/types/chartType/line/zLine.d.ts +9 -0
- package/dist/esm/types/chartType/pie/zPie.d.ts +9 -0
- package/dist/esm/types/chartType/radar/zRadar.d.ts +9 -0
- package/dist/esm/types/chartType/rose/zRose.d.ts +9 -0
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +9 -0
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +9 -0
- package/dist/esm/types/properties/chartType/chartType.d.ts +3 -1
- package/dist/esm/types/properties/chartType/chartType.js +3 -1
- package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
- package/dist/esm/types/properties/config/area.d.ts +4 -0
- package/dist/esm/types/properties/config/bar.d.ts +6 -0
- package/dist/esm/types/properties/config/boxplot.d.ts +326 -0
- package/dist/esm/types/properties/config/boxplot.js +27 -0
- package/dist/esm/types/properties/config/boxplot.js.map +1 -0
- package/dist/esm/types/properties/config/column.d.ts +6 -0
- package/dist/esm/types/properties/config/config.d.ts +697 -0
- package/dist/esm/types/properties/config/config.js +5 -1
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/config/dualAxis.d.ts +2 -0
- package/dist/esm/types/properties/config/funnel.d.ts +2 -0
- package/dist/esm/types/properties/config/heatmap.d.ts +2 -0
- package/dist/esm/types/properties/config/histogram.d.ts +339 -0
- package/dist/esm/types/properties/config/histogram.js +32 -0
- package/dist/esm/types/properties/config/histogram.js.map +1 -0
- package/dist/esm/types/properties/config/index.d.ts +1 -0
- package/dist/esm/types/properties/config/index.js +1 -0
- package/dist/esm/types/properties/config/line.d.ts +2 -0
- package/dist/esm/types/properties/config/pie.d.ts +6 -0
- package/dist/esm/types/properties/config/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 +4 -0
- package/dist/esm/types/properties/config/scatter.d.ts +2 -0
- package/dist/esm/types/properties/config/whiskers/index.d.ts +3 -0
- package/dist/esm/types/properties/config/whiskers/index.js +5 -0
- package/dist/esm/types/properties/config/whiskers/index.js.map +1 -0
- package/dist/esm/types/properties/encoding/encoding.d.ts +36 -0
- package/dist/esm/types/properties/encoding/measureEncoding.d.ts +1 -1
- package/dist/esm/types/properties/encoding/zEncoding.d.ts +9 -0
- package/dist/esm/types/properties/encoding/zEncoding.js +10 -1
- package/dist/esm/types/properties/encoding/zEncoding.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/regressionLine/histogramRegressionLine.d.ts +45 -0
- package/dist/esm/types/properties/regressionLine/histogramRegressionLine.js +0 -0
- package/dist/esm/types/properties/regressionLine/index.d.ts +2 -0
- package/dist/esm/types/properties/regressionLine/index.js +1 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.d.ts +11 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.js +17 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.js.map +1 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +1935 -541
- package/dist/esm/types/vseed.d.ts +2 -2
- package/dist/esm/types/zVseed.d.ts +2717 -0
- package/dist/esm/types/zVseed.js +4 -2
- package/dist/esm/types/zVseed.js.map +1 -1
- package/dist/umd/index.js +1748 -140
- package/dist/umd/index.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface';
|
|
3
|
-
import type { Dimensions, Encoding, FoldInfo, Formatter, Label, Measure, Measures, NumFormat, SpecPipe } from '../../../../../types';
|
|
1
|
+
import type { Datum, Dimensions, Encoding, FoldInfo, Formatter, Label, Measure, Measures, NumFormat, SpecPipe } from '../../../../../types';
|
|
4
2
|
export declare const label: SpecPipe;
|
|
5
3
|
export declare const generateMeasureValue: (value: number | string, measure: Measure, labelAutoFormat?: boolean, numFormat?: NumFormat) => string;
|
|
6
4
|
export declare const generateMeasurePercent: (value: number | string, sum: number, formatter: Formatter) => string;
|
|
7
|
-
export declare const buildLabel:
|
|
5
|
+
export declare const buildLabel: (label: Label, vseedMeasures: Measures | undefined, vseedDimensions: Dimensions | undefined, advancedVSeedDimensions: Dimensions, advancedVSeedMeasures: Measures, encoding: Encoding, foldInfoList: FoldInfo[]) => {
|
|
6
|
+
visible: boolean;
|
|
7
|
+
dataFilter: (data: Datum[]) => Record<string | number, any>[];
|
|
8
|
+
formatMethod: (_: unknown, datum: Datum) => string | (string | number)[];
|
|
9
|
+
position: "inside" | "outside" | undefined;
|
|
10
|
+
style: {
|
|
11
|
+
stroke: string | undefined;
|
|
12
|
+
fill: string | undefined;
|
|
13
|
+
fontSize: number | undefined;
|
|
14
|
+
fontWeight: string | number | undefined;
|
|
15
|
+
background: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
smartInvert: boolean | undefined;
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimension,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { MeasureName } from 'src/dataReshape/constant'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n ) as unknown as ILineChartSpec['label']\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelStroke,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureName)\n : [],\n (item: Dimension) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item: Measure) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n dataFilter: (data: Datum[]) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true\n })\n },\n formatMethod: (_: unknown, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item: Dimension) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item: Measure) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n // 饼图/环图需要使用实际占比数据\n const measurePercentLabel = isNumber(datum['__VCHART_ARC_RATIO'])\n ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter)\n : generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter)\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n stroke: labelStroke,\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n }\n\n if (labelOverlap) {\n ;(result as any).overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelStroke","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureName","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel","isNumber"],"mappings":";;;AAkBO,MAAMA,cAAkB,CAACC,MAAMC;IACpC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAClD,MAAMG,WAAWJ,kBAAkB,CAAC,EAAE,CAAC,QAAQ;IAE/C,MAAM,EAAEN,KAAK,EAAE,GAAG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CAACkE;oBAEd,IAAIjC,kBACFjC,OAAO,IAAI,CAACmE;gBAEhB;YACF;YAEAnE,OAAO,IAAI,IAAI6D;YAEf,IAAI9B,MACF,OAAO/B;YAET,OAAOA,OAAO,IAAI,CAAC;QACrB;QACA,UAAU0C;QACV,OAAO;YACL,QAAQL;YACR,MAAMC;YACN,UAAUC;YACV,YAAYC;YACZ,YAAYC;QACd;QACA,aAAaL;IACf;IAEA,IAAID,cACAnC,OAAe,OAAO,GAAG;QACzB,WAAW;QACX,YAAY;IACd;IAGF,OAAOA;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelDualAxis.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, SpecPipe } from 'src/types'\nimport { buildLabel } from './label'\nimport { DUAL_AXIS_LABEL_Z_INDEX } from 'src/pipeline/utils/constant'\
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelDualAxis.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, SpecPipe } from 'src/types'\nimport { buildLabel } from './label'\nimport { DUAL_AXIS_LABEL_Z_INDEX } from 'src/pipeline/utils/constant'\n\nexport const labelPrimary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n result.label = buildLabel(\n baseConfig.label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfoList[0]],\n ) as unknown as ILineChartSpec['label']\n ;(result.label as any)!.zIndex = DUAL_AXIS_LABEL_Z_INDEX\n return result\n}\n\nexport const labelSecondary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n\n result.label = buildLabel(\n baseConfig.label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfoList[1]],\n ) as unknown as ILineChartSpec['label']\n ;(result.label as any)!.zIndex = DUAL_AXIS_LABEL_Z_INDEX\n return result\n}\n"],"names":["labelPrimary","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","encoding","chartType","baseConfig","foldInfoList","buildLabel","DUAL_AXIS_LABEL_Z_INDEX","labelSecondary"],"mappings":";;AAKO,MAAMA,eAAyB,CAACC,MAAMC;IAC3C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACzC,MAAM,EAAEI,SAAS,EAAE,GAAGJ;IACtB,MAAMK,aAAaL,cAAc,MAAM,CAACI,UAAU;IAElD,MAAME,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IACvDH,OAAO,KAAK,GAAGQ,WACbF,WAAW,KAAK,EAChBJ,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBG,UACA;QAACG,YAAY,CAAC,EAAE;KAAC;IAEjBP,OAAO,KAAK,CAAU,MAAM,GAAGS;IACjC,OAAOT;AACT;AAEO,MAAMU,iBAA2B,CAACZ,MAAMC;IAC7C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACzC,MAAM,EAAEI,SAAS,EAAE,GAAGJ;IACtB,MAAMK,aAAaL,cAAc,MAAM,CAACI,UAAU;IAElD,MAAME,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IAEvDH,OAAO,KAAK,GAAGQ,WACbF,WAAW,KAAK,EAChBJ,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBG,UACA;QAACG,YAAY,CAAC,EAAE;KAAC;IAEjBP,OAAO,KAAK,CAAU,MAAM,GAAGS;IACjC,OAAOT;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelPie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelPie.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelPie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelPie.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, PieLabel, SpecPipe } from 'src/types'\nimport { buildLabel } from './label'\n\nexport const labelPie: SpecPipe = (spec, context) => {\n const result = { ...spec } as IPieChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: PieLabel }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n ) as unknown as IPieChartSpec['label']\n if (label.labelLayout) {\n ;(result.label as any)!.layout = {\n align: label.labelLayout,\n }\n }\n return result\n}\n"],"names":["labelPie","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","label","buildLabel"],"mappings":";AAIO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAClD,MAAMG,WAAWJ,kBAAkB,CAAC,EAAE,CAAC,QAAQ;IAE/C,MAAM,EAAEK,KAAK,EAAE,GAAGF;IAElBN,OAAO,KAAK,GAAGS,WACbD,OACAN,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBI,UACA;QAACE;KAAS;IAEZ,IAAIC,MAAM,WAAW,EACjBR,OAAO,KAAK,CAAU,MAAM,GAAG;QAC/B,OAAOQ,MAAM,WAAW;IAC1B;IAEF,OAAOR;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelScatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelScatter.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, SpecPipe } from 'src/types'\nimport { buildLabel } from './label'\
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/labelScatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelScatter.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, SpecPipe } from 'src/types'\nimport { buildLabel } from './label'\n\nexport const labelScatter: SpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n foldInfoList,\n ) as unknown as IScatterChartSpec['label']\n\n return result\n}\n"],"names":["labelScatter","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfoList","label","buildLabel"],"mappings":";AAIO,MAAMA,eAAyB,CAACC,MAAMC;IAC3C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAElD,MAAMG,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IAEvD,MAAM,EAAEK,KAAK,EAAE,GAAGF;IAElBN,OAAO,KAAK,GAAGS,WACbD,OACAN,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBI,UACAE;IAGF,OAAOP;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotColorLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { Color, Legend, SpecPipe } from 'src/types'\n\nexport const pivotColorLegend: SpecPipe = (spec, context): Partial<PivotChartConstructorOptions> => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n const max = Math.max(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMin))\n const min = Math.min(...datasetReshapeInfo.map((d) => d.foldInfo.statistics.colorMax))\n const { legend, color } = baseConfig\n const { colorScheme, linearColorScheme } = color\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends = {\n visible: enable,\n type: 'color',\n orient,\n position: legendPosition,\n\n colors: linearColorScheme || colorScheme || [],\n value: [min, max],\n min: min,\n max: max,\n\n maxWidth: '30%',\n handlerText: {\n visible: true,\n style: {\n fill: labelColor || labelFontColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n },\n },\n } as unknown\n return { ...result, legends } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotColorLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","max","Math","d","min","legend","color","colorScheme","linearColorScheme","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","orient","legendPosition","legends"],"mappings":"AAGO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAC/B,MAAMI,MAAMC,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAMC,MAAMF,KAAK,GAAG,IAAIF,mBAAmB,GAAG,CAAC,CAACG,IAAMA,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;IACpF,MAAM,EAAEE,MAAM,EAAEC,KAAK,EAAE,GAAGP;IAC1B,MAAM,EAAEQ,WAAW,EAAEC,iBAAiB,EAAE,GAAGF;IAE3C,MAAM,EACJG,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACtB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACL,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMM,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACN,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAEN,MAAMO,UAAU;QACd,SAASR;QACT,MAAM;QACNM;QACA,UAAUC;QAEV,QAAQR,qBAAqBD,eAAe,EAAE;QAC9C,OAAO;YAACH;YAAKH;SAAI;QACjB,KAAKG;QACL,KAAKH;QAEL,UAAU;QACV,aAAa;YACX,SAAS;YACT,OAAO;gBACL,MAAMW,cAAcD;gBACpB,UAAUE;gBACV,YAAYC;YACd;QACF;IACF;IACA,OAAO;QAAE,GAAGlB,MAAM;QAAEqB;IAAQ;AAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { unique } from 'remeda'\nimport type { Color, Legend, SpecPipe } from 'src/types'\nimport { createSpecifiedForColorMapping } from '../color/color'\n\nexport const pivotDiscreteLegend: SpecPipe = (spec, context): Partial<PivotChartConstructorOptions> => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend; color: Color }\n\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { datasetReshapeInfo } = advancedVSeed\n\n const colorItems = unique(\n datasetReshapeInfo.flatMap((d) => {\n return d.unfoldInfo.colorItems\n }),\n )\n\n const colorIdMap = datasetReshapeInfo.reduce<Record<string, string>>((prev, cur) => {\n return { ...prev, ...cur.unfoldInfo.colorIdMap }\n }, {})\n\n const { legend, color } = baseConfig\n const { colorScheme, colorMapping } = color\n\n const colorSpecified = createSpecifiedForColorMapping(colorMapping, colorIdMap, colorItems)\n\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight = 400,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n const legends = {\n visible: enable,\n type: 'discrete',\n orient,\n position: legendPosition,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n data: colorItems.map((d: string, index: number) => {\n const color = colorSpecified?.[d] ?? colorScheme?.[index % colorScheme.length]\n return {\n label: d,\n shape: {\n outerBorder: border\n ? {\n stroke: color,\n distance: 3,\n lineWidth: 1,\n }\n : undefined,\n fill: color,\n },\n }\n }),\n\n item: {\n focus: true,\n maxWidth: '30%',\n focusIconStyle: {\n size: labelFontSize + 2,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n shape: {\n space: border ? 6 : 4,\n style: {\n symbolType: shapeType,\n size: border ? 8 : 10,\n },\n },\n label: {\n formatMethod: (value: string) => {\n return colorIdMap[value] ?? value\n },\n style: {\n fontSize: labelFontSize,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n },\n background: {\n state: {\n selectedHover: {\n fill: labelColor || labelFontColor,\n fillOpacity: 0.05,\n },\n },\n },\n },\n }\n return { ...result, legends } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotDiscreteLegend","spec","context","result","advancedVSeed","chartType","baseConfig","datasetReshapeInfo","colorItems","unique","d","colorIdMap","prev","cur","legend","color","colorScheme","colorMapping","colorSpecified","createSpecifiedForColorMapping","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","legends","Math","index","undefined","value"],"mappings":";;AAKO,MAAMA,sBAAgC,CAACC,MAAMC;IAClD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAE,GAAGD;IACtB,MAAME,aAAaF,cAAc,MAAM,CAACC,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOH;IAGT,MAAM,EAAEI,kBAAkB,EAAE,GAAGH;IAE/B,MAAMI,aAAaC,OACjBF,mBAAmB,OAAO,CAAC,CAACG,IACnBA,EAAE,UAAU,CAAC,UAAU;IAIlC,MAAMC,aAAaJ,mBAAmB,MAAM,CAAyB,CAACK,MAAMC,MACnE;YAAE,GAAGD,IAAI;YAAE,GAAGC,IAAI,UAAU,CAAC,UAAU;QAAC,IAC9C,CAAC;IAEJ,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGT;IAC1B,MAAM,EAAEU,WAAW,EAAEC,YAAY,EAAE,GAAGF;IAEtC,MAAMG,iBAAiBC,+BAA+BF,cAAcN,YAAYH;IAEhF,MAAM,EACJY,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,kBAAkB,GAAG,EACrBC,UAAU,CAAC,EACXC,MAAM,EACNC,YAAY,WAAW,EACxB,GAAGd,UAAU,CAAC;IAEf,MAAMe,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACR,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;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
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pointState.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pointState.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/pointState.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/pointState.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Datum, SpecPipe } from 'src/types'\n\nexport const pointStateDimensionHover: SpecPipe = (spec) => {\n const point = (spec as IScatterChartSpec).point || {}\n const result = {\n ...spec,\n point: {\n ...point,\n state: {\n ...(point.state || {}),\n dimension_hover: {\n scaleX: 1.4,\n scaleY: 1.4,\n outerBorder: {\n lineWidth: 4,\n strokeOpacity: 0.25,\n distance: 2,\n },\n },\n },\n },\n } as IScatterChartSpec\n return result\n}\n\nexport const pointStateHover: SpecPipe = (spec, context) => {\n const point = (spec as IScatterChartSpec).point || {}\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const result = {\n ...spec,\n point: {\n ...point,\n state: {\n ...(point.state || {}),\n hover: {\n scaleX: 1.4,\n scaleY: 1.4,\n stroke: (datum: Datum, context: unknown) => {\n const field = unfoldInfo.encodingColorId\n const color = (context as any).seriesColor(datum[field] as string)\n return color\n },\n fillOpacity: 0.6,\n lineWidth: 1,\n },\n },\n },\n } as IScatterChartSpec\n return result\n}\n"],"names":["pointStateDimensionHover","spec","point","result","pointStateHover","context","advancedVSeed","datasetReshapeInfo","unfoldInfo","datum","field","color"],"mappings":"AAIO,MAAMA,2BAAqC,CAACC;IACjD,MAAMC,QAASD,KAA2B,KAAK,IAAI,CAAC;IACpD,MAAME,SAAS;QACb,GAAGF,IAAI;QACP,OAAO;YACL,GAAGC,KAAK;YACR,OAAO;gBACL,GAAIA,MAAM,KAAK,IAAI,CAAC,CAAC;gBACrB,iBAAiB;oBACf,QAAQ;oBACR,QAAQ;oBACR,aAAa;wBACX,WAAW;wBACX,eAAe;wBACf,UAAU;oBACZ;gBACF;YACF;QACF;IACF;IACA,OAAOC;AACT;AAEO,MAAMC,kBAA4B,CAACH,MAAMI;IAC9C,MAAMH,QAASD,KAA2B,KAAK,IAAI,CAAC;IACpD,MAAM,EAAEK,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;IAC5C,MAAMJ,SAAS;QACb,GAAGF,IAAI;QACP,OAAO;YACL,GAAGC,KAAK;YACR,OAAO;gBACL,GAAIA,MAAM,KAAK,IAAI,CAAC,CAAC;gBACrB,OAAO;oBACL,QAAQ;oBACR,QAAQ;oBACR,QAAQ,CAACO,OAAcJ;wBACrB,MAAMK,QAAQF,WAAW,eAAe;wBACxC,MAAMG,QAASN,QAAgB,WAAW,CAACI,KAAK,CAACC,MAAM;wBACvD,OAAOC;oBACT;oBACA,aAAa;oBACb,WAAW;gBACb;YACF;QACF;IACF;IACA,OAAOR;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { Dimensions, SpecPipe } from 'src/types'\n\nexport const pivotColumnDimensions: SpecPipe = (spec, context): Partial<PivotChartConstructorOptions> => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const dimensions = advancedVSeed.dimensions as Dimensions\n\n if (!dimensions) {\n return result\n }\n const columnDimensions = dimensions.filter((dim) => dim.encoding === 'column')\n const columns = columnDimensions.map((dim) => ({\n dimensionKey: dim.id,\n title: dim.alias || dim.id,\n })) as unknown\n\n return {\n ...result,\n columns: columns,\n } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotColumnDimensions","spec","context","result","advancedVSeed","dimensions","columnDimensions","dim","columns"],"mappings":"AAGO,MAAMA,wBAAkC,CAACC,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAMG,aAAaD,cAAc,UAAU;IAE3C,IAAI,CAACC,YACH,OAAOF;IAET,MAAMG,mBAAmBD,WAAW,MAAM,CAAC,CAACE,MAAQA,AAAiB,aAAjBA,IAAI,QAAQ;IAChE,MAAMC,UAAUF,iBAAiB,GAAG,CAAC,CAACC,MAAS;YAC7C,cAAcA,IAAI,EAAE;YACpB,OAAOA,IAAI,KAAK,IAAIA,IAAI,EAAE;QAC5B;IAEA,OAAO;QACL,GAAGJ,MAAM;QACT,SAASK;IACX;AACF"}
|
|
@@ -14,6 +14,8 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
14
14
|
const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)';
|
|
15
15
|
const hoverHeaderBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4';
|
|
16
16
|
const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455';
|
|
17
|
+
const outlineBorderLineWidth = themConfig.outlineBorderLineWidth ?? 0;
|
|
18
|
+
const frameCornerRadius = themConfig.frameCornerRadius ?? 0;
|
|
17
19
|
return {
|
|
18
20
|
...result,
|
|
19
21
|
theme: {
|
|
@@ -23,8 +25,8 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
23
25
|
color: bodyFontColor,
|
|
24
26
|
borderLineWidth: [
|
|
25
27
|
1,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
outlineBorderLineWidth,
|
|
29
|
+
0,
|
|
28
30
|
1
|
|
29
31
|
],
|
|
30
32
|
bgColor: transparent,
|
|
@@ -35,7 +37,12 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
35
37
|
headerStyle: {
|
|
36
38
|
borderColor,
|
|
37
39
|
fontSize: 12,
|
|
38
|
-
borderLineWidth:
|
|
40
|
+
borderLineWidth: [
|
|
41
|
+
outlineBorderLineWidth,
|
|
42
|
+
outlineBorderLineWidth,
|
|
43
|
+
1,
|
|
44
|
+
1
|
|
45
|
+
],
|
|
39
46
|
color: headerFontColor,
|
|
40
47
|
textAlign: 'center',
|
|
41
48
|
bgColor: headerBackgroundColor,
|
|
@@ -49,7 +56,18 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
49
56
|
borderColor,
|
|
50
57
|
fontSize: 12,
|
|
51
58
|
color: headerFontColor,
|
|
52
|
-
|
|
59
|
+
padding: [
|
|
60
|
+
0,
|
|
61
|
+
4,
|
|
62
|
+
0,
|
|
63
|
+
4
|
|
64
|
+
],
|
|
65
|
+
borderLineWidth: [
|
|
66
|
+
1,
|
|
67
|
+
1,
|
|
68
|
+
1,
|
|
69
|
+
outlineBorderLineWidth
|
|
70
|
+
],
|
|
53
71
|
bgColor: headerBackgroundColor,
|
|
54
72
|
hover: {
|
|
55
73
|
cellBgColor: hoverHeaderBackgroundColor,
|
|
@@ -62,16 +80,27 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
62
80
|
textAlign: 'center',
|
|
63
81
|
fontSize: 12,
|
|
64
82
|
color: headerFontColor,
|
|
83
|
+
padding: [
|
|
84
|
+
0,
|
|
85
|
+
4,
|
|
86
|
+
0,
|
|
87
|
+
4
|
|
88
|
+
],
|
|
65
89
|
fontWeight: 'bold',
|
|
66
|
-
borderLineWidth:
|
|
90
|
+
borderLineWidth: [
|
|
91
|
+
outlineBorderLineWidth,
|
|
92
|
+
1,
|
|
93
|
+
1,
|
|
94
|
+
outlineBorderLineWidth
|
|
95
|
+
],
|
|
67
96
|
bgColor: headerBackgroundColor,
|
|
68
97
|
frameStyle: {
|
|
69
98
|
borderColor,
|
|
70
99
|
borderLineWidth: [
|
|
71
|
-
|
|
100
|
+
outlineBorderLineWidth,
|
|
72
101
|
0,
|
|
73
102
|
0,
|
|
74
|
-
|
|
103
|
+
outlineBorderLineWidth
|
|
75
104
|
]
|
|
76
105
|
},
|
|
77
106
|
hover: {
|
|
@@ -86,7 +115,7 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
86
115
|
frameStyle: {
|
|
87
116
|
borderColor,
|
|
88
117
|
borderLineWidth: [
|
|
89
|
-
|
|
118
|
+
outlineBorderLineWidth,
|
|
90
119
|
1,
|
|
91
120
|
0,
|
|
92
121
|
1
|
|
@@ -102,8 +131,8 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
102
131
|
borderLineWidth: [
|
|
103
132
|
1,
|
|
104
133
|
0,
|
|
105
|
-
|
|
106
|
-
|
|
134
|
+
outlineBorderLineWidth,
|
|
135
|
+
outlineBorderLineWidth
|
|
107
136
|
],
|
|
108
137
|
bgColor: headerBackgroundColor,
|
|
109
138
|
frameStyle: {
|
|
@@ -111,8 +140,8 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
111
140
|
borderLineWidth: [
|
|
112
141
|
1,
|
|
113
142
|
0,
|
|
114
|
-
|
|
115
|
-
|
|
143
|
+
outlineBorderLineWidth,
|
|
144
|
+
outlineBorderLineWidth
|
|
116
145
|
]
|
|
117
146
|
},
|
|
118
147
|
hover: {
|
|
@@ -146,7 +175,12 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
146
175
|
},
|
|
147
176
|
bottomFrozenStyle: {
|
|
148
177
|
borderColor,
|
|
149
|
-
borderLineWidth:
|
|
178
|
+
borderLineWidth: [
|
|
179
|
+
1,
|
|
180
|
+
outlineBorderLineWidth,
|
|
181
|
+
outlineBorderLineWidth,
|
|
182
|
+
1
|
|
183
|
+
],
|
|
150
184
|
bgColor: headerBackgroundColor,
|
|
151
185
|
hover: {
|
|
152
186
|
cellBgColor: hoverHeaderBackgroundColor
|
|
@@ -158,7 +192,8 @@ const pivotGridStyle = (spec, context)=>{
|
|
|
158
192
|
},
|
|
159
193
|
frameStyle: {
|
|
160
194
|
borderColor,
|
|
161
|
-
cornerRadius:
|
|
195
|
+
cornerRadius: frameCornerRadius,
|
|
196
|
+
borderLineWidth: outlineBorderLineWidth
|
|
162
197
|
}
|
|
163
198
|
}
|
|
164
199
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { isCombination, isPivot } from 'src/pipeline/utils'\nimport type { Config, SpecPipe } from 'src/types'\n\nexport const pivotGridStyle: SpecPipe = (spec, context) => {\n const { vseed, advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = (config?.[chartType] as Config['line'])?.pivotGrid ?? {}\n\n const onlyCombination = !isPivot(vseed) && isCombination(vseed)\n\n const result = { ...spec } as PivotChartConstructorOptions\n const transparent = 'rgba(0,0,0,0)'\n\n const borderColor = themConfig.borderColor ?? '#e3e5eb'\n const bodyFontColor = themConfig.bodyFontColor ?? '#141414'\n const headerFontColor = themConfig.headerFontColor ?? '#21252c'\n const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4')\n const hoverHeaderInlineBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455')\n\n return {\n ...result,\n theme: {\n underlayBackgroundColor: transparent,\n bodyStyle: {\n borderColor,\n color: bodyFontColor,\n borderLineWidth: [1,
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { isCombination, isPivot } from 'src/pipeline/utils'\nimport type { Config, SpecPipe } from 'src/types'\n\nexport const pivotGridStyle: SpecPipe = (spec, context) => {\n const { vseed, advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = (config?.[chartType] as Config['line'])?.pivotGrid ?? {}\n\n const onlyCombination = !isPivot(vseed) && isCombination(vseed)\n\n const result = { ...spec } as PivotChartConstructorOptions\n const transparent = 'rgba(0,0,0,0)'\n\n const borderColor = themConfig.borderColor ?? '#e3e5eb'\n const bodyFontColor = themConfig.bodyFontColor ?? '#141414'\n const headerFontColor = themConfig.headerFontColor ?? '#21252c'\n const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4')\n const hoverHeaderInlineBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455')\n const outlineBorderLineWidth = themConfig.outlineBorderLineWidth ?? 0\n const frameCornerRadius = themConfig.frameCornerRadius ?? 0\n\n return {\n ...result,\n theme: {\n underlayBackgroundColor: transparent,\n bodyStyle: {\n borderColor,\n color: bodyFontColor,\n borderLineWidth: [1, outlineBorderLineWidth, 0, 1],\n bgColor: transparent,\n hover: {\n cellBgColor: 'transparent',\n },\n },\n headerStyle: {\n borderColor,\n fontSize: 12,\n borderLineWidth: [outlineBorderLineWidth, outlineBorderLineWidth, 1, 1],\n color: headerFontColor,\n textAlign: 'center',\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n rowHeaderStyle: {\n borderColor,\n fontSize: 12,\n color: headerFontColor,\n padding: [0, 4, 0, 4],\n borderLineWidth: [1, 1, 1, outlineBorderLineWidth],\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n cornerHeaderStyle: {\n borderColor,\n textAlign: 'center',\n fontSize: 12,\n color: headerFontColor,\n padding: [0, 4, 0, 4],\n fontWeight: 'bold',\n borderLineWidth: [outlineBorderLineWidth, 1, 1, outlineBorderLineWidth],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [outlineBorderLineWidth, 0, 0, outlineBorderLineWidth],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n cornerRightTopCellStyle: {\n borderColor,\n borderLineWidth: 0,\n frameStyle: {\n borderColor,\n borderLineWidth: [outlineBorderLineWidth, 1, 0, 1],\n },\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerLeftBottomCellStyle: {\n borderColor,\n borderLineWidth: [1, 0, outlineBorderLineWidth, outlineBorderLineWidth],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, outlineBorderLineWidth, outlineBorderLineWidth],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerRightBottomCellStyle: {\n borderColor,\n borderLineWidth: 0,\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 1, 1, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n rightFrozenStyle: {\n borderColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n bottomFrozenStyle: {\n borderColor,\n borderLineWidth: [1, outlineBorderLineWidth, outlineBorderLineWidth, 1],\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n selectionStyle: {\n cellBgColor: '',\n cellBorderColor: '',\n },\n frameStyle: {\n borderColor,\n cornerRadius: frameCornerRadius,\n borderLineWidth: outlineBorderLineWidth,\n },\n },\n }\n}\n"],"names":["pivotGridStyle","spec","context","vseed","advancedVSeed","config","chartType","themConfig","onlyCombination","isPivot","isCombination","result","transparent","borderColor","bodyFontColor","headerFontColor","headerBackgroundColor","hoverHeaderBackgroundColor","hoverHeaderInlineBackgroundColor","outlineBorderLineWidth","frameCornerRadius","undefined"],"mappings":";AAIO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,MAAM,EAAEC,KAAK,EAAEC,aAAa,EAAE,GAAGF;IACjC,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAcF,QAAQ,CAACC,UAAU,EAAqB,aAAa,CAAC;IAE1E,MAAME,kBAAkB,CAACC,QAAQN,UAAUO,cAAcP;IAEzD,MAAMQ,SAAS;QAAE,GAAGV,IAAI;IAAC;IACzB,MAAMW,cAAc;IAEpB,MAAMC,cAAcN,WAAW,WAAW,IAAI;IAC9C,MAAMO,gBAAgBP,WAAW,aAAa,IAAI;IAClD,MAAMQ,kBAAkBR,WAAW,eAAe,IAAI;IACtD,MAAMS,wBAAwBT,WAAW,qBAAqB,IAAI;IAClE,MAAMU,6BAA6BT,kBAC/BI,cACCL,WAAW,0BAA0B,IAAI;IAC9C,MAAMW,mCAAmCV,kBACrCI,cACCL,WAAW,gCAAgC,IAAI;IACpD,MAAMY,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ACL,aAAaC;gBACf;YACF;YACA,2BAA2B;gBACzBJ;gBACA,iBAAiB;oBAAC;oBAAG;oBAAGM;oBAAwBA;iBAAuB;gBACvE,SAASH;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAGM;wBAAwBA;qBAAuB;gBACzE;gBACA,OAAO;oBACL,aAAaF;gBACf;YACF;YACA,4BAA4B;gBAC1BJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;gBACf;YACF;YACA,kBAAkB;gBAChBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,mBAAmB;gBACjBJ;gBACA,iBAAiB;oBAAC;oBAAGM;oBAAwBA;oBAAwB;iBAAE;gBACvE,SAASH;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,gBAAgB;gBACd,aAAa;gBACb,iBAAiB;YACnB;YACA,YAAY;gBACVJ;gBACA,cAAcO;gBACd,iBAAiBD;YACnB;QACF;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { execPipeline } from '../../../../utils'\nimport type { Dataset, SpecPipe, SpecPipeline, SpecPipelineContext } from 'src/types'\nimport { unique } from 'remeda'\n\nexport const pivotIndicators =\n (chartPipeline: SpecPipeline): SpecPipe =>\n (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { measures, datasetReshapeInfo, dataset } = advancedVSeed\n\n const colorItems = unique(datasetReshapeInfo.flatMap((d) => d.unfoldInfo.colorItems))\n\n const indicators = datasetReshapeInfo.map((reshapeInfo, index) => {\n const measure = measures?.find((d) => d.id === reshapeInfo.id)\n const newDataset = dataset[index] as Dataset\n const newDatasetReshapeInfo = [\n {\n ...reshapeInfo,\n unfoldInfo: { ...reshapeInfo.unfoldInfo, colorItems },\n },\n ]\n const newContext: SpecPipelineContext = {\n ...context,\n advancedVSeed: {\n ...advancedVSeed,\n datasetReshapeInfo: newDatasetReshapeInfo,\n dataset: newDataset,\n },\n }\n\n const chartSpec = execPipeline(chartPipeline, newContext, {})\n return {\n indicatorKey: reshapeInfo.id,\n title: measure?.alias,\n cellType: 'chart',\n chartModule: 'vchart',\n chartSpec: chartSpec,\n style: {\n padding: [1, 1, 0, 1],\n },\n }\n })\n\n return {\n ...result,\n indicators: indicators,\n } as PivotChartConstructorOptions
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { execPipeline } from '../../../../utils'\nimport type { Dataset, SpecPipe, SpecPipeline, SpecPipelineContext } from 'src/types'\nimport { unique } from 'remeda'\n\nexport const pivotIndicators =\n (chartPipeline: SpecPipeline): SpecPipe =>\n (spec, context): Partial<PivotChartConstructorOptions> => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const { measures, datasetReshapeInfo, dataset } = advancedVSeed\n\n const colorItems = unique(datasetReshapeInfo.flatMap((d) => d.unfoldInfo.colorItems))\n\n const indicators = datasetReshapeInfo.map((reshapeInfo, index) => {\n const measure = measures?.find((d) => d.id === reshapeInfo.id)\n const newDataset = dataset[index] as Dataset\n const newDatasetReshapeInfo = [\n {\n ...reshapeInfo,\n unfoldInfo: { ...reshapeInfo.unfoldInfo, colorItems },\n },\n ]\n const newContext: SpecPipelineContext = {\n ...context,\n advancedVSeed: {\n ...advancedVSeed,\n datasetReshapeInfo: newDatasetReshapeInfo,\n dataset: newDataset,\n },\n }\n\n const chartSpec = execPipeline(chartPipeline, newContext, {})\n return {\n indicatorKey: reshapeInfo.id,\n title: measure?.alias,\n cellType: 'chart',\n chartModule: 'vchart',\n chartSpec: chartSpec,\n style: {\n padding: [1, 1, 0, 1],\n },\n }\n })\n\n return {\n ...result,\n indicators: indicators,\n } as Partial<PivotChartConstructorOptions>\n }\n\nexport const pivotIndicatorsAsRow: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: false,\n }\n}\n\nexport const pivotIndicatorsAsCol: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n indicatorsAsCol: true,\n }\n}\n"],"names":["pivotIndicators","chartPipeline","spec","context","result","advancedVSeed","measures","datasetReshapeInfo","dataset","colorItems","unique","d","indicators","reshapeInfo","index","measure","newDataset","newDatasetReshapeInfo","newContext","chartSpec","execPipeline","pivotIndicatorsAsRow","pivotIndicatorsAsCol"],"mappings":";;AAKO,MAAMA,kBACX,CAACC,gBACD,CAACC,MAAMC;QACL,MAAMC,SAAS;YAAE,GAAGF,IAAI;QAAC;QACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;QAC1B,MAAM,EAAEG,QAAQ,EAAEC,kBAAkB,EAAEC,OAAO,EAAE,GAAGH;QAElD,MAAMI,aAAaC,OAAOH,mBAAmB,OAAO,CAAC,CAACI,IAAMA,EAAE,UAAU,CAAC,UAAU;QAEnF,MAAMC,aAAaL,mBAAmB,GAAG,CAAC,CAACM,aAAaC;YACtD,MAAMC,UAAUT,UAAU,KAAK,CAACK,IAAMA,EAAE,EAAE,KAAKE,YAAY,EAAE;YAC7D,MAAMG,aAAaR,OAAO,CAACM,MAAM;YACjC,MAAMG,wBAAwB;gBAC5B;oBACE,GAAGJ,WAAW;oBACd,YAAY;wBAAE,GAAGA,YAAY,UAAU;wBAAEJ;oBAAW;gBACtD;aACD;YACD,MAAMS,aAAkC;gBACtC,GAAGf,OAAO;gBACV,eAAe;oBACb,GAAGE,aAAa;oBAChB,oBAAoBY;oBACpB,SAASD;gBACX;YACF;YAEA,MAAMG,YAAYC,aAAanB,eAAeiB,YAAY,CAAC;YAC3D,OAAO;gBACL,cAAcL,YAAY,EAAE;gBAC5B,OAAOE,SAAS;gBAChB,UAAU;gBACV,aAAa;gBACb,WAAWI;gBACX,OAAO;oBACL,SAAS;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBACvB;YACF;QACF;QAEA,OAAO;YACL,GAAGf,MAAM;YACT,YAAYQ;QACd;IACF;AAEK,MAAMS,uBAAiC,CAACnB;IAC7C,MAAME,SAAS;QAAE,GAAGF,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGE,MAAM;QACT,iBAAiB;IACnB;AACF;AAEO,MAAMkB,uBAAiC,CAACpB;IAC7C,MAAME,SAAS;QAAE,GAAGF,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGE,MAAM;QACT,iBAAiB;IACnB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { Dimensions, SpecPipe } from 'src/types'\n\nexport const pivotRowDimensions: SpecPipe = (spec, context): Partial<PivotChartConstructorOptions> => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const dimensions = advancedVSeed.dimensions as Dimensions\n if (!dimensions) {\n return result\n }\n const rowDimensions = dimensions.filter((dim) => dim.encoding === 'row')\n const rows = rowDimensions.map((dim) => ({\n dimensionKey: dim.id,\n title: dim.alias || dim.id,\n }))\n return {\n ...result,\n rows: rows,\n } as Partial<PivotChartConstructorOptions>\n}\n"],"names":["pivotRowDimensions","spec","context","result","advancedVSeed","dimensions","rowDimensions","dim","rows"],"mappings":"AAGO,MAAMA,qBAA+B,CAACC,MAAMC;IACjD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAMG,aAAaD,cAAc,UAAU;IAC3C,IAAI,CAACC,YACH,OAAOF;IAET,MAAMG,gBAAgBD,WAAW,MAAM,CAAC,CAACE,MAAQA,AAAiB,UAAjBA,IAAI,QAAQ;IAC7D,MAAMC,OAAOF,cAAc,GAAG,CAAC,CAACC,MAAS;YACvC,cAAcA,IAAI,EAAE;YACpB,OAAOA,IAAI,KAAK,IAAIA,IAAI,EAAE;QAC5B;IACA,OAAO;QACL,GAAGJ,MAAM;QACT,MAAMK;IACR;AACF"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { isNullish, uniqueBy } from "remeda";
|
|
2
|
+
import { ecdf, kde } from "@visactor/vutils";
|
|
3
|
+
import { BinEndMeasureId, BinStartMeasureId } from "../../../../../dataReshape/index.js";
|
|
4
|
+
const getRegressionByType = (type, data, kdeOptions)=>{
|
|
5
|
+
switch(type){
|
|
6
|
+
case 'kde':
|
|
7
|
+
return kde(data, kdeOptions);
|
|
8
|
+
case 'ecdf':
|
|
9
|
+
return ecdf(data);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const histogramRegressionLine_histogramRegressionLine = (spec, context)=>{
|
|
13
|
+
const result = {
|
|
14
|
+
...spec
|
|
15
|
+
};
|
|
16
|
+
const { advancedVSeed, vseed } = context;
|
|
17
|
+
const { chartType, encoding = {}, dimensions, histogramRegressionLine } = advancedVSeed;
|
|
18
|
+
const { dataset } = vseed;
|
|
19
|
+
const theme = advancedVSeed.config[chartType]?.histogramRegressionLine;
|
|
20
|
+
if (!histogramRegressionLine) return result;
|
|
21
|
+
const rowColumnFields = uniqueBy(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
22
|
+
const lineList = Array.isArray(histogramRegressionLine) ? histogramRegressionLine : [
|
|
23
|
+
histogramRegressionLine
|
|
24
|
+
];
|
|
25
|
+
if (!result.customMark) result.customMark = [];
|
|
26
|
+
lineList.forEach((line)=>{
|
|
27
|
+
const { color, type, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight } = line;
|
|
28
|
+
result.customMark.push({
|
|
29
|
+
type: 'line',
|
|
30
|
+
interactive: false,
|
|
31
|
+
zIndex: 500,
|
|
32
|
+
style: {
|
|
33
|
+
lineWidth: lineWidth ?? theme?.lineWidth,
|
|
34
|
+
lineDash: lineDash ?? theme?.lineDash,
|
|
35
|
+
stroke: color ?? ((datum, ctx)=>{
|
|
36
|
+
const vchart = ctx.vchart;
|
|
37
|
+
const chart = vchart.getChart();
|
|
38
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
39
|
+
return series.length ? series[0].getOption().globalScale.getScale('color')?.scale(series[0].getSeriesKeys()[0]) : void 0;
|
|
40
|
+
}),
|
|
41
|
+
points: (datum, ctx)=>{
|
|
42
|
+
const vchart = ctx.vchart;
|
|
43
|
+
const chart = vchart.getChart();
|
|
44
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
45
|
+
if (series && series.length) {
|
|
46
|
+
const s = series[0];
|
|
47
|
+
const region = s.getRegion().getLayoutStartPoint();
|
|
48
|
+
const fieldX = s.fieldX?.[0];
|
|
49
|
+
const scaleY = s.getYAxisHelper().getScale?.(0);
|
|
50
|
+
const viewData = s.getViewData()?.latestData;
|
|
51
|
+
if (!dataset || !dataset.length || !viewData || !viewData.length || !scaleY) return;
|
|
52
|
+
const simpleData = dataset.filter((entry)=>rowColumnFields.length ? rowColumnFields.every((dim)=>entry[dim.id] === viewData[0][dim.id]) : true).map((d)=>d[encoding.value?.[0]]);
|
|
53
|
+
const res = getRegressionByType(type, simpleData, 'kde' === type ? {
|
|
54
|
+
bandwidth: Math.abs(viewData[0][BinEndMeasureId] - viewData[0][BinStartMeasureId])
|
|
55
|
+
} : void 0);
|
|
56
|
+
const N = Math.max(3, Math.floor(simpleData.length / 4));
|
|
57
|
+
const lineData = res.evaluateGrid(N);
|
|
58
|
+
const yRange = scaleY.range();
|
|
59
|
+
const y0 = yRange[0];
|
|
60
|
+
const y1 = yRange[yRange.length - 1];
|
|
61
|
+
const scaleR = 'kde' === type ? (k)=>scaleY.scale(k * simpleData.length * res.bandwidth) : (e)=>y0 + (y1 - y0) * e;
|
|
62
|
+
return lineData.map((ld)=>{
|
|
63
|
+
const d = {
|
|
64
|
+
[fieldX]: ld.x
|
|
65
|
+
};
|
|
66
|
+
return {
|
|
67
|
+
x: s.dataToPositionX(d) + region.x,
|
|
68
|
+
y: scaleR(ld.y) + region.y
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
if (!isNullish(text)) result.customMark.push({
|
|
77
|
+
type: 'text',
|
|
78
|
+
interactive: false,
|
|
79
|
+
zIndex: 500,
|
|
80
|
+
style: {
|
|
81
|
+
textAlign: 'end',
|
|
82
|
+
fill: textColor ?? theme?.textColor,
|
|
83
|
+
fontSize: textFontSize ?? theme?.textFontSize,
|
|
84
|
+
fontWeight: textFontWeight ?? theme?.textFontWeight,
|
|
85
|
+
text: text,
|
|
86
|
+
x: (datum, ctx)=>{
|
|
87
|
+
const vchart = ctx.vchart;
|
|
88
|
+
const chart = vchart.getChart();
|
|
89
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
90
|
+
if (series && series.length) {
|
|
91
|
+
const s = series[0];
|
|
92
|
+
const startPoint = s.getRegion().getLayoutStartPoint();
|
|
93
|
+
const fieldX = s.fieldX[0];
|
|
94
|
+
const fieldX2 = s.fieldX2;
|
|
95
|
+
const scaleY = s.getYAxisHelper().getScale?.(0);
|
|
96
|
+
const viewData = s.getViewData()?.latestData;
|
|
97
|
+
if (!dataset || !dataset.length || !viewData || !viewData.length || !scaleY) return;
|
|
98
|
+
const maxX = Math.max.apply(null, viewData.map((d)=>Math.max(d[fieldX], d[fieldX2])));
|
|
99
|
+
return startPoint.x + s.dataToPositionX({
|
|
100
|
+
[fieldX]: maxX
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
y: (datum, ctx)=>{
|
|
105
|
+
const vchart = ctx.vchart;
|
|
106
|
+
const chart = vchart.getChart();
|
|
107
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
108
|
+
if (series && series.length) {
|
|
109
|
+
const s = series[0];
|
|
110
|
+
const startPoint = s.getRegion().getLayoutStartPoint();
|
|
111
|
+
const fieldY = s.fieldY[0];
|
|
112
|
+
const viewData = s.getViewData()?.latestData;
|
|
113
|
+
if (!viewData || !viewData.length) return;
|
|
114
|
+
return 'ecdf' === type ? startPoint.y + 12 : startPoint.y + s.dataToPositionY({
|
|
115
|
+
[fieldY]: viewData[viewData.length - 1]?.[fieldY]
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
return result;
|
|
123
|
+
};
|
|
124
|
+
export { histogramRegressionLine_histogramRegressionLine as histogramRegressionLine };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=histogramRegressionLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.ts"],"sourcesContent":["import type { ICartesianSeries, IChart, IHistogramChartSpec, IVChart } from '@visactor/vchart'\nimport type { KDEEvaluator, KDEOptions } from '@visactor/vutils'\nimport { isNullish, uniqueBy } from 'remeda'\nimport { ecdf, kde } from '@visactor/vutils'\nimport { BinEndMeasureId, BinStartMeasureId } from 'src/dataReshape'\nimport type { Datum, Dimension, HistogramRegressionLine, SpecPipe, Encoding } from 'src/types'\n\nconst getRegressionByType = (type: 'kde' | 'ecdf', data: number[], kdeOptions?: KDEOptions) => {\n switch (type) {\n case 'kde':\n return kde(data, kdeOptions)\n case 'ecdf':\n return ecdf(data)\n }\n}\n\nexport const histogramRegressionLine: SpecPipe = (spec, context) => {\n const result = { ...spec } as IHistogramChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType, encoding = {} as Encoding, dimensions, histogramRegressionLine } = advancedVSeed\n const { dataset } = vseed\n const theme = advancedVSeed.config[chartType as 'histogram']?.histogramRegressionLine as HistogramRegressionLine\n\n if (!histogramRegressionLine) {\n return result\n }\n\n const rowColumnFields = uniqueBy(\n dimensions.filter((dim: Dimension) => dim.encoding === 'row' || dim.encoding === 'column'),\n (item: Dimension) => item.id,\n )\n const lineList = Array.isArray(histogramRegressionLine) ? histogramRegressionLine : [histogramRegressionLine]\n\n if (!result.customMark) {\n result.customMark = []\n }\n\n lineList.forEach((line) => {\n const { color, type, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight } =\n line as HistogramRegressionLine\n\n ;(result.customMark as any[]).push({\n type: 'line',\n interactive: false,\n zIndex: 500,\n style: {\n lineWidth: lineWidth ?? theme?.lineWidth,\n lineDash: lineDash ?? theme?.lineDash,\n stroke:\n color ??\n ((datum: Datum, ctx: any): string | undefined => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const series = chart.getAllSeries().filter((s: any) => s.type === 'bar')\n\n return series.length\n ? series[0].getOption().globalScale.getScale('color')?.scale(series[0].getSeriesKeys()[0])\n : undefined\n }),\n points: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const series = chart.getAllSeries().filter((s: any) => s.type === 'bar')\n\n // 直方图使用的是bar系列\n if (series && series.length) {\n const s = series[0] as ICartesianSeries\n const region = s.getRegion().getLayoutStartPoint()\n\n const fieldX = s.fieldX?.[0]\n const scaleY = s.getYAxisHelper().getScale?.(0)\n const viewData = s.getViewData()?.latestData\n\n if (!dataset || !dataset.length || !viewData || !viewData.length || !scaleY) {\n return\n }\n const simpleData = dataset\n .filter((entry: Datum) => {\n return rowColumnFields.length\n ? rowColumnFields.every((dim: Dimension) => {\n return entry[dim.id] === viewData[0][dim.id]\n })\n : true\n })\n .map((d: Datum) => (d as any)[encoding.value?.[0] as string]) as number[]\n const res = getRegressionByType(\n type,\n simpleData,\n type === 'kde'\n ? ({\n bandwidth: Math.abs(viewData[0][BinEndMeasureId] - viewData[0][BinStartMeasureId]),\n } as KDEOptions)\n : undefined,\n )\n const N = Math.max(3, Math.floor(simpleData.length / 4))\n const lineData = res.evaluateGrid(N)\n const yRange = scaleY.range()\n const y0 = yRange[0]\n const y1 = yRange[yRange.length - 1]\n const scaleR =\n type === 'kde'\n ? (k: number) => {\n return scaleY.scale(k * simpleData.length * (res as KDEEvaluator).bandwidth)\n }\n : (e: number) => {\n return y0 + (y1 - y0) * e\n }\n\n //color: color ?? s.getOption().globalScale.getScale('color')?.scale(s.getSeriesKeys()[0]),\n\n return lineData.map((ld: Datum) => {\n const d = { [fieldX]: ld.x }\n return {\n x: s.dataToPositionX(d)! + region.x,\n y: scaleR(ld.y as number) + region.y,\n }\n })\n }\n return []\n },\n },\n })\n\n if (!isNullish(text)) {\n ;(result.customMark as any[]).push({\n type: 'text',\n interactive: false,\n zIndex: 500,\n style: {\n textAlign: 'end',\n fill: textColor ?? theme?.textColor,\n fontSize: textFontSize ?? theme?.textFontSize,\n fontWeight: textFontWeight ?? theme?.textFontWeight,\n text: text,\n x: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const series = chart.getAllSeries().filter((s: any) => s.type === 'bar')\n // 直方图使用的是bar系列\n if (series && series.length) {\n const s = series[0] as ICartesianSeries\n const startPoint = s.getRegion().getLayoutStartPoint()\n\n const fieldX = s.fieldX[0]\n const fieldX2 = s.fieldX2\n const scaleY = s.getYAxisHelper().getScale?.(0)\n const viewData = s.getViewData()?.latestData\n if (!dataset || !dataset.length || !viewData || !viewData.length || !scaleY) {\n return undefined\n }\n const maxX = Math.max.apply(\n null,\n (viewData as any[]).map((d: Datum) =>\n Math.max((d as any)[fieldX] as number, (d as any)[fieldX2] as number),\n ),\n )\n return startPoint.x + s.dataToPositionX({ [fieldX]: maxX })!\n }\n\n return undefined\n },\n y: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const series = chart.getAllSeries().filter((s: any) => s.type === 'bar')\n // 直方图使用的是bar系列\n if (series && series.length) {\n const s = series[0] as ICartesianSeries\n const startPoint = s.getRegion().getLayoutStartPoint()\n\n const fieldY = s.fieldY[0]\n const viewData = s.getViewData()?.latestData\n if (!viewData || !viewData.length) {\n return undefined\n }\n return type === 'ecdf'\n ? startPoint.y + 12\n : startPoint.y + s.dataToPositionY({ [fieldY]: viewData[viewData.length - 1]?.[fieldY] })!\n }\n\n return undefined\n },\n },\n })\n }\n })\n\n return result\n}\n"],"names":["getRegressionByType","type","data","kdeOptions","kde","ecdf","histogramRegressionLine","spec","context","result","advancedVSeed","vseed","chartType","encoding","dimensions","dataset","theme","rowColumnFields","uniqueBy","dim","item","lineList","Array","line","color","lineWidth","lineDash","text","textColor","textFontSize","textFontWeight","datum","ctx","vchart","chart","series","s","undefined","region","fieldX","scaleY","viewData","simpleData","entry","d","res","Math","BinEndMeasureId","BinStartMeasureId","N","lineData","yRange","y0","y1","scaleR","k","e","ld","isNullish","startPoint","fieldX2","maxX","fieldY"],"mappings":";;;AAOA,MAAMA,sBAAsB,CAACC,MAAsBC,MAAgBC;IACjE,OAAQF;QACN,KAAK;YACH,OAAOG,IAAIF,MAAMC;QACnB,KAAK;YACH,OA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
export * from "./histogramRegressionLine.js";
|
|
@@ -4,6 +4,7 @@ const stackCornerRadius_stackCornerRadius = (spec, context)=>{
|
|
|
4
4
|
const stackCornerRadius = advancedVSeed.config?.[chartType]?.stackCornerRadius;
|
|
5
5
|
const { datasetReshapeInfo } = advancedVSeed;
|
|
6
6
|
const { foldInfo } = datasetReshapeInfo[0];
|
|
7
|
+
if ('dualAxis' === chartType && 'bar' !== spec.type) return spec;
|
|
7
8
|
return {
|
|
8
9
|
...spec,
|
|
9
10
|
stackCornerRadius: (_, datum)=>{
|