@visactor/vseed 0.1.17 → 0.1.18
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 +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js +1 -3
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +1 -3
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/index.d.ts +0 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/index.js +1 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js +2 -17
- package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/barParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/roseParallel.js.map +1 -1
- package/dist/esm/types/chartType/area/area.d.ts +1 -1
- package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +1 -1
- package/dist/esm/types/chartType/bar/bar.d.ts +1 -1
- package/dist/esm/types/chartType/barParallel/barParallel.d.ts +1 -1
- package/dist/esm/types/chartType/barPercent/barPercent.d.ts +1 -1
- package/dist/esm/types/chartType/column/column.d.ts +1 -1
- package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +1 -1
- package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +1 -1
- package/dist/esm/types/chartType/donut/donut.d.ts +1 -1
- package/dist/esm/types/chartType/funnel/funnel.d.ts +1 -1
- package/dist/esm/types/chartType/pie/pie.d.ts +1 -1
- package/dist/esm/types/chartType/rose/rose.d.ts +1 -1
- package/dist/esm/types/chartType/table/table.d.ts +1 -1
- package/dist/esm/types/properties/format/numFormat.d.ts +1 -5
- package/dist/esm/types/properties/format/numFormat.js.map +1 -1
- package/dist/umd/index.js +48 -70
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/angle.d.ts +0 -2
- package/dist/esm/pipeline/spec/chart/pipes/axes/angle.js +0 -46
- package/dist/esm/pipeline/spec/chart/pipes/axes/angle.js.map +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, discreteLegend, initPivot, initRose, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, progressive, radiusAxis, roseStyle, stackCornerRadius, stackInverse, tooltip, verticalCrosshairRect } from "../pipes/index.js";
|
2
2
|
const rose = [
|
3
3
|
initRose,
|
4
4
|
stackCornerRadius,
|
@@ -7,7 +7,6 @@ const rose = [
|
|
7
7
|
backgroundColor,
|
8
8
|
datasetXY,
|
9
9
|
progressive,
|
10
|
-
angleAxis,
|
11
10
|
radiusAxis,
|
12
11
|
verticalCrosshairRect,
|
13
12
|
colorRoseStyleFill(roseStyle),
|
@@ -29,7 +28,6 @@ const pivotRose = [
|
|
29
28
|
datasetXY,
|
30
29
|
progressive,
|
31
30
|
radiusAxis,
|
32
|
-
angleAxis,
|
33
31
|
verticalCrosshairRect,
|
34
32
|
colorRoseStyleFill(roseStyle),
|
35
33
|
label,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipeline/rose.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/rose.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n stackInverse,\n verticalCrosshairRect,\n stackCornerRadius,\n initRose,\n radiusAxis,\n
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipeline/rose.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/rose.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n stackInverse,\n verticalCrosshairRect,\n stackCornerRadius,\n initRose,\n radiusAxis,\n progressive,\n linearColor,\n colorAdapter,\n pivotColorLegend,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n} from '../pipes'\n\nconst rose: SpecPipeline = [\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n label,\n tooltip,\n]\n\nconst pivotRose: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initRose,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n label,\n tooltip,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const roseSpecPipeline = [pivotAdapter(rose, pivotRose)]\n"],"names":["rose","initRose","stackCornerRadius","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","verticalCrosshairRect","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","label","tooltip","pivotRose","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","roseSpecPipeline","pivotAdapter"],"mappings":";AA+BA,MAAMA,OAAqB;IACzBC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBT,aAAaU,gBAAgBC;IAC7BC;IACAC;CACD;AAED,MAAMC,YAA0B;IAC9BC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdtB;QACAC;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC,mBAAmBC;QACnBG;QACAC;KACD;IACDO;IACAC;IACArB,aAAasB,qBAAqBC;CACnC;AAEM,MAAMC,mBAAmB;IAACC,aAAa7B,MAAMkB;CAAW"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorRoseStyleFill, datasetPivot, datasetXY, discreteLegend, initPivot, initRoseParallel, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, progressive, radiusAxis, roseStyle, stackCornerRadius, tooltip, verticalCrosshairRect } from "../pipes/index.js";
|
2
2
|
const roseParallel = [
|
3
3
|
initRoseParallel,
|
4
4
|
stackCornerRadius,
|
@@ -7,7 +7,6 @@ const roseParallel = [
|
|
7
7
|
datasetXY,
|
8
8
|
progressive,
|
9
9
|
radiusAxis,
|
10
|
-
angleAxis,
|
11
10
|
colorRoseStyleFill(roseStyle),
|
12
11
|
colorAdapter(discreteLegend, colorLegend),
|
13
12
|
label,
|
@@ -31,7 +30,6 @@ const pivotRoseParallel = [
|
|
31
30
|
datasetXY,
|
32
31
|
progressive,
|
33
32
|
radiusAxis,
|
34
|
-
angleAxis,
|
35
33
|
verticalCrosshairRect,
|
36
34
|
colorRoseStyleFill(roseStyle),
|
37
35
|
label,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipeline/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/roseParallel.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n pivotIndicators,\n initPivot,\n datasetPivot,\n pivotAdapter,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n verticalCrosshairRect,\n stackCornerRadius,\n initRoseParallel,\n radiusAxis,\n
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipeline/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/roseParallel.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n pivotIndicators,\n initPivot,\n datasetPivot,\n pivotAdapter,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n verticalCrosshairRect,\n stackCornerRadius,\n initRoseParallel,\n radiusAxis,\n progressive,\n pivotColorLegend,\n colorAdapter,\n linearColor,\n colorLegend,\n roseStyle,\n colorRoseStyleFill,\n} from '../pipes'\n\nconst roseParallel: SpecPipeline = [\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n colorRoseStyleFill(roseStyle),\n colorAdapter(discreteLegend, colorLegend),\n label,\n tooltip,\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotRoseParallel: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initRoseParallel,\n stackCornerRadius,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n radiusAxis,\n verticalCrosshairRect,\n colorRoseStyleFill(roseStyle),\n label,\n tooltip,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const roseParallelSpecPipeline: SpecPipeline = [pivotAdapter(roseParallel, pivotRoseParallel)]\n"],"names":["roseParallel","initRoseParallel","stackCornerRadius","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","radiusAxis","colorRoseStyleFill","roseStyle","discreteLegend","colorLegend","label","tooltip","verticalCrosshairRect","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotRoseParallel","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","roseParallelSpecPipeline","pivotAdapter"],"mappings":";AAkCA,MAAMA,eAA6B;IACjCC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC,mBAAmBC;IACnBR,aAAaS,gBAAgBC;IAC7BC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,oBAAkC;IACtCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdzB;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAO;QACAN,mBAAmBC;QACnBG;QACAC;QACAE;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACAzB,aAAa0B,qBAAqBC;CACnC;AAEM,MAAMC,2BAAyC;IAACC,aAAahC,cAAcqB;CAAmB"}
|
@@ -5,6 +5,5 @@ export { yLinear } from './yLinear';
|
|
5
5
|
export { yLinearPrimary } from './yLinearPrimary';
|
6
6
|
export { yLinearSecondary } from './yLinearSecondary';
|
7
7
|
export { radiusAxis } from './radius';
|
8
|
-
export { angleAxis } from './angle';
|
9
8
|
export { radarAngleAxis } from './radarAngle';
|
10
9
|
export { radarRadiusAxis } from './radarRadius';
|
@@ -5,7 +5,6 @@ import { yLinear } from "./yLinear.js";
|
|
5
5
|
import { yLinearPrimary } from "./yLinearPrimary.js";
|
6
6
|
import { yLinearSecondary } from "./yLinearSecondary.js";
|
7
7
|
import { radiusAxis } from "./radius.js";
|
8
|
-
import { angleAxis } from "./angle.js";
|
9
8
|
import { radarAngleAxis } from "./radarAngle.js";
|
10
9
|
import { radarRadiusAxis } from "./radarRadius.js";
|
11
|
-
export {
|
10
|
+
export { radarAngleAxis, radarRadiusAxis, radiusAxis, xBand, xLinear, yBand, yLinear, yLinearPrimary, yLinearSecondary };
|
@@ -5,28 +5,13 @@ const radiusAxis = (spec, context)=>{
|
|
5
5
|
const { advancedVSeed } = context;
|
6
6
|
const { dimensions, measures } = advancedVSeed;
|
7
7
|
if (!dimensions || !measures) return result;
|
8
|
-
const is0D = 0 === dimensions.length;
|
9
|
-
const is1M1D = 1 === dimensions.length && 1 === measures.length;
|
10
|
-
const showAxis = !(is0D || is1M1D);
|
11
8
|
if (!result.axes) result.axes = [];
|
12
9
|
result.axes.push({
|
13
10
|
type: 'linear',
|
14
11
|
orient: 'radius',
|
15
|
-
visible:
|
12
|
+
visible: false,
|
16
13
|
zero: true,
|
17
|
-
nice:
|
18
|
-
grid: {
|
19
|
-
visible: showAxis
|
20
|
-
},
|
21
|
-
tick: {
|
22
|
-
visible: showAxis
|
23
|
-
},
|
24
|
-
label: {
|
25
|
-
visible: showAxis
|
26
|
-
},
|
27
|
-
domainLine: {
|
28
|
-
visible: showAxis
|
29
|
-
}
|
14
|
+
nice: false
|
30
15
|
});
|
31
16
|
return result;
|
32
17
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/axes/radius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const radiusAxis: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { dimensions, measures } = advancedVSeed\n\n if (!dimensions || !measures) {\n return result\n }\n\n
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/axes/radius.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/axes/radius.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const radiusAxis: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { dimensions, measures } = advancedVSeed\n\n if (!dimensions || !measures) {\n return result\n }\n\n if (!result.axes) {\n result.axes = []\n }\n\n result.axes.push({\n type: 'linear',\n orient: 'radius',\n visible: false,\n zero: true,\n nice: false,\n })\n\n return result\n}\n"],"names":["radiusAxis","spec","context","result","advancedVSeed","dimensions","measures"],"mappings":"AAGO,MAAMA,aAAuB,CAACC,MAAMC;IACzC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGF;IAEjC,IAAI,CAACC,cAAc,CAACC,UAClB,OAAOH;IAGT,IAAI,CAACA,OAAO,IAAI,EACdA,OAAO,IAAI,GAAG,EAAE;IAGlBA,OAAO,IAAI,CAAC,IAAI,CAAC;QACf,MAAM;QACN,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;IACR;IAEA,OAAOA;AACT"}
|
@@ -1,11 +1,12 @@
|
|
1
|
+
import { isDeepEqual } from "remeda";
|
1
2
|
const initBarParallel = (spec, context)=>{
|
2
3
|
const result = {
|
3
4
|
...spec
|
4
5
|
};
|
5
6
|
const { advancedVSeed } = context;
|
6
|
-
const { datasetReshapeInfo,
|
7
|
+
const { datasetReshapeInfo, encoding } = advancedVSeed;
|
7
8
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
8
|
-
const sameDimensionsMode =
|
9
|
+
const sameDimensionsMode = isDeepEqual(encoding.y, encoding.color);
|
9
10
|
result.type = 'bar';
|
10
11
|
result.direction = 'horizontal';
|
11
12
|
result.yField = sameDimensionsMode ? [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/init/barParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/barParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const initBarParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/init/barParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/barParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport type { SpecPipe } from 'src/types'\n\nexport const initBarParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.y, encoding.color)\n\n result.type = 'bar'\n result.direction = 'horizontal'\n\n result.yField = sameDimensionsMode\n ? [unfoldInfo.encodingY]\n : ([unfoldInfo.encodingY, unfoldInfo.encodingDetail] as string[])\n result.xField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initBarParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual"],"mappings":";AAIO,MAAMA,kBAA4B,CAACC,MAAMC;IAC9C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBC,YAAYJ,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjEH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IAEnBA,OAAO,MAAM,GAAGM,qBACZ;QAACF,WAAW,SAAS;KAAC,GACrB;QAACA,WAAW,SAAS;QAAEA,WAAW,cAAc;KAAC;IACtDJ,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAE/CJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
|
@@ -1,11 +1,12 @@
|
|
1
|
+
import { isDeepEqual } from "remeda";
|
1
2
|
const initColumnParallel = (spec, context)=>{
|
2
3
|
const result = {
|
3
4
|
...spec
|
4
5
|
};
|
5
6
|
const { advancedVSeed } = context;
|
6
|
-
const { datasetReshapeInfo,
|
7
|
+
const { datasetReshapeInfo, encoding } = advancedVSeed;
|
7
8
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
8
|
-
const sameDimensionsMode =
|
9
|
+
const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color);
|
9
10
|
result.type = 'bar';
|
10
11
|
result.direction = 'vertical';
|
11
12
|
result.xField = sameDimensionsMode ? [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/init/columnParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/columnParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const initColumnParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/init/columnParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/columnParallel.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport type { SpecPipe } from 'src/types'\n\nexport const initColumnParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.x, encoding.color)\n\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = sameDimensionsMode ? [unfoldInfo.encodingX] : [unfoldInfo.encodingX, unfoldInfo.encodingDetail]\n result.yField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initColumnParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual"],"mappings":";AAIO,MAAMA,qBAA+B,CAACC,MAAMC;IACjD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IACzC,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAEtD,MAAMI,qBAAqBC,YAAYJ,SAAS,CAAC,EAAEA,SAAS,KAAK;IAEjEH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGM,qBAAqB;QAACF,WAAW,SAAS;KAAC,GAAG;QAACA,WAAW,SAAS;QAAEA,WAAW,cAAc;KAAC;IAC/GJ,OAAO,MAAM,GAAGK,SAAS,YAAY;IACrCL,OAAO,WAAW,GAAGI,WAAW,eAAe;IAC/CJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
|
@@ -1,11 +1,12 @@
|
|
1
|
+
import { isDeepEqual } from "remeda";
|
1
2
|
const initRoseParallel = (spec, context)=>{
|
2
3
|
const result = {
|
3
4
|
...spec
|
4
5
|
};
|
5
6
|
const { advancedVSeed } = context;
|
6
|
-
const { datasetReshapeInfo, dataset,
|
7
|
+
const { datasetReshapeInfo, dataset, encoding } = advancedVSeed;
|
7
8
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
8
|
-
const sameDimensionsMode =
|
9
|
+
const sameDimensionsMode = isDeepEqual(encoding.angle, encoding.color);
|
9
10
|
result.type = 'rose';
|
10
11
|
result.angleField = sameDimensionsMode ? [
|
11
12
|
unfoldInfo.encodingAngle
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/init/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/roseParallel.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const initRoseParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, dataset,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/init/roseParallel.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/roseParallel.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport { isDeepEqual } from 'remeda'\nimport type { SpecPipe } from 'src/types'\n\nexport const initRoseParallel: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRoseChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo, dataset, encoding } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n const sameDimensionsMode = isDeepEqual(encoding.angle, encoding.color)\n\n result.type = 'rose'\n result.angleField = sameDimensionsMode\n ? [unfoldInfo.encodingAngle]\n : [unfoldInfo.encodingAngle, unfoldInfo.encodingDetail]\n result.valueField = foldInfo.measureValue\n result.seriesField = unfoldInfo.encodingColorId\n result.padding = 0\n\n result.outerRadius = 0.9\n result.innerRadius = 0\n\n const hasNegativeValue = dataset.flat().find((d) => d[foldInfo.measureValue] < 0)\n if (hasNegativeValue) {\n result.innerRadius = 0.05\n }\n\n result.rose = {\n style: {\n stroke: '#ffffff',\n lineWidth: 1,\n },\n state: {\n hover: {\n lineWidth: 1,\n fillOpacity: 0.6,\n },\n },\n }\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initRoseParallel","spec","context","result","advancedVSeed","datasetReshapeInfo","dataset","encoding","unfoldInfo","foldInfo","sameDimensionsMode","isDeepEqual","hasNegativeValue","d"],"mappings":";AAIO,MAAMA,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGH;IAClD,MAAM,EAAEI,UAAU,EAAEC,QAAQ,EAAE,GAAGJ,kBAAkB,CAAC,EAAE;IAEtD,MAAMK,qBAAqBC,YAAYJ,SAAS,KAAK,EAAEA,SAAS,KAAK;IAErEJ,OAAO,IAAI,GAAG;IACdA,OAAO,UAAU,GAAGO,qBAChB;QAACF,WAAW,aAAa;KAAC,GAC1B;QAACA,WAAW,aAAa;QAAEA,WAAW,cAAc;KAAC;IACzDL,OAAO,UAAU,GAAGM,SAAS,YAAY;IACzCN,OAAO,WAAW,GAAGK,WAAW,eAAe;IAC/CL,OAAO,OAAO,GAAG;IAEjBA,OAAO,WAAW,GAAG;IACrBA,OAAO,WAAW,GAAG;IAErB,MAAMS,mBAAmBN,QAAQ,IAAI,GAAG,IAAI,CAAC,CAACO,IAAMA,CAAC,CAACJ,SAAS,YAAY,CAAC,GAAG;IAC/E,IAAIG,kBACFT,OAAO,WAAW,GAAG;IAGvBA,OAAO,IAAI,GAAG;QACZ,OAAO;YACL,QAAQ;YACR,WAAW;QACb;QACA,OAAO;YACL,OAAO;gBACL,WAAW;gBACX,aAAa;YACf;QACF;IACF;IACAA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
|
@@ -49,7 +49,7 @@ export interface AreaPercent {
|
|
49
49
|
/**
|
50
50
|
* 指标
|
51
51
|
* @description 百分比面积图的指标会自动合并为一个指标, 映射到Y轴, 指标名称会与其余维度合并, 作为图例项展示.
|
52
|
-
* @type {
|
52
|
+
* @type {MeasureTree}
|
53
53
|
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
54
54
|
*/
|
55
55
|
measures?: MeasureTree;
|
@@ -46,7 +46,7 @@ export interface BarParallel {
|
|
46
46
|
dimensions?: Dimensions;
|
47
47
|
/**
|
48
48
|
* @description 指标, 并列条形图指标会自动合并为一个指标, 映射到X轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
49
|
-
* @type {
|
49
|
+
* @type {MeasureTree}
|
50
50
|
* @example [{id: 'value1', alias: '指标1'}, {id: 'value2', alias: '指标2'}]
|
51
51
|
*/
|
52
52
|
measures?: MeasureTree;
|
@@ -46,7 +46,7 @@ export interface BarPercent {
|
|
46
46
|
dimensions?: Dimensions;
|
47
47
|
/**
|
48
48
|
* @description 指标, 指标会自动合并为一个指标, 映射到X轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
49
|
-
* @type {
|
49
|
+
* @type {MeasureTree}
|
50
50
|
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
51
51
|
*/
|
52
52
|
measures?: MeasureTree;
|
@@ -46,7 +46,7 @@ export interface Column {
|
|
46
46
|
dimensions?: Dimensions;
|
47
47
|
/**
|
48
48
|
* @description 柱状图的所有指标会自动合并为一个指标, 映射到Y轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
49
|
-
* @type {
|
49
|
+
* @type {MeasureTree}
|
50
50
|
* @example [{id: "value", alias: "数值"}]
|
51
51
|
*/
|
52
52
|
measures?: MeasureTree;
|
@@ -44,7 +44,7 @@ export interface ColumnParallel {
|
|
44
44
|
dimensions?: Dimensions;
|
45
45
|
/**
|
46
46
|
* @description 指标, 并列柱状图的所有指标会自动合并为一个指标, 映射到Y轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
47
|
-
* @type {
|
47
|
+
* @type {MeasureTree}
|
48
48
|
Axis * @example [{id: 'value1', alias: '指标1'}, {id: 'value2', alias: '指标2'}]
|
49
49
|
*/
|
50
50
|
measures?: MeasureTree;
|
@@ -50,7 +50,7 @@ export interface ColumnPercent {
|
|
50
50
|
/**
|
51
51
|
* 指标
|
52
52
|
* @description 百分比柱状图指标会自动合并为一个指标, 映射到Y轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
53
|
-
* @type {
|
53
|
+
* @type {MeasureTree}
|
54
54
|
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
55
55
|
*/
|
56
56
|
measures?: MeasureTree;
|
@@ -49,7 +49,7 @@ export interface Donut {
|
|
49
49
|
/**
|
50
50
|
* 指标
|
51
51
|
* @description 环形图的所有指标会自动合并为一个指标, 映射到饼图的半径, 存在多个指标时, 指标名称会与其余维度合并, 并作为图例项展示.
|
52
|
-
* @type {
|
52
|
+
* @type {MeasureTree}
|
53
53
|
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
54
54
|
*/
|
55
55
|
measures?: MeasureTree;
|
@@ -49,7 +49,7 @@ export interface Pie {
|
|
49
49
|
/**
|
50
50
|
* 指标
|
51
51
|
* @description 饼图的所有指标会自动合并为一个指标, 映射到半径轴, 存在多个指标时, 指标名称会与其余维度合并, 作为图例项展示.
|
52
|
-
* @type {
|
52
|
+
* @type {MeasureTree}
|
53
53
|
* @example [{id: 'value', alias: '数值占比', format: 'percent'}]
|
54
54
|
*/
|
55
55
|
measures?: MeasureTree;
|
@@ -6,13 +6,11 @@ export interface NumFormat {
|
|
6
6
|
*/
|
7
7
|
type?: 'number' | 'percent' | 'permille' | 'scientific';
|
8
8
|
/**
|
9
|
-
* @description 数值格式化比例,
|
9
|
+
* @description 数值格式化比例, 不能为0
|
10
10
|
* @default 1
|
11
11
|
* @example
|
12
12
|
* - 100000 转换为 10万, ratio:10000, symbol:"万"
|
13
13
|
* - 100000 转换为 10K, ratio:1000, symbol:"K"
|
14
|
-
* - 100000 转换为 100%, ratio:100, symbol:"%"
|
15
|
-
* - 100000 转换为 100‰, ratio:1000, symbol:"‰"
|
16
14
|
*/
|
17
15
|
ratio?: number;
|
18
16
|
/**
|
@@ -21,8 +19,6 @@ export interface NumFormat {
|
|
21
19
|
* @example
|
22
20
|
* - 100000 转换为 10万, ratio:10000, symbol:"万"
|
23
21
|
* - 100000 转换为 10K, ratio:1000, symbol:"K"
|
24
|
-
* - 100000 转换为 100%, ratio:100, symbol:"%"
|
25
|
-
* - 100000 转换为 100‰, ratio:1000, symbol:"‰"
|
26
22
|
*/
|
27
23
|
symbol?: string;
|
28
24
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types/properties/format/numFormat.js","sources":["webpack://@visactor/vseed/./src/types/properties/format/numFormat.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport interface NumFormat {\n /**\n * @description 数字格式化类型, 支持数值(十进制)、百分比(%)、千分比(‰)、科学计数法\n * @default 'number'\n */\n type?: 'number' | 'percent' | 'permille' | 'scientific'\n\n /**\n * @description 数值格式化比例,
|
1
|
+
{"version":3,"file":"types/properties/format/numFormat.js","sources":["webpack://@visactor/vseed/./src/types/properties/format/numFormat.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport interface NumFormat {\n /**\n * @description 数字格式化类型, 支持数值(十进制)、百分比(%)、千分比(‰)、科学计数法\n * @default 'number'\n */\n type?: 'number' | 'percent' | 'permille' | 'scientific'\n\n /**\n * @description 数值格式化比例, 不能为0\n * @default 1\n * @example\n * - 100000 转换为 10万, ratio:10000, symbol:\"万\"\n * - 100000 转换为 10K, ratio:1000, symbol:\"K\"\n */\n ratio?: number\n\n /**\n * @description 数值格式化符号, 例如%、‰\n * @default ''\n * @example\n * - 100000 转换为 10万, ratio:10000, symbol:\"万\"\n * - 100000 转换为 10K, ratio:1000, symbol:\"K\"\n */\n symbol?: string\n\n /**\n * @description 数值格式化千分位分隔符\n * @default true\n */\n thousandSeparator?: boolean\n\n /**\n * @description 数值格式化后缀\n * @default ''\n */\n suffix?: string\n /**\n * @description 数值格式化前缀\n * @default ''\n */\n prefix?: string\n\n /**\n * @description 数值格式化小数位, 使用浏览器提供的 Intl.NumberFormat 中的 minimumFractionDigits 和 maximumFractionDigits 进行格式化, 优先级低于 significantDigits\n * @default 2\n * @example\n * - 1234.5678 转换为 1235, fractionDigits:0 (roundingMode:halfCeil)\n * - 1234.5678 转换为 1234.6, fractionDigits:1 (roundingMode:halfCeil)\n * - 1234.5678 转换为 1234.57, fractionDigits:2 (roundingMode:halfCeil)\n * - 1234.5678 转换为 1230.568, fractionDigits:3 (roundingMode:halfCeil)\n * - 1234.5678 转换为 1234.5678, fractionDigits:4 (roundingMode:halfCeil)\n * - 1234.5678 转换为 1234.56780, fractionDigits:5 (roundingMode:halfCeil)\n */\n fractionDigits?: number\n\n /**\n * @description 数值格式化有效位, 使用浏览器提供的 Intl.NumberFormat 中的 minimumSignificantDigits 和 maximumSignificantDigits 进行格式化, 优先级高于 fractionDigits\n * @default undefined\n * @example\n * - 1234.5678 转换为 1000, significantDigits:1\n * - 1234.5678 转换为 1200, significantDigits:2\n * - 1234.5678 转换为 1230, significantDigits:3\n * - 1234.5678 转换为 1234, significantDigits:4\n * - 1234.5678 转换为 1234.6, significantDigits:5 (roundingMode:halfCeil)\n * - 1234.5678 转换为 1234.57, significantDigits:6 (roundingMode:halfCeil)\n * - 1234.5678 转换为 1234.568, significantDigits:7 (roundingMode:halfCeil)\n * - 1234.5678 转换为 1234.5678, significantDigits:8 (roundingMode:halfCeil)\n */\n significantDigits?: number\n\n /**\n * @description 数值格式化舍入优先级, 处理同时设置了 significantDigits 和 fractionDigits 时的舍入优先级, 使用浏览器提供的 Intl.NumberFormat 进行格式化, 规则同 Intl.NumberFormat 中的 roundingPriority\n * @default 'morePrecision'\n * @example\n * - 1234.5678 转换为 1230, significantDigits:3 (roundingPriority:lessPrecision)\n * - 1234.5678 转换为 1234.5678, significantDigits:3 (roundingPriority:morePrecision)\n */\n roundingPriority?: 'morePrecision' | 'lessPrecision'\n\n /**\n * @description 数值格式化舍入模式, 使用浏览器提供的 Intl.NumberFormat 进行格式化, 规则同 Intl.NumberFormat 中的 roundingMode\n * @default 'halfExpand'\n * @example\n */\n roundingMode?:\n | 'floor'\n | 'ceil'\n | 'expand'\n | 'trunc'\n | 'halfCeil'\n | 'halfFloor'\n | 'halfExpand'\n | 'halfTrunc'\n | 'halfEven'\n}\n\nexport const zNumFormat = z\n .object({\n type: z.enum(['number', 'percent', 'permille', 'scientific']).default('number').optional(),\n ratio: z.number().default(1).optional(),\n symbol: z.string().default('').optional(),\n thousandSeparator: z.boolean().default(false).optional(),\n prefix: z.string().default('').optional(),\n suffix: z.string().default('').optional(),\n\n fractionDigits: z.number().default(2).optional(),\n significantDigits: z.number().default(0).optional(),\n roundingPriority: z.enum(['morePrecision', 'lessPrecision']).default('morePrecision').optional(),\n roundingMode: z\n .enum(['floor', 'ceil', 'halfEven', 'expand', 'trunc', 'halfFloor', 'halfCeil', 'halfExpand', 'halfTrunc'])\n .default('halfCeil')\n .optional(),\n })\n .optional()\n"],"names":["zNumFormat","z"],"mappings":";AAkGO,MAAMA,aAAaC,EAAAA,MACjB,CAAC;IACN,MAAMA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAU;QAAW;QAAY;KAAa,EAAE,OAAO,CAAC,UAAU,QAAQ;IACxF,OAAOA,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,QAAQ;IACrC,QAAQA,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,QAAQ;IACvC,mBAAmBA,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,QAAQ;IACtD,QAAQA,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,QAAQ;IACvC,QAAQA,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,QAAQ;IAEvC,gBAAgBA,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,QAAQ;IAC9C,mBAAmBA,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,QAAQ;IACjD,kBAAkBA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAiB;KAAgB,EAAE,OAAO,CAAC,iBAAiB,QAAQ;IAC9F,cAAcA,CAAC,CAADA,OACP,CAAC;QAAC;QAAS;QAAQ;QAAY;QAAU;QAAS;QAAa;QAAY;QAAc;KAAY,EACzG,OAAO,CAAC,YACR,QAAQ;AACb,GACC,QAAQ"}
|
package/dist/umd/index.js
CHANGED
@@ -4888,14 +4888,54 @@
|
|
4888
4888
|
markStyle_markStyle,
|
4889
4889
|
annotation_annotation
|
4890
4890
|
];
|
4891
|
+
function chunk_HGKLN5KY_k(...n) {
|
4892
|
+
return chunk_WIMGWYZL_u(chunk_HGKLN5KY_u, n);
|
4893
|
+
}
|
4894
|
+
function chunk_HGKLN5KY_u(n, e) {
|
4895
|
+
if (n === e || Object.is(n, e)) return !0;
|
4896
|
+
if ("object" != typeof n || "object" != typeof e || null === n || null === e || Object.getPrototypeOf(n) !== Object.getPrototypeOf(e)) return !1;
|
4897
|
+
if (Array.isArray(n)) return chunk_HGKLN5KY_l(n, e);
|
4898
|
+
if (n instanceof Map) return chunk_HGKLN5KY_a(n, e);
|
4899
|
+
if (n instanceof Set) return chunk_HGKLN5KY_c(n, e);
|
4900
|
+
if (n instanceof Date) return n.getTime() === e.getTime();
|
4901
|
+
if (n instanceof RegExp) return n.toString() === e.toString();
|
4902
|
+
if (Object.keys(n).length !== Object.keys(e).length) return !1;
|
4903
|
+
for (let [r, t] of Object.entries(n))if (!(r in e) || !chunk_HGKLN5KY_u(t, e[r])) return !1;
|
4904
|
+
return !0;
|
4905
|
+
}
|
4906
|
+
function chunk_HGKLN5KY_l(n, e) {
|
4907
|
+
if (n.length !== e.length) return !1;
|
4908
|
+
for (let [r, t] of n.entries())if (!chunk_HGKLN5KY_u(t, e[r])) return !1;
|
4909
|
+
return !0;
|
4910
|
+
}
|
4911
|
+
function chunk_HGKLN5KY_a(n, e) {
|
4912
|
+
if (n.size !== e.size) return !1;
|
4913
|
+
for (let [r, t] of n.entries())if (!e.has(r) || !chunk_HGKLN5KY_u(t, e.get(r))) return !1;
|
4914
|
+
return !0;
|
4915
|
+
}
|
4916
|
+
function chunk_HGKLN5KY_c(n, e) {
|
4917
|
+
if (n.size !== e.size) return !1;
|
4918
|
+
let r = [
|
4919
|
+
...e
|
4920
|
+
];
|
4921
|
+
for (let t of n){
|
4922
|
+
let o = !1;
|
4923
|
+
for (let [s, f] of r.entries())if (chunk_HGKLN5KY_u(t, f)) {
|
4924
|
+
o = !0, r.splice(s, 1);
|
4925
|
+
break;
|
4926
|
+
}
|
4927
|
+
if (!o) return !1;
|
4928
|
+
}
|
4929
|
+
return !0;
|
4930
|
+
}
|
4891
4931
|
const initColumnParallel = (spec, context)=>{
|
4892
4932
|
const result = {
|
4893
4933
|
...spec
|
4894
4934
|
};
|
4895
4935
|
const { advancedVSeed } = context;
|
4896
|
-
const { datasetReshapeInfo,
|
4936
|
+
const { datasetReshapeInfo, encoding } = advancedVSeed;
|
4897
4937
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
4898
|
-
const sameDimensionsMode =
|
4938
|
+
const sameDimensionsMode = chunk_HGKLN5KY_k(encoding.x, encoding.color);
|
4899
4939
|
result.type = 'bar';
|
4900
4940
|
result.direction = 'vertical';
|
4901
4941
|
result.xField = sameDimensionsMode ? [
|
@@ -5547,9 +5587,9 @@
|
|
5547
5587
|
...spec
|
5548
5588
|
};
|
5549
5589
|
const { advancedVSeed } = context;
|
5550
|
-
const { datasetReshapeInfo,
|
5590
|
+
const { datasetReshapeInfo, encoding } = advancedVSeed;
|
5551
5591
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
5552
|
-
const sameDimensionsMode =
|
5592
|
+
const sameDimensionsMode = chunk_HGKLN5KY_k(encoding.y, encoding.color);
|
5553
5593
|
result.type = 'bar';
|
5554
5594
|
result.direction = 'horizontal';
|
5555
5595
|
result.yField = sameDimensionsMode ? [
|
@@ -8010,49 +8050,6 @@
|
|
8010
8050
|
result.animation = true;
|
8011
8051
|
return result;
|
8012
8052
|
};
|
8013
|
-
const angleAxis = (spec, context)=>{
|
8014
|
-
const result = {
|
8015
|
-
...spec
|
8016
|
-
};
|
8017
|
-
const { advancedVSeed } = context;
|
8018
|
-
const { dimensions, measures } = advancedVSeed;
|
8019
|
-
if (!dimensions || !measures) return result;
|
8020
|
-
const is0D = 0 === dimensions.length;
|
8021
|
-
const is1M1D = 1 === dimensions.length && 1 === measures.length;
|
8022
|
-
const showAxis = !(is0D || is1M1D);
|
8023
|
-
if (!result.axes) result.axes = [];
|
8024
|
-
result.axes.push({
|
8025
|
-
type: 'band',
|
8026
|
-
orient: 'angle',
|
8027
|
-
visible: showAxis,
|
8028
|
-
zero: true,
|
8029
|
-
nice: !!showAxis,
|
8030
|
-
paddingInner: showAxis ? [
|
8031
|
-
0.15,
|
8032
|
-
0.1
|
8033
|
-
] : [
|
8034
|
-
0,
|
8035
|
-
0
|
8036
|
-
],
|
8037
|
-
paddingOuter: showAxis ? [
|
8038
|
-
0.075,
|
8039
|
-
0.1
|
8040
|
-
] : [
|
8041
|
-
0,
|
8042
|
-
0
|
8043
|
-
],
|
8044
|
-
grid: {
|
8045
|
-
visible: showAxis
|
8046
|
-
},
|
8047
|
-
domainLine: {
|
8048
|
-
visible: showAxis
|
8049
|
-
},
|
8050
|
-
tick: {
|
8051
|
-
visible: showAxis
|
8052
|
-
}
|
8053
|
-
});
|
8054
|
-
return result;
|
8055
|
-
};
|
8056
8053
|
const radiusAxis = (spec, context)=>{
|
8057
8054
|
const result = {
|
8058
8055
|
...spec
|
@@ -8060,28 +8057,13 @@
|
|
8060
8057
|
const { advancedVSeed } = context;
|
8061
8058
|
const { dimensions, measures } = advancedVSeed;
|
8062
8059
|
if (!dimensions || !measures) return result;
|
8063
|
-
const is0D = 0 === dimensions.length;
|
8064
|
-
const is1M1D = 1 === dimensions.length && 1 === measures.length;
|
8065
|
-
const showAxis = !(is0D || is1M1D);
|
8066
8060
|
if (!result.axes) result.axes = [];
|
8067
8061
|
result.axes.push({
|
8068
8062
|
type: 'linear',
|
8069
8063
|
orient: 'radius',
|
8070
|
-
visible:
|
8064
|
+
visible: false,
|
8071
8065
|
zero: true,
|
8072
|
-
nice:
|
8073
|
-
grid: {
|
8074
|
-
visible: showAxis
|
8075
|
-
},
|
8076
|
-
tick: {
|
8077
|
-
visible: showAxis
|
8078
|
-
},
|
8079
|
-
label: {
|
8080
|
-
visible: showAxis
|
8081
|
-
},
|
8082
|
-
domainLine: {
|
8083
|
-
visible: showAxis
|
8084
|
-
}
|
8066
|
+
nice: false
|
8085
8067
|
});
|
8086
8068
|
return result;
|
8087
8069
|
};
|
@@ -8132,7 +8114,6 @@
|
|
8132
8114
|
background_backgroundColor,
|
8133
8115
|
datasetXY,
|
8134
8116
|
progressive,
|
8135
|
-
angleAxis,
|
8136
8117
|
radiusAxis,
|
8137
8118
|
verticalCrosshairRect,
|
8138
8119
|
colorRoseStyleFill(roseStyle),
|
@@ -8154,7 +8135,6 @@
|
|
8154
8135
|
datasetXY,
|
8155
8136
|
progressive,
|
8156
8137
|
radiusAxis,
|
8157
|
-
angleAxis,
|
8158
8138
|
verticalCrosshairRect,
|
8159
8139
|
colorRoseStyleFill(roseStyle),
|
8160
8140
|
label_label,
|
@@ -8203,9 +8183,9 @@
|
|
8203
8183
|
...spec
|
8204
8184
|
};
|
8205
8185
|
const { advancedVSeed } = context;
|
8206
|
-
const { datasetReshapeInfo, dataset,
|
8186
|
+
const { datasetReshapeInfo, dataset, encoding } = advancedVSeed;
|
8207
8187
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
8208
|
-
const sameDimensionsMode =
|
8188
|
+
const sameDimensionsMode = chunk_HGKLN5KY_k(encoding.angle, encoding.color);
|
8209
8189
|
result.type = 'rose';
|
8210
8190
|
result.angleField = sameDimensionsMode ? [
|
8211
8191
|
unfoldInfo.encodingAngle
|
@@ -8248,7 +8228,6 @@
|
|
8248
8228
|
datasetXY,
|
8249
8229
|
progressive,
|
8250
8230
|
radiusAxis,
|
8251
|
-
angleAxis,
|
8252
8231
|
colorRoseStyleFill(roseStyle),
|
8253
8232
|
colorAdapter(discreteLegend, colorLegend),
|
8254
8233
|
label_label,
|
@@ -8272,7 +8251,6 @@
|
|
8272
8251
|
datasetXY,
|
8273
8252
|
progressive,
|
8274
8253
|
radiusAxis,
|
8275
|
-
angleAxis,
|
8276
8254
|
verticalCrosshairRect,
|
8277
8255
|
colorRoseStyleFill(roseStyle),
|
8278
8256
|
label_label,
|