@visactor/vseed 0.2.1 → 0.2.2
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/register/all.js +2 -2
- package/dist/esm/builder/register/all.js.map +1 -1
- package/dist/esm/builder/register/chartType/boxplot.d.ts +1 -1
- package/dist/esm/builder/register/chartType/boxplot.js +2 -2
- package/dist/esm/builder/register/chartType/boxplot.js.map +1 -1
- package/dist/esm/builder/register/chartType/index.d.ts +1 -1
- package/dist/esm/builder/register/chartType/index.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +17 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +3 -3
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js +3 -76
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.d.ts +6 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js +95 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js +16 -84
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.js +23 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfHistogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +8 -7
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/utils/histogram.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/utils/histogram.js +6 -2
- package/dist/esm/pipeline/spec/chart/utils/histogram.js.map +1 -1
- package/dist/esm/types/chartType/area/area.d.ts +2 -2
- package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +3 -5
- package/dist/esm/types/chartType/bar/bar.d.ts +3 -3
- package/dist/esm/types/chartType/barParallel/barParallel.d.ts +3 -3
- package/dist/esm/types/chartType/barPercent/barPercent.d.ts +3 -3
- package/dist/esm/types/chartType/{boxplot/boxplot.d.ts → boxPlot/boxPlot.d.ts} +6 -6
- 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 → boxPlot/zBoxPlot.d.ts} +1 -1
- package/dist/esm/types/chartType/{boxplot/zBoxplot.js → boxPlot/zBoxPlot.js} +3 -3
- package/dist/esm/types/chartType/{boxplot/zBoxplot.js.map → boxPlot/zBoxPlot.js.map} +1 -1
- package/dist/esm/types/chartType/column/column.d.ts +4 -4
- package/dist/esm/types/chartType/column/zColumn.d.ts +2 -2
- package/dist/esm/types/chartType/column/zColumn.js +1 -1
- package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
- package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +3 -5
- package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +3 -3
- package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +3 -3
- package/dist/esm/types/chartType/histogram/histogram.d.ts +6 -6
- package/dist/esm/types/chartType/index.d.ts +1 -1
- package/dist/esm/types/chartType/index.js +1 -1
- package/dist/esm/types/chartType/line/line.d.ts +3 -5
- package/dist/esm/types/chartType/pivotTable/pivotTable.d.ts +1 -1
- package/dist/esm/types/chartType/scatter/scatter.d.ts +7 -7
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +8 -8
- package/dist/esm/types/chartType/scatter/zScatter.js +4 -4
- package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
- package/dist/esm/types/chartType/table/table.d.ts +1 -1
- package/dist/esm/types/properties/regressionLine/linearRegressionLine.d.ts +4 -0
- package/dist/esm/types/properties/regressionLine/logisticRegressionLine.d.ts +4 -0
- package/dist/esm/types/properties/regressionLine/lowessRegressionLine.d.ts +4 -0
- package/dist/esm/types/properties/regressionLine/polynomialRegressionLine.d.ts +4 -0
- package/dist/esm/types/vseed.d.ts +2 -2
- package/dist/esm/types/zVseed.d.ts +10 -10
- package/dist/esm/types/zVseed.js +2 -2
- package/dist/esm/types/zVseed.js.map +1 -1
- package/dist/umd/index.js +170 -135
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/types/chartType/boxplot/index.d.ts +0 -2
- package/dist/esm/types/chartType/boxplot/index.js +0 -1
- /package/dist/esm/types/chartType/{boxplot/boxplot.js → boxPlot/boxPlot.js} +0 -0
|
@@ -5,3 +5,4 @@ export { annotationHorizontalLine } from './annotationHorizontalLine';
|
|
|
5
5
|
export { annotationArea } from './annotationArea';
|
|
6
6
|
export { annotationAreaBand } from './annotationAreaBand';
|
|
7
7
|
export { splitLine } from './splitLine';
|
|
8
|
+
export { annotationPointOfHistogram } from './annotationPointOfHistogram';
|
|
@@ -5,4 +5,5 @@ import { annotationHorizontalLine } from "./annotationHorizontalLine.js";
|
|
|
5
5
|
import { annotationArea } from "./annotationArea.js";
|
|
6
6
|
import { annotationAreaBand } from "./annotationAreaBand.js";
|
|
7
7
|
import { splitLine } from "./splitLine.js";
|
|
8
|
-
|
|
8
|
+
import { annotationPointOfHistogram } from "./annotationPointOfHistogram.js";
|
|
9
|
+
export { annotationArea, annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationPointOfDualAxis, annotationPointOfHistogram, annotationVerticalLine, splitLine };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNullish, pipe, uniqueBy } from "remeda";
|
|
2
2
|
import { BinEndMeasureId, BinStartMeasureId, ColorEncoding, FoldMeasureValue, XEncoding } from "../../../../../dataReshape/index.js";
|
|
3
3
|
import { getTooltipStyle } from "./tooltipStyle.js";
|
|
4
|
-
import { getDefaultXFormatterOfHistogram } from "../../utils/histogram.js";
|
|
4
|
+
import { getDefaultValueFormatterOfHistogram, getDefaultXFormatterOfHistogram } from "../../utils/histogram.js";
|
|
5
5
|
const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
6
6
|
const tooltipHistogram = (spec, context)=>{
|
|
7
7
|
const result = {
|
|
@@ -10,11 +10,12 @@ const tooltipHistogram = (spec, context)=>{
|
|
|
10
10
|
const { advancedVSeed } = context;
|
|
11
11
|
const { chartType, dimensions, encoding } = advancedVSeed;
|
|
12
12
|
const baseConfig = advancedVSeed.config[chartType];
|
|
13
|
-
const { tooltip = {
|
|
13
|
+
const { binValueType, tooltip = {
|
|
14
14
|
enable: true
|
|
15
15
|
} } = baseConfig;
|
|
16
16
|
const { enable } = tooltip;
|
|
17
17
|
const defaultXFormatter = getDefaultXFormatterOfHistogram(advancedVSeed);
|
|
18
|
+
const defaultValueFormatter = getDefaultValueFormatterOfHistogram(binValueType);
|
|
18
19
|
result.tooltip = {
|
|
19
20
|
style: getTooltipStyle(tooltip),
|
|
20
21
|
visible: enable,
|
|
@@ -22,18 +23,18 @@ const tooltipHistogram = (spec, context)=>{
|
|
|
22
23
|
title: {
|
|
23
24
|
visible: false
|
|
24
25
|
},
|
|
25
|
-
content: createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter)
|
|
26
|
+
content: createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter, defaultValueFormatter)
|
|
26
27
|
},
|
|
27
28
|
dimension: {
|
|
28
29
|
title: {
|
|
29
30
|
visible: false
|
|
30
31
|
},
|
|
31
|
-
content: createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter)
|
|
32
|
+
content: createMarkContent(encoding.tooltip || [], dimensions, encoding, defaultXFormatter, defaultValueFormatter)
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
return result;
|
|
35
36
|
};
|
|
36
|
-
const createMarkContent = (tooltip, dimensions, encoding, dimFormatter)=>{
|
|
37
|
+
const createMarkContent = (tooltip, dimensions, encoding, dimFormatter, defaultValueFormatter)=>{
|
|
37
38
|
const dims = pipe(dimensions.filter((item)=>tooltip.includes(item.id)), uniqueBy((item)=>item.id), uniqueBy((item)=>item.alias));
|
|
38
39
|
const dimContent = dims.map((item)=>({
|
|
39
40
|
visible: true,
|
|
@@ -45,7 +46,7 @@ const createMarkContent = (tooltip, dimensions, encoding, dimFormatter)=>{
|
|
|
45
46
|
if (encoding.color?.includes(item.id)) return datum?.[ColorEncoding];
|
|
46
47
|
if (encoding.x?.includes(item.id)) return datum?.[XEncoding];
|
|
47
48
|
}
|
|
48
|
-
return datum?.[item.id];
|
|
49
|
+
return defaultValueFormatter(datum?.[item.id]);
|
|
49
50
|
}
|
|
50
51
|
}));
|
|
51
52
|
const defaultContent = [
|
|
@@ -59,7 +60,7 @@ const createMarkContent = (tooltip, dimensions, encoding, dimFormatter)=>{
|
|
|
59
60
|
},
|
|
60
61
|
value: (datum)=>{
|
|
61
62
|
if (!datum) return '';
|
|
62
|
-
return datum[FoldMeasureValue];
|
|
63
|
+
return defaultValueFormatter(datum[FoldMeasureValue]);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.ts"],"sourcesContent":["import { pipe, uniqueBy, isNullish } from 'remeda'\nimport type { Dimension, Dimensions, Encoding, VChartSpecPipe, Tooltip } from 'src/types'\nimport type { Datum, ISpec, ITooltipLinePattern } from '@visactor/vchart'\nimport { BinEndMeasureId, BinStartMeasureId, ColorEncoding, FoldMeasureValue, XEncoding } from 'src/dataReshape'\nimport { getTooltipStyle } from './tooltipStyle'\nimport { getDefaultXFormatterOfHistogram } from '../../utils/histogram'\n\nconst VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE'\n\nexport const tooltipHistogram: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n const defaultXFormatter = getDefaultXFormatterOfHistogram(advancedVSeed)\n\n result.tooltip = {\n style: getTooltipStyle(tooltip),\n visible: enable,\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(encoding.tooltip || []
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.ts"],"sourcesContent":["import { pipe, uniqueBy, isNullish } from 'remeda'\nimport type { Dimension, Dimensions, Encoding, VChartSpecPipe, Tooltip } from 'src/types'\nimport type { Datum, ISpec, ITooltipLinePattern } from '@visactor/vchart'\nimport { BinEndMeasureId, BinStartMeasureId, ColorEncoding, FoldMeasureValue, XEncoding } from 'src/dataReshape'\nimport { getTooltipStyle } from './tooltipStyle'\nimport { getDefaultValueFormatterOfHistogram, getDefaultXFormatterOfHistogram } from '../../utils/histogram'\n\nconst VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE'\n\nexport const tooltipHistogram: VChartSpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip; binValueType: 'count' | 'percentage' }\n const { binValueType, tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n const defaultXFormatter = getDefaultXFormatterOfHistogram(advancedVSeed)\n const defaultValueFormatter = getDefaultValueFormatterOfHistogram(binValueType)\n\n result.tooltip = {\n style: getTooltipStyle(tooltip),\n visible: enable,\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(\n encoding.tooltip || [],\n dimensions,\n encoding as Encoding,\n defaultXFormatter,\n defaultValueFormatter,\n ),\n },\n dimension: {\n title: {\n visible: false,\n },\n content: createMarkContent(\n encoding.tooltip || [],\n dimensions,\n encoding as Encoding,\n defaultXFormatter,\n defaultValueFormatter,\n ),\n },\n }\n return result as unknown as ISpec\n}\n\nconst createMarkContent = (\n tooltip: string[],\n dimensions: Dimensions,\n encoding: Encoding,\n dimFormatter: (value: number) => string,\n defaultValueFormatter: (value: number | string) => string,\n) => {\n const dims = pipe(\n dimensions.filter((item) => tooltip.includes(item.id)),\n uniqueBy((item: Dimension) => item.id),\n uniqueBy((item: Dimension) => item.alias),\n )\n\n const dimContent = dims.map((item: Dimension) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: item.alias ?? item.id,\n value: (datum: Datum | undefined) => {\n if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {\n if (encoding.color?.includes(item.id)) {\n return datum?.[ColorEncoding] as string\n }\n if (encoding.x?.includes(item.id)) {\n return datum?.[XEncoding] as string\n }\n }\n\n return defaultValueFormatter(datum?.[item.id] as string)\n },\n }))\n\n const defaultContent = [\n {\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: (datum: Datum | undefined) => {\n if (!datum) {\n return ''\n }\n return `[${dimFormatter(+datum[BinStartMeasureId])}, ${dimFormatter(+datum[BinEndMeasureId])})`\n },\n value: (datum: Datum | undefined) => {\n if (!datum) {\n return ''\n }\n return defaultValueFormatter(datum[FoldMeasureValue] as string | number)\n },\n },\n ]\n\n return [...dimContent, defaultContent] as ITooltipLinePattern[]\n}\n"],"names":["VCHART_OUTLIER_KEY","tooltipHistogram","spec","context","result","advancedVSeed","chartType","dimensions","encoding","baseConfig","binValueType","tooltip","enable","defaultXFormatter","getDefaultXFormatterOfHistogram","defaultValueFormatter","getDefaultValueFormatterOfHistogram","getTooltipStyle","createMarkContent","dimFormatter","dims","pipe","item","uniqueBy","dimContent","datum","isNullish","ColorEncoding","XEncoding","defaultContent","BinStartMeasureId","BinEndMeasureId","FoldMeasureValue"],"mappings":";;;;AAOA,MAAMA,qBAAqB;AAEpB,MAAMC,mBAAmC,CAACC,MAAMC;IACrD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IAC5C,MAAMI,aAAaJ,cAAc,MAAM,CAACC,UAAU;IAClD,MAAM,EAAEI,YAAY,EAAEC,UAAU;QAAE,QAAQ;IAAK,CAAC,EAAE,GAAGF;IACrD,MAAM,EAAEG,MAAM,EAAE,GAAGD;IACnB,MAAME,oBAAoBC,gCAAgCT;IAC1D,MAAMU,wBAAwBC,oCAAoCN;IAElEN,OAAO,OAAO,GAAG;QACf,OAAOa,gBAAgBN;QACvB,SAASC;QACT,MAAM;YACJ,OAAO;gBACL,SAAS;YACX;YACA,SAASM,kBACPV,SAAS,OAAO,IAAI,EAAE,EACtBD,YACAC,UACAK,mBACAE;QAEJ;QACA,WAAW;YACT,OAAO;gBACL,SAAS;YACX;YACA,SAASG,kBACPV,SAAS,OAAO,IAAI,EAAE,EACtBD,YACAC,UACAK,mBACAE;QAEJ;IACF;IACA,OAAOX;AACT;AAEA,MAAMc,oBAAoB,CACxBP,SACAJ,YACAC,UACAW,cACAJ;IAEA,MAAMK,OAAOC,KACXd,WAAW,MAAM,CAAC,CAACe,OAASX,QAAQ,QAAQ,CAACW,KAAK,EAAE,IACpDC,SAAS,CAACD,OAAoBA,KAAK,EAAE,GACrCC,SAAS,CAACD,OAAoBA,KAAK,KAAK;IAG1C,MAAME,aAAaJ,KAAK,GAAG,CAAC,CAACE,OAAqB;YAChD,SAAS;YACT,UAAU;YACV,WAAW;YACX,KAAKA,KAAK,KAAK,IAAIA,KAAK,EAAE;YAC1B,OAAO,CAACG;gBACN,IAAI,CAACC,UAAUD,OAAO,CAACzB,mBAAmB,GAAG;oBAC3C,IAAIQ,SAAS,KAAK,EAAE,SAASc,KAAK,EAAE,GAClC,OAAOG,OAAO,CAACE,cAAc;oBAE/B,IAAInB,SAAS,CAAC,EAAE,SAASc,KAAK,EAAE,GAC9B,OAAOG,OAAO,CAACG,UAAU;gBAE7B;gBAEA,OAAOb,sBAAsBU,OAAO,CAACH,KAAK,EAAE,CAAC;YAC/C;QACF;IAEA,MAAMO,iBAAiB;QACrB;YACE,SAAS;YACT,UAAU;YACV,WAAW;YACX,KAAK,CAACJ;gBACJ,IAAI,CAACA,OACH,OAAO;gBAET,OAAO,CAAC,CAAC,EAAEN,aAAa,CAACM,KAAK,CAACK,kBAAkB,EAAE,EAAE,EAAEX,aAAa,CAACM,KAAK,CAACM,gBAAgB,EAAE,CAAC,CAAC;YACjG;YACA,OAAO,CAACN;gBACN,IAAI,CAACA,OACH,OAAO;gBAET,OAAOV,sBAAsBU,KAAK,CAACO,iBAAiB;YACtD;QACF;KACD;IAED,OAAO;WAAIR;QAAYK;KAAe;AACxC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { AdvancedVSeed } from '../../../../types';
|
|
2
2
|
export declare const getDefaultXFormatterOfHistogram: (advancedVSeed: AdvancedVSeed) => (value: number) => string;
|
|
3
|
+
export declare const getDefaultValueFormatterOfHistogram: (binValueType?: "count" | "percentage") => (value: number | string) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createNumFormatter } from "../../../utils/index.js";
|
|
1
|
+
import { autoFormatter, createNumFormatter } from "../../../utils/index.js";
|
|
2
2
|
import { createLinearFormat } from "../pipes/axes/format/linearFormat.js";
|
|
3
3
|
const getDefaultXFormatterOfHistogram = (advancedVSeed)=>{
|
|
4
4
|
const { chartType, config } = advancedVSeed;
|
|
@@ -7,6 +7,10 @@ const getDefaultXFormatterOfHistogram = (advancedVSeed)=>{
|
|
|
7
7
|
const formatter = createNumFormatter(numFormat);
|
|
8
8
|
return (value)=>createLinearFormat(value, autoFormat, numFormat, formatter);
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
const getDefaultValueFormatterOfHistogram = (binValueType = 'count')=>'percentage' === binValueType ? createNumFormatter({
|
|
11
|
+
type: 'percent',
|
|
12
|
+
fractionDigits: 1
|
|
13
|
+
}) : (value)=>autoFormatter(value);
|
|
14
|
+
export { getDefaultValueFormatterOfHistogram, getDefaultXFormatterOfHistogram };
|
|
11
15
|
|
|
12
16
|
//# sourceMappingURL=histogram.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/utils/histogram.js","sources":["../../../../../../src/pipeline/spec/chart/utils/histogram.ts"],"sourcesContent":["import { createNumFormatter } from 'src/pipeline/utils'\nimport type { AdvancedVSeed, XLinearAxis } from 'src/types'\nimport { createLinearFormat } from '../pipes/axes/format/linearFormat'\n\nexport const getDefaultXFormatterOfHistogram = (advancedVSeed: AdvancedVSeed) => {\n const { chartType, config } = advancedVSeed\n const xConfig = config?.[chartType as 'bar']?.xAxis as XLinearAxis\n const { autoFormat = true, numFormat = {} } = xConfig\n const formatter = createNumFormatter(numFormat)\n return (value: number) => createLinearFormat(value, autoFormat, numFormat, formatter)\n}\n"],"names":["getDefaultXFormatterOfHistogram","advancedVSeed","chartType","config","xConfig","autoFormat","numFormat","formatter","createNumFormatter","value","createLinearFormat"],"mappings":";;AAIO,MAAMA,kCAAkC,CAACC;IAC9C,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGF;IAC9B,MAAMG,UAAUD,QAAQ,CAACD,UAAmB,EAAE;IAC9C,MAAM,EAAEG,aAAa,IAAI,EAAEC,YAAY,CAAC,CAAC,EAAE,GAAGF;IAC9C,MAAMG,YAAYC,mBAAmBF;IACrC,OAAO,CAACG,QAAkBC,mBAAmBD,OAAOJ,YAAYC,WAAWC;AAC7E"}
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/utils/histogram.js","sources":["../../../../../../src/pipeline/spec/chart/utils/histogram.ts"],"sourcesContent":["import { autoFormatter, createNumFormatter } from 'src/pipeline/utils'\nimport type { AdvancedVSeed, XLinearAxis } from 'src/types'\nimport { createLinearFormat } from '../pipes/axes/format/linearFormat'\n\nexport const getDefaultXFormatterOfHistogram = (advancedVSeed: AdvancedVSeed) => {\n const { chartType, config } = advancedVSeed\n const xConfig = config?.[chartType as 'bar']?.xAxis as XLinearAxis\n const { autoFormat = true, numFormat = {} } = xConfig\n const formatter = createNumFormatter(numFormat)\n return (value: number) => createLinearFormat(value, autoFormat, numFormat, formatter)\n}\n\nexport const getDefaultValueFormatterOfHistogram = (binValueType: 'count' | 'percentage' = 'count') => {\n return binValueType === 'percentage'\n ? createNumFormatter({\n type: 'percent',\n fractionDigits: 1,\n })\n : (value: number | string) => autoFormatter(value)\n}\n"],"names":["getDefaultXFormatterOfHistogram","advancedVSeed","chartType","config","xConfig","autoFormat","numFormat","formatter","createNumFormatter","value","createLinearFormat","getDefaultValueFormatterOfHistogram","binValueType","autoFormatter"],"mappings":";;AAIO,MAAMA,kCAAkC,CAACC;IAC9C,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGF;IAC9B,MAAMG,UAAUD,QAAQ,CAACD,UAAmB,EAAE;IAC9C,MAAM,EAAEG,aAAa,IAAI,EAAEC,YAAY,CAAC,CAAC,EAAE,GAAGF;IAC9C,MAAMG,YAAYC,mBAAmBF;IACrC,OAAO,CAACG,QAAkBC,mBAAmBD,OAAOJ,YAAYC,WAAWC;AAC7E;AAEO,MAAMI,sCAAsC,CAACC,eAAuC,OAAO,GACzFA,AAAiB,iBAAjBA,eACHJ,mBAAmB;QACjB,MAAM;QACN,gBAAgB;IAClB,KACA,CAACC,QAA2BI,cAAcJ"}
|
|
@@ -164,11 +164,11 @@ export interface Area {
|
|
|
164
164
|
*/
|
|
165
165
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
166
166
|
/**
|
|
167
|
-
* @description
|
|
167
|
+
* @description 维度值标注线,竖直方向展示,能够设置标注线的位置, 样式等
|
|
168
168
|
*/
|
|
169
169
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
170
170
|
/**
|
|
171
|
-
* @description
|
|
171
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
172
172
|
*/
|
|
173
173
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
174
174
|
/**
|
|
@@ -160,13 +160,11 @@ export interface AreaPercent {
|
|
|
160
160
|
*/
|
|
161
161
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
162
162
|
/**
|
|
163
|
-
*
|
|
164
|
-
* @description 标注垂直线配置, 根据选择的数据, 定义图表的标注垂直线, 包括标注垂直线的位置, 样式等.
|
|
163
|
+
* @description 维度值标注线,竖直方向展示,能够设置标注线的位置, 样式等
|
|
165
164
|
*/
|
|
166
165
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
167
166
|
/**
|
|
168
|
-
*
|
|
169
|
-
* @description 标注水平线配置, 根据选择的数据, 定义图表的标注水平线, 包括标注水平线的位置, 样式等.
|
|
167
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
170
168
|
*/
|
|
171
169
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
172
170
|
/**
|
|
@@ -175,7 +173,7 @@ export interface AreaPercent {
|
|
|
175
173
|
*/
|
|
176
174
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
177
175
|
/**
|
|
178
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
176
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
179
177
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
180
178
|
*/
|
|
181
179
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -138,11 +138,11 @@ export interface Bar {
|
|
|
138
138
|
*/
|
|
139
139
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
140
140
|
/**
|
|
141
|
-
* @description
|
|
141
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),竖直方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
142
142
|
*/
|
|
143
143
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
144
144
|
/**
|
|
145
|
-
* @description
|
|
145
|
+
* @description 维度值标注线,水平展示,能够设置标注线的位置, 样式等
|
|
146
146
|
*/
|
|
147
147
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
148
148
|
/**
|
|
@@ -150,7 +150,7 @@ export interface Bar {
|
|
|
150
150
|
*/
|
|
151
151
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
152
152
|
/**
|
|
153
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
153
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
154
154
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
155
155
|
*/
|
|
156
156
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -140,11 +140,11 @@ export interface BarParallel {
|
|
|
140
140
|
*/
|
|
141
141
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
142
142
|
/**
|
|
143
|
-
* @description
|
|
143
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),竖直方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
144
144
|
*/
|
|
145
145
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
146
146
|
/**
|
|
147
|
-
* @description
|
|
147
|
+
* @description 维度值标注线,水平展示,能够设置标注线的位置, 样式等
|
|
148
148
|
*/
|
|
149
149
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
150
150
|
/**
|
|
@@ -152,7 +152,7 @@ export interface BarParallel {
|
|
|
152
152
|
*/
|
|
153
153
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
154
154
|
/**
|
|
155
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
155
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
156
156
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
157
157
|
*/
|
|
158
158
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -140,12 +140,12 @@ export interface BarPercent {
|
|
|
140
140
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
141
141
|
/**
|
|
142
142
|
* 标注垂直线
|
|
143
|
-
* @description
|
|
143
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),竖直方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
144
144
|
*/
|
|
145
145
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
146
146
|
/**
|
|
147
147
|
* 标注水平线
|
|
148
|
-
* @description
|
|
148
|
+
* @description 维度值标注线,水平展示,能够设置标注线的位置, 样式等
|
|
149
149
|
*/
|
|
150
150
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
151
151
|
/**
|
|
@@ -154,7 +154,7 @@ export interface BarPercent {
|
|
|
154
154
|
*/
|
|
155
155
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
156
156
|
/**
|
|
157
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
157
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
158
158
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
159
159
|
*/
|
|
160
160
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -24,7 +24,7 @@ import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, Annotat
|
|
|
24
24
|
* - 推荐字段配置: `1`个指标, `1`个维度
|
|
25
25
|
* - 支持数据重塑: 至少`1`个指标, `0`个维度
|
|
26
26
|
*/
|
|
27
|
-
export interface
|
|
27
|
+
export interface BoxPlot {
|
|
28
28
|
/**
|
|
29
29
|
* @description 箱型图,适用于展示数据分布情况,X轴为类目轴(分类数据),Y轴为数值轴(连续数据),箱体纵向排列
|
|
30
30
|
* @type {'boxPlot'}
|
|
@@ -133,11 +133,11 @@ export interface Boxplot {
|
|
|
133
133
|
*/
|
|
134
134
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
135
135
|
/**
|
|
136
|
-
* @description
|
|
136
|
+
* @description 维度值标注线,竖直方向展示,能够设置标注线的位置, 样式等
|
|
137
137
|
*/
|
|
138
138
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
139
139
|
/**
|
|
140
|
-
* @description
|
|
140
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
141
141
|
*/
|
|
142
142
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
143
143
|
/**
|
|
@@ -145,7 +145,7 @@ export interface Boxplot {
|
|
|
145
145
|
*/
|
|
146
146
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
147
147
|
/**
|
|
148
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
148
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
149
149
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
150
150
|
*/
|
|
151
151
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -155,11 +155,11 @@ export interface Boxplot {
|
|
|
155
155
|
*/
|
|
156
156
|
locale?: Locale;
|
|
157
157
|
/**
|
|
158
|
-
* 箱线图的最大宽度,可以设置绝对的像素值,也可以使用百分比(如 '10%')
|
|
158
|
+
* @description 箱线图的最大宽度,可以设置绝对的像素值,也可以使用百分比(如 '10%')
|
|
159
159
|
*/
|
|
160
160
|
boxMaxWidth?: string | number;
|
|
161
161
|
/**
|
|
162
|
-
* 分组箱线图中各个分组内的间距,可以设置绝对的像素值,也可以使用百分比(如 '10%')。
|
|
162
|
+
* @description 分组箱线图中各个分组内的间距,可以设置绝对的像素值,也可以使用百分比(如 '10%')。
|
|
163
163
|
*/
|
|
164
164
|
boxGapInGroup?: string | number;
|
|
165
165
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./zBoxPlot.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const zBoxPlot: z.ZodObject<{
|
|
3
3
|
chartType: z.ZodLiteral<"boxPlot">;
|
|
4
4
|
dataset: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>>>>;
|
|
5
5
|
encoding: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { zLocale } from "../../i18n/index.js";
|
|
3
3
|
import { zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zBackgroundColor, zBoxGapInGroup, zBoxMaxWidth, zBoxPlotStyle, zColor, zCrosshairRect, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zMeasureTree, zOutlierStyle, zSort, zSortLegend, zTheme, zTooltip, zWhiskersConfig, zXBandAxis, zYLinearAxis } from "../../properties/index.js";
|
|
4
|
-
const
|
|
4
|
+
const zBoxPlot = z.object({
|
|
5
5
|
chartType: z.literal('boxPlot'),
|
|
6
6
|
dataset: zDataset.nullish(),
|
|
7
7
|
encoding: zEncoding.nullish(),
|
|
@@ -30,6 +30,6 @@ const zBoxplot = z.object({
|
|
|
30
30
|
boxMaxWidth: zBoxMaxWidth.nullish(),
|
|
31
31
|
boxGapInGroup: zBoxGapInGroup.nullish()
|
|
32
32
|
});
|
|
33
|
-
export {
|
|
33
|
+
export { zBoxPlot };
|
|
34
34
|
|
|
35
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=zBoxPlot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types/chartType/
|
|
1
|
+
{"version":3,"file":"types/chartType/boxPlot/zBoxPlot.js","sources":["../../../../../src/types/chartType/boxPlot/zBoxPlot.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zBackgroundColor,\n zBoxGapInGroup,\n zBoxMaxWidth,\n zBoxPlotStyle,\n zColor,\n zCrosshairRect,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zMeasureTree,\n zOutlierStyle,\n zSort,\n zSortLegend,\n zTheme,\n zTooltip,\n zWhiskersConfig,\n zXBandAxis,\n zYLinearAxis,\n} from '../../properties'\n\nexport const zBoxPlot = z.object({\n chartType: z.literal('boxPlot'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasureTree.nullish(),\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n tooltip: zTooltip.nullish(),\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n sort: zSort.nullish(),\n sortLegent: zSortLegend.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n boxPlotStyle: z.array(zBoxPlotStyle).or(zBoxPlotStyle).nullish(),\n outlierStyle: z.array(zOutlierStyle).or(zOutlierStyle).nullish(),\n theme: zTheme.nullish(),\n whiskers: zWhiskersConfig.nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n dimensionLinkage: zDimensionLinkage.nullish(),\n locale: zLocale.nullish(),\n boxMaxWidth: zBoxMaxWidth.nullish(),\n boxGapInGroup: zBoxGapInGroup.nullish(),\n})\n"],"names":["zBoxPlot","z","zDataset","zEncoding","zDimensions","zMeasureTree","zBackgroundColor","zColor","zLabel","zLegend","zTooltip","zXBandAxis","zYLinearAxis","zSort","zSortLegend","zCrosshairRect","zBoxPlotStyle","zOutlierStyle","zTheme","zWhiskersConfig","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zDimensionLinkage","zLocale","zBoxMaxWidth","zBoxGapInGroup"],"mappings":";;;AA8BO,MAAMA,WAAWC,EAAE,MAAM,CAAC;IAC/B,WAAWA,EAAE,OAAO,CAAC;IACrB,SAASC,SAAS,OAAO;IACzB,UAAUC,UAAU,OAAO;IAC3B,YAAYC,YAAY,OAAO;IAC/B,UAAUC,aAAa,OAAO;IAC9B,iBAAiBC,iBAAiB,OAAO;IACzC,OAAOC,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,QAAQC,QAAQ,OAAO;IACvB,SAASC,SAAS,OAAO;IACzB,OAAOC,WAAW,OAAO;IACzB,OAAOC,aAAa,OAAO;IAC3B,MAAMC,MAAM,OAAO;IACnB,YAAYC,YAAY,OAAO;IAC/B,eAAeC,eAAe,OAAO;IACrC,cAAcd,EAAE,KAAK,CAACe,eAAe,EAAE,CAACA,eAAe,OAAO;IAC9D,cAAcf,EAAE,KAAK,CAACgB,eAAe,EAAE,CAACA,eAAe,OAAO;IAC9D,OAAOC,OAAO,OAAO;IACrB,UAAUC,gBAAgB,OAAO;IACjC,iBAAiBlB,EAAE,KAAK,CAACmB,kBAAkB,EAAE,CAACA,kBAAkB,OAAO;IACvE,wBAAwBnB,EAAE,KAAK,CAACoB,yBAAyB,EAAE,CAACA,yBAAyB,OAAO;IAC5F,0BAA0BpB,EAAE,KAAK,CAACqB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,gBAAgBrB,EAAE,KAAK,CAACsB,iBAAiB,EAAE,CAACA,iBAAiB,OAAO;IACpE,kBAAkBC,kBAAkB,OAAO;IAC3C,QAAQC,QAAQ,OAAO;IACvB,aAAaC,aAAa,OAAO;IACjC,eAAeC,eAAe,OAAO;AACvC"}
|
|
@@ -136,11 +136,11 @@ export interface Column {
|
|
|
136
136
|
*/
|
|
137
137
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
138
138
|
/**
|
|
139
|
-
* @description
|
|
139
|
+
* @description 维度值标注线,竖直方向展示,能够设置标注线的位置, 样式等
|
|
140
140
|
*/
|
|
141
141
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
142
142
|
/**
|
|
143
|
-
* @description
|
|
143
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
144
144
|
*/
|
|
145
145
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
146
146
|
/**
|
|
@@ -151,9 +151,9 @@ export interface Column {
|
|
|
151
151
|
* 多项式回归线
|
|
152
152
|
* @description 多项式回归线配置, 包括多项式的阶数、回归线的样式等.
|
|
153
153
|
*/
|
|
154
|
-
polynomialRegressionLine?:
|
|
154
|
+
polynomialRegressionLine?: PolynomialRegressionLine | PolynomialRegressionLine[];
|
|
155
155
|
/**
|
|
156
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
156
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
157
157
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
158
158
|
*/
|
|
159
159
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -1425,7 +1425,7 @@ export declare const zColumn: z.ZodObject<{
|
|
|
1425
1425
|
areaLineDash: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
1426
1426
|
outerPadding: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
|
1427
1427
|
}, z.core.$strip>]>>>;
|
|
1428
|
-
polynomialRegressionLine: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.
|
|
1428
|
+
polynomialRegressionLine: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
1429
1429
|
enable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1430
1430
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1431
1431
|
lineWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -1451,7 +1451,7 @@ export declare const zColumn: z.ZodObject<{
|
|
|
1451
1451
|
confidenceIntervalColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1452
1452
|
confidenceIntervalOpacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1453
1453
|
degree: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1454
|
-
}, z.core.$strip>]
|
|
1454
|
+
}, z.core.$strip>]>>>;
|
|
1455
1455
|
dimensionLinkage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1456
1456
|
enable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1457
1457
|
showTooltip: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -25,7 +25,7 @@ const zColumn = z.object({
|
|
|
25
25
|
annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
26
26
|
annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
27
27
|
annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
28
|
-
polynomialRegressionLine: z.array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).
|
|
28
|
+
polynomialRegressionLine: z.array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).nullish(),
|
|
29
29
|
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
30
30
|
locale: zLocale.nullish()
|
|
31
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types/chartType/column/zColumn.js","sources":["../../../../../src/types/chartType/column/zColumn.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zBackgroundColor,\n zBarMaxWidth,\n zBarStyle,\n zColor,\n zCrosshairRect,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zMeasureTree,\n zPolynomialRegressionLine,\n zSort,\n zSortLegend,\n zStackCornerRadius,\n zTheme,\n zTooltip,\n zXBandAxis,\n zYLinearAxis,\n} from '../../properties'\n\nexport const zColumn = z.object({\n chartType: z.literal('column'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasureTree.nullish(),\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n tooltip: zTooltip.nullish(),\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n sort: zSort.nullish(),\n sortLegent: zSortLegend.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n stackCornerRadius: zStackCornerRadius.nullish(),\n barMaxWidth: zBarMaxWidth.nullish(),\n theme: zTheme.nullish(),\n barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n polynomialRegressionLine: z.array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).
|
|
1
|
+
{"version":3,"file":"types/chartType/column/zColumn.js","sources":["../../../../../src/types/chartType/column/zColumn.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zBackgroundColor,\n zBarMaxWidth,\n zBarStyle,\n zColor,\n zCrosshairRect,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zMeasureTree,\n zPolynomialRegressionLine,\n zSort,\n zSortLegend,\n zStackCornerRadius,\n zTheme,\n zTooltip,\n zXBandAxis,\n zYLinearAxis,\n} from '../../properties'\n\nexport const zColumn = z.object({\n chartType: z.literal('column'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasureTree.nullish(),\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n tooltip: zTooltip.nullish(),\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n sort: zSort.nullish(),\n sortLegent: zSortLegend.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n stackCornerRadius: zStackCornerRadius.nullish(),\n barMaxWidth: zBarMaxWidth.nullish(),\n theme: zTheme.nullish(),\n barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n polynomialRegressionLine: z.array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).nullish(),\n dimensionLinkage: zDimensionLinkage.nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zColumn","z","zDataset","zEncoding","zDimensions","zMeasureTree","zBackgroundColor","zColor","zLabel","zLegend","zTooltip","zXBandAxis","zYLinearAxis","zSort","zSortLegend","zCrosshairRect","zStackCornerRadius","zBarMaxWidth","zTheme","zBarStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zPolynomialRegressionLine","zDimensionLinkage","zLocale"],"mappings":";;;AA6BO,MAAMA,UAAUC,EAAE,MAAM,CAAC;IAC9B,WAAWA,EAAE,OAAO,CAAC;IACrB,SAASC,SAAS,OAAO;IACzB,UAAUC,UAAU,OAAO;IAC3B,YAAYC,YAAY,OAAO;IAC/B,UAAUC,aAAa,OAAO;IAC9B,iBAAiBC,iBAAiB,OAAO;IACzC,OAAOC,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,QAAQC,QAAQ,OAAO;IACvB,SAASC,SAAS,OAAO;IACzB,OAAOC,WAAW,OAAO;IACzB,OAAOC,aAAa,OAAO;IAC3B,MAAMC,MAAM,OAAO;IACnB,YAAYC,YAAY,OAAO;IAC/B,eAAeC,eAAe,OAAO;IACrC,mBAAmBC,mBAAmB,OAAO;IAC7C,aAAaC,aAAa,OAAO;IACjC,OAAOC,OAAO,OAAO;IACrB,UAAUjB,EAAE,KAAK,CAACkB,WAAW,EAAE,CAACA,WAAW,OAAO;IAClD,iBAAiBlB,EAAE,KAAK,CAACmB,kBAAkB,EAAE,CAACA,kBAAkB,OAAO;IACvE,wBAAwBnB,EAAE,KAAK,CAACoB,yBAAyB,EAAE,CAACA,yBAAyB,OAAO;IAC5F,0BAA0BpB,EAAE,KAAK,CAACqB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,gBAAgBrB,EAAE,KAAK,CAACsB,iBAAiB,EAAE,CAACA,iBAAiB,OAAO;IACpE,0BAA0BtB,EAAE,KAAK,CAACuB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,kBAAkBC,kBAAkB,OAAO;IAC3C,QAAQC,QAAQ,OAAO;AACzB"}
|
|
@@ -140,13 +140,11 @@ export interface ColumnParallel {
|
|
|
140
140
|
*/
|
|
141
141
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
142
142
|
/**
|
|
143
|
-
*
|
|
144
|
-
* @description 标注垂直线配置, 根据选择的数据, 定义图表的标注垂直线, 包括标注垂直线的位置, 样式等.
|
|
143
|
+
* @description 维度值标注线,竖直方向展示,能够设置标注线的位置, 样式等
|
|
145
144
|
*/
|
|
146
145
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
147
146
|
/**
|
|
148
|
-
*
|
|
149
|
-
* @description 标注水平线配置, 根据选择的数据, 定义图表的标注水平线, 包括标注水平线的位置, 样式等.
|
|
147
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
150
148
|
*/
|
|
151
149
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
152
150
|
/**
|
|
@@ -155,7 +153,7 @@ export interface ColumnParallel {
|
|
|
155
153
|
*/
|
|
156
154
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
157
155
|
/**
|
|
158
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
156
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
159
157
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
160
158
|
*/
|
|
161
159
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -139,11 +139,11 @@ export interface ColumnPercent {
|
|
|
139
139
|
*/
|
|
140
140
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
141
141
|
/**
|
|
142
|
-
* @description
|
|
142
|
+
* @description 维度值标注线,竖直方向展示,能够设置标注线的位置, 样式等
|
|
143
143
|
*/
|
|
144
144
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
145
145
|
/**
|
|
146
|
-
* @description
|
|
146
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
147
147
|
*/
|
|
148
148
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
149
149
|
/**
|
|
@@ -151,7 +151,7 @@ export interface ColumnPercent {
|
|
|
151
151
|
*/
|
|
152
152
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
153
153
|
/**
|
|
154
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
154
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
155
155
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
156
156
|
*/
|
|
157
157
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -257,11 +257,11 @@ export interface DualAxis {
|
|
|
257
257
|
*/
|
|
258
258
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
259
259
|
/**
|
|
260
|
-
* @description
|
|
260
|
+
* @description 维度值标注线,竖直方向展示,能够设置标注线的位置, 样式等
|
|
261
261
|
*/
|
|
262
262
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
263
263
|
/**
|
|
264
|
-
* @description
|
|
264
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
265
265
|
*/
|
|
266
266
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
267
267
|
/**
|
|
@@ -269,7 +269,7 @@ export interface DualAxis {
|
|
|
269
269
|
*/
|
|
270
270
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
271
271
|
/**
|
|
272
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
272
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
273
273
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
274
274
|
*/
|
|
275
275
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -71,15 +71,15 @@ export interface Histogram {
|
|
|
71
71
|
*/
|
|
72
72
|
stackCornerRadius?: StackCornerRadius;
|
|
73
73
|
/**
|
|
74
|
-
* @description 直方图分箱数量,
|
|
74
|
+
* @description 直方图分箱数量, 用于定义直方图的分箱矩形(柱子)的数量
|
|
75
75
|
*/
|
|
76
76
|
binCount?: number;
|
|
77
77
|
/**
|
|
78
|
-
* @description
|
|
78
|
+
* @description 分箱步长,用于计算分箱的宽度,也会影响最终直方图中矩形(柱子)的宽度。如果同时设置了 binCount 和 binStep,则以 binStep 为准
|
|
79
79
|
*/
|
|
80
80
|
binStep?: number;
|
|
81
81
|
/**
|
|
82
|
-
* @description 直方图分箱值类型,
|
|
82
|
+
* @description 直方图分箱值类型, 用于定义直方图的分箱矩形(柱子)值类型, 默认为'count'
|
|
83
83
|
* @default 'count'
|
|
84
84
|
*/
|
|
85
85
|
binValueType?: 'count' | 'percentage';
|
|
@@ -104,11 +104,11 @@ export interface Histogram {
|
|
|
104
104
|
*/
|
|
105
105
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
106
106
|
/**
|
|
107
|
-
* @description
|
|
107
|
+
* @description 数值标注线(分箱值),竖直方向展示,能够设置标注线的位置, 样式等,如需分箱值对应的标注线,可以使用该配置
|
|
108
108
|
*/
|
|
109
109
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
110
110
|
/**
|
|
111
|
-
* @description
|
|
111
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制分箱值对应的标注线请使用该配置;注意分箱值受`binValueType` 影响
|
|
112
112
|
*/
|
|
113
113
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
114
114
|
/**
|
|
@@ -124,7 +124,7 @@ export interface Histogram {
|
|
|
124
124
|
*/
|
|
125
125
|
ecdfRegressionLine?: EcdfRegressionLine | EcdfRegressionLine[];
|
|
126
126
|
/**
|
|
127
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
127
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
128
128
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
129
129
|
*/
|
|
130
130
|
dimensionLinkage?: DimensionLinkage;
|
|
@@ -145,13 +145,11 @@ export interface Line {
|
|
|
145
145
|
*/
|
|
146
146
|
annotationPoint?: AnnotationPoint | AnnotationPoint[];
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
149
|
-
* @description 标注垂直线配置, 根据选择的数据, 定义图表的标注垂直线, 包括标注垂直线的位置, 样式等.
|
|
148
|
+
* @description 维度值标注线,竖直方向展示,能够设置标注线的位置, 样式等
|
|
150
149
|
*/
|
|
151
150
|
annotationVerticalLine?: AnnotationVerticalLine | AnnotationVerticalLine[];
|
|
152
151
|
/**
|
|
153
|
-
*
|
|
154
|
-
* @description 标注水平线配置, 根据选择的数据, 定义图表的标注水平线, 包括标注水平线的位置, 样式等.
|
|
152
|
+
* @description 数值标注线(包括均值线、最大值线、最小值线等),水平方向展示,能够设置标注线的位置, 样式等,如需绘制均值线等数值对应的标注线请使用该配置
|
|
155
153
|
*/
|
|
156
154
|
annotationHorizontalLine?: AnnotationHorizontalLine | AnnotationHorizontalLine[];
|
|
157
155
|
/**
|
|
@@ -160,7 +158,7 @@ export interface Line {
|
|
|
160
158
|
*/
|
|
161
159
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
162
160
|
/**
|
|
163
|
-
* 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
161
|
+
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
164
162
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
165
163
|
*/
|
|
166
164
|
dimensionLinkage?: DimensionLinkage;
|