@visactor/vseed 0.0.38 → 0.0.40
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/builder/builder/builder.d.ts +16 -0
- package/dist/index.cjs +56 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +56 -22
- package/dist/index.js.map +1 -1
- package/dist/pipeline/spec/chart/pipes/color/color.d.ts +3 -0
- package/dist/pipeline/spec/chart/pipes/series/series.d.ts +4 -0
- package/dist/types/advancedVSeed.d.ts +8 -0
- package/dist/types/chartType/area/area.d.ts +2 -8
- package/dist/types/chartType/area/zArea.d.ts +6 -0
- package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +6 -0
- package/dist/types/chartType/areaRange/zAreaRange.d.ts +6 -0
- package/dist/types/chartType/bar/zBar.d.ts +2 -0
- package/dist/types/chartType/barParallel/zBarParallel.d.ts +2 -0
- package/dist/types/chartType/barPercent/zBarPercent.d.ts +2 -0
- package/dist/types/chartType/column/zColumn.d.ts +2 -0
- package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +2 -0
- package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +2 -0
- package/dist/types/chartType/dualAxis/zDualAxis.d.ts +8 -0
- package/dist/types/chartType/line/zLine.d.ts +4 -0
- package/dist/types/chartType/radar/radar.d.ts +25 -1
- package/dist/types/chartType/scatter/zScatter.d.ts +2 -0
- package/dist/types/properties/annotation/annotationArea.d.ts +17 -17
- package/dist/types/properties/markStyle/areaStyle.d.ts +5 -76
- package/dist/types/properties/markStyle/barStyle.d.ts +11 -12
- package/dist/types/properties/markStyle/index.d.ts +2 -1
- package/dist/types/properties/markStyle/lineStyle.d.ts +11 -17
- package/dist/types/properties/markStyle/markStyle.d.ts +8 -0
- package/dist/types/properties/markStyle/pointStyle.d.ts +5 -6
- package/dist/types/properties/markStyle/zAreaStyle.d.ts +75 -0
- package/dist/types/vseed.d.ts +44 -0
- package/dist/umd/index.js +56 -22
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
@@ -1765,6 +1765,7 @@ export declare class Builder implements VSeedBuilder {
|
|
1765
1765
|
operator?: "in" | "not in" | null | undefined;
|
1766
1766
|
op?: "in" | "not in" | null | undefined;
|
1767
1767
|
})[] | null | undefined;
|
1768
|
+
barVisible?: boolean | null | undefined;
|
1768
1769
|
barColor?: string | null | undefined;
|
1769
1770
|
barColorOpacity?: number | null | undefined;
|
1770
1771
|
barBorderColor?: string | null | undefined;
|
@@ -1793,6 +1794,7 @@ export declare class Builder implements VSeedBuilder {
|
|
1793
1794
|
operator?: "in" | "not in" | null | undefined;
|
1794
1795
|
op?: "in" | "not in" | null | undefined;
|
1795
1796
|
})[] | null | undefined;
|
1797
|
+
barVisible?: boolean | null | undefined;
|
1796
1798
|
barColor?: string | null | undefined;
|
1797
1799
|
barColorOpacity?: number | null | undefined;
|
1798
1800
|
barBorderColor?: string | null | undefined;
|
@@ -1822,6 +1824,7 @@ export declare class Builder implements VSeedBuilder {
|
|
1822
1824
|
operator?: "in" | "not in" | null | undefined;
|
1823
1825
|
op?: "in" | "not in" | null | undefined;
|
1824
1826
|
})[] | null | undefined;
|
1827
|
+
pointVisible?: boolean | null | undefined;
|
1825
1828
|
pointSize?: number | null | undefined;
|
1826
1829
|
pointColor?: string | null | undefined;
|
1827
1830
|
pointColorOpacity?: number | null | undefined;
|
@@ -1850,6 +1853,7 @@ export declare class Builder implements VSeedBuilder {
|
|
1850
1853
|
operator?: "in" | "not in" | null | undefined;
|
1851
1854
|
op?: "in" | "not in" | null | undefined;
|
1852
1855
|
})[] | null | undefined;
|
1856
|
+
pointVisible?: boolean | null | undefined;
|
1853
1857
|
pointSize?: number | null | undefined;
|
1854
1858
|
pointColor?: string | null | undefined;
|
1855
1859
|
pointColorOpacity?: number | null | undefined;
|
@@ -1879,6 +1883,7 @@ export declare class Builder implements VSeedBuilder {
|
|
1879
1883
|
operator?: "in" | "not in" | null | undefined;
|
1880
1884
|
op?: "in" | "not in" | null | undefined;
|
1881
1885
|
})[] | null | undefined;
|
1886
|
+
lineVisible?: boolean | null | undefined;
|
1882
1887
|
lineSmooth?: boolean | null | undefined;
|
1883
1888
|
lineColor?: string | null | undefined;
|
1884
1889
|
lineColorOpacity?: number | null | undefined;
|
@@ -1906,6 +1911,7 @@ export declare class Builder implements VSeedBuilder {
|
|
1906
1911
|
operator?: "in" | "not in" | null | undefined;
|
1907
1912
|
op?: "in" | "not in" | null | undefined;
|
1908
1913
|
})[] | null | undefined;
|
1914
|
+
lineVisible?: boolean | null | undefined;
|
1909
1915
|
lineSmooth?: boolean | null | undefined;
|
1910
1916
|
lineColor?: string | null | undefined;
|
1911
1917
|
lineColorOpacity?: number | null | undefined;
|
@@ -1934,6 +1940,7 @@ export declare class Builder implements VSeedBuilder {
|
|
1934
1940
|
operator?: "in" | "not in" | null | undefined;
|
1935
1941
|
op?: "in" | "not in" | null | undefined;
|
1936
1942
|
})[] | null | undefined;
|
1943
|
+
areaVisible?: boolean | null | undefined;
|
1937
1944
|
areaColor?: string | null | undefined;
|
1938
1945
|
areaColorOpacity?: number | null | undefined;
|
1939
1946
|
} | {
|
@@ -1958,6 +1965,7 @@ export declare class Builder implements VSeedBuilder {
|
|
1958
1965
|
operator?: "in" | "not in" | null | undefined;
|
1959
1966
|
op?: "in" | "not in" | null | undefined;
|
1960
1967
|
})[] | null | undefined;
|
1968
|
+
areaVisible?: boolean | null | undefined;
|
1961
1969
|
areaColor?: string | null | undefined;
|
1962
1970
|
areaColorOpacity?: number | null | undefined;
|
1963
1971
|
}[] | null | undefined;
|
@@ -5647,6 +5655,7 @@ export declare class Builder implements VSeedBuilder {
|
|
5647
5655
|
operator?: "in" | "not in" | null | undefined;
|
5648
5656
|
op?: "in" | "not in" | null | undefined;
|
5649
5657
|
})[] | null | undefined;
|
5658
|
+
barVisible?: boolean | null | undefined;
|
5650
5659
|
barColor?: string | null | undefined;
|
5651
5660
|
barColorOpacity?: number | null | undefined;
|
5652
5661
|
barBorderColor?: string | null | undefined;
|
@@ -5675,6 +5684,7 @@ export declare class Builder implements VSeedBuilder {
|
|
5675
5684
|
operator?: "in" | "not in" | null | undefined;
|
5676
5685
|
op?: "in" | "not in" | null | undefined;
|
5677
5686
|
})[] | null | undefined;
|
5687
|
+
barVisible?: boolean | null | undefined;
|
5678
5688
|
barColor?: string | null | undefined;
|
5679
5689
|
barColorOpacity?: number | null | undefined;
|
5680
5690
|
barBorderColor?: string | null | undefined;
|
@@ -5704,6 +5714,7 @@ export declare class Builder implements VSeedBuilder {
|
|
5704
5714
|
operator?: "in" | "not in" | null | undefined;
|
5705
5715
|
op?: "in" | "not in" | null | undefined;
|
5706
5716
|
})[] | null | undefined;
|
5717
|
+
pointVisible?: boolean | null | undefined;
|
5707
5718
|
pointSize?: number | null | undefined;
|
5708
5719
|
pointColor?: string | null | undefined;
|
5709
5720
|
pointColorOpacity?: number | null | undefined;
|
@@ -5732,6 +5743,7 @@ export declare class Builder implements VSeedBuilder {
|
|
5732
5743
|
operator?: "in" | "not in" | null | undefined;
|
5733
5744
|
op?: "in" | "not in" | null | undefined;
|
5734
5745
|
})[] | null | undefined;
|
5746
|
+
pointVisible?: boolean | null | undefined;
|
5735
5747
|
pointSize?: number | null | undefined;
|
5736
5748
|
pointColor?: string | null | undefined;
|
5737
5749
|
pointColorOpacity?: number | null | undefined;
|
@@ -5761,6 +5773,7 @@ export declare class Builder implements VSeedBuilder {
|
|
5761
5773
|
operator?: "in" | "not in" | null | undefined;
|
5762
5774
|
op?: "in" | "not in" | null | undefined;
|
5763
5775
|
})[] | null | undefined;
|
5776
|
+
lineVisible?: boolean | null | undefined;
|
5764
5777
|
lineSmooth?: boolean | null | undefined;
|
5765
5778
|
lineColor?: string | null | undefined;
|
5766
5779
|
lineColorOpacity?: number | null | undefined;
|
@@ -5788,6 +5801,7 @@ export declare class Builder implements VSeedBuilder {
|
|
5788
5801
|
operator?: "in" | "not in" | null | undefined;
|
5789
5802
|
op?: "in" | "not in" | null | undefined;
|
5790
5803
|
})[] | null | undefined;
|
5804
|
+
lineVisible?: boolean | null | undefined;
|
5791
5805
|
lineSmooth?: boolean | null | undefined;
|
5792
5806
|
lineColor?: string | null | undefined;
|
5793
5807
|
lineColorOpacity?: number | null | undefined;
|
@@ -5816,6 +5830,7 @@ export declare class Builder implements VSeedBuilder {
|
|
5816
5830
|
operator?: "in" | "not in" | null | undefined;
|
5817
5831
|
op?: "in" | "not in" | null | undefined;
|
5818
5832
|
})[] | null | undefined;
|
5833
|
+
areaVisible?: boolean | null | undefined;
|
5819
5834
|
areaColor?: string | null | undefined;
|
5820
5835
|
areaColorOpacity?: number | null | undefined;
|
5821
5836
|
} | {
|
@@ -5840,6 +5855,7 @@ export declare class Builder implements VSeedBuilder {
|
|
5840
5855
|
operator?: "in" | "not in" | null | undefined;
|
5841
5856
|
op?: "in" | "not in" | null | undefined;
|
5842
5857
|
})[] | null | undefined;
|
5858
|
+
areaVisible?: boolean | null | undefined;
|
5843
5859
|
areaColor?: string | null | undefined;
|
5844
5860
|
areaColorOpacity?: number | null | undefined;
|
5845
5861
|
}[] | null | undefined;
|
package/dist/index.cjs
CHANGED
@@ -1484,6 +1484,7 @@ const foldMeasures = (dataset, measures, measureId = FoldMeasureId, measureName
|
|
1484
1484
|
const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, unfoldGroupName = UnfoldDimensionGroup, unfoldGroupId = UnfoldDimensionGroupId, foldMeasureId = FoldMeasureId, dimensionsSeparator = Separator)=>{
|
1485
1485
|
if (unfoldStartIndex < 0 || unfoldStartIndex >= dimensions.length) throw new Error('unfoldStartIndex is out of range');
|
1486
1486
|
const dimensionsToBeUnfolded = dimensions.slice(unfoldStartIndex);
|
1487
|
+
const dimensionsToBeRemain = dimensions.slice(0, unfoldStartIndex);
|
1487
1488
|
const unfoldInfo = {
|
1488
1489
|
groupName: unfoldGroupName,
|
1489
1490
|
groupId: unfoldGroupId,
|
@@ -1512,6 +1513,10 @@ const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, u
|
|
1512
1513
|
datum[unfoldGroupId] = colorId;
|
1513
1514
|
colorItems.push(colorId);
|
1514
1515
|
colorMap[colorId] = colorName;
|
1516
|
+
if (dimensionsToBeRemain.length > 0) for (const dim of dimensionsToBeRemain){
|
1517
|
+
const dimValue = datum[dim.id];
|
1518
|
+
if ('number' == typeof dimValue) datum[dim.id] = String(dimValue);
|
1519
|
+
}
|
1515
1520
|
}
|
1516
1521
|
unfoldInfo.colorItems = (0, external_remeda_namespaceObject.unique)(colorItems);
|
1517
1522
|
unfoldInfo.colorIdMap = colorMap;
|
@@ -2597,7 +2602,7 @@ const pointStyle_pointStyle = (spec, context)=>{
|
|
2597
2602
|
pointStyle
|
2598
2603
|
];
|
2599
2604
|
const customMap = pointStyles.reduce((result, style, index)=>{
|
2600
|
-
const { pointBorderColor, pointBorderStyle, pointBorderWidth = 1, pointColor, pointColorOpacity, pointSize } = style;
|
2605
|
+
const { pointBorderColor, pointBorderStyle, pointBorderWidth = 1, pointColor, pointColorOpacity, pointSize, pointVisible = true } = style;
|
2601
2606
|
const lineDash = 'dashed' === pointBorderStyle ? [
|
2602
2607
|
5,
|
2603
2608
|
2
|
@@ -2617,6 +2622,7 @@ const pointStyle_pointStyle = (spec, context)=>{
|
|
2617
2622
|
return false;
|
2618
2623
|
},
|
2619
2624
|
style: {
|
2625
|
+
visible: pointVisible,
|
2620
2626
|
size: pointSize,
|
2621
2627
|
fill: pointColor,
|
2622
2628
|
fillOpacity: pointColorOpacity,
|
@@ -2701,9 +2707,9 @@ const lineStyle_lineStyle = (spec, context)=>{
|
|
2701
2707
|
const group = encoding[0]?.group?.[0];
|
2702
2708
|
const lineGroups = (0, external_remeda_namespaceObject.groupBy)(dataset, (d)=>d[group ?? '']);
|
2703
2709
|
const customMap = lineStyles.reduce((result, style, index)=>{
|
2704
|
-
const { lineColor, lineColorOpacity, lineSmooth, lineStyle, lineWidth } = style;
|
2705
|
-
const dashSegment =
|
2706
|
-
const dashGap = lineWidth
|
2710
|
+
const { lineColor, lineColorOpacity, lineSmooth, lineStyle, lineWidth = 2, lineVisible = true } = style;
|
2711
|
+
const dashSegment = 2 * lineWidth;
|
2712
|
+
const dashGap = lineWidth;
|
2707
2713
|
const lineDash = 'dashed' === lineStyle ? [
|
2708
2714
|
dashSegment,
|
2709
2715
|
dashSegment
|
@@ -2725,6 +2731,7 @@ const lineStyle_lineStyle = (spec, context)=>{
|
|
2725
2731
|
return false;
|
2726
2732
|
},
|
2727
2733
|
style: {
|
2734
|
+
visible: lineVisible,
|
2728
2735
|
curveType: curveType,
|
2729
2736
|
strokeOpacity: lineColorOpacity,
|
2730
2737
|
stroke: lineColor,
|
@@ -3272,13 +3279,14 @@ const pivotIndicators_pivotIndicators = (chartPipeline)=>(spec, context)=>{
|
|
3272
3279
|
...spec
|
3273
3280
|
};
|
3274
3281
|
const { advancedVSeed } = context;
|
3275
|
-
const { measures, datasetReshapeInfo, encoding } = advancedVSeed;
|
3282
|
+
const { measures, datasetReshapeInfo, encoding, dataset } = advancedVSeed;
|
3276
3283
|
const colorItems = (0, external_remeda_namespaceObject.unique)(datasetReshapeInfo.flatMap((d)=>d.unfoldInfo.colorItems));
|
3277
3284
|
const indicators = datasetReshapeInfo.map((reshapeInfo, index)=>{
|
3278
3285
|
const measure = measures?.find((d)=>d.id === reshapeInfo.id);
|
3279
3286
|
const newEncoding = [
|
3280
3287
|
encoding[index]
|
3281
3288
|
];
|
3289
|
+
const newDataset = dataset[index];
|
3282
3290
|
const newDatasetReshapeInfo = [
|
3283
3291
|
{
|
3284
3292
|
...reshapeInfo,
|
@@ -3293,6 +3301,7 @@ const pivotIndicators_pivotIndicators = (chartPipeline)=>(spec, context)=>{
|
|
3293
3301
|
advancedVSeed: {
|
3294
3302
|
...advancedVSeed,
|
3295
3303
|
datasetReshapeInfo: newDatasetReshapeInfo,
|
3304
|
+
dataset: newDataset,
|
3296
3305
|
encoding: newEncoding
|
3297
3306
|
}
|
3298
3307
|
};
|
@@ -3401,7 +3410,8 @@ const pivotDiscreteLegend = (spec, context)=>{
|
|
3401
3410
|
...cur.unfoldInfo.colorIdMap
|
3402
3411
|
}), {});
|
3403
3412
|
const { legend, color } = baseConfig;
|
3404
|
-
const { colorScheme } = color;
|
3413
|
+
const { colorScheme, colorMapping } = color;
|
3414
|
+
const colorSpecified = createSpecifiedForColorMapping(colorMapping, colorIdMap, colorItems);
|
3405
3415
|
const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight = 400, maxSize = 1, border, shapeType = 'rectRound' } = legend || {};
|
3406
3416
|
const orient = [
|
3407
3417
|
'bottom',
|
@@ -3448,17 +3458,20 @@ const pivotDiscreteLegend = (spec, context)=>{
|
|
3448
3458
|
position: legendPosition,
|
3449
3459
|
maxCol: Math.max(1, maxSize),
|
3450
3460
|
maxRow: Math.max(1, maxSize),
|
3451
|
-
data: colorItems.map((d, index)=>
|
3461
|
+
data: colorItems.map((d, index)=>{
|
3462
|
+
const color = colorSpecified?.[d] ?? colorScheme?.[index % colorScheme.length];
|
3463
|
+
return {
|
3452
3464
|
label: d,
|
3453
3465
|
shape: {
|
3454
3466
|
outerBorder: border ? {
|
3455
|
-
stroke:
|
3467
|
+
stroke: color,
|
3456
3468
|
distance: 3,
|
3457
3469
|
lineWidth: 1
|
3458
3470
|
} : void 0,
|
3459
|
-
fill:
|
3471
|
+
fill: color
|
3460
3472
|
}
|
3461
|
-
}
|
3473
|
+
};
|
3474
|
+
}),
|
3462
3475
|
item: {
|
3463
3476
|
focus: true,
|
3464
3477
|
maxWidth: '30%',
|
@@ -3808,7 +3821,7 @@ const barStyle_barStyle = (spec, context)=>{
|
|
3808
3821
|
barStyle
|
3809
3822
|
];
|
3810
3823
|
const customMap = barStyles.reduce((result, style, index)=>{
|
3811
|
-
const { barBorderColor, barBorderStyle, barBorderWidth = 1, barColor, barColorOpacity, barRadius } = style;
|
3824
|
+
const { barBorderColor, barBorderStyle, barBorderWidth = 1, barColor, barColorOpacity, barRadius, barVisible = true } = style;
|
3812
3825
|
const lineDash = 'dashed' === barBorderStyle ? [
|
3813
3826
|
5,
|
3814
3827
|
2
|
@@ -3828,6 +3841,7 @@ const barStyle_barStyle = (spec, context)=>{
|
|
3828
3841
|
return false;
|
3829
3842
|
},
|
3830
3843
|
style: {
|
3844
|
+
visible: barVisible,
|
3831
3845
|
fill: barColor,
|
3832
3846
|
fillOpacity: barColorOpacity,
|
3833
3847
|
cornerRadius: barRadius,
|
@@ -4056,12 +4070,15 @@ const initColumnParallel = (spec, context)=>{
|
|
4056
4070
|
...spec
|
4057
4071
|
};
|
4058
4072
|
const { advancedVSeed } = context;
|
4059
|
-
const { encoding, datasetReshapeInfo } = advancedVSeed;
|
4073
|
+
const { encoding, datasetReshapeInfo, dimensions } = advancedVSeed;
|
4060
4074
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
4061
4075
|
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
4076
|
+
const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim)=>dim.id === dimensions[0].id);
|
4062
4077
|
result.type = 'bar';
|
4063
4078
|
result.direction = 'vertical';
|
4064
|
-
result.xField = [
|
4079
|
+
result.xField = sameDimensionsMode ? [
|
4080
|
+
encoding[0].x[0]
|
4081
|
+
] : [
|
4065
4082
|
encoding[0].x[0],
|
4066
4083
|
unfoldInfo.groupId
|
4067
4084
|
];
|
@@ -4621,12 +4638,15 @@ const initBarParallel = (spec, context)=>{
|
|
4621
4638
|
...spec
|
4622
4639
|
};
|
4623
4640
|
const { advancedVSeed } = context;
|
4624
|
-
const { encoding, datasetReshapeInfo } = advancedVSeed;
|
4641
|
+
const { encoding, datasetReshapeInfo, dimensions } = advancedVSeed;
|
4625
4642
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
4626
4643
|
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
4644
|
+
const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim)=>dim.id === dimensions[0].id);
|
4627
4645
|
result.type = 'bar';
|
4628
4646
|
result.direction = 'horizontal';
|
4629
|
-
result.yField = [
|
4647
|
+
result.yField = sameDimensionsMode ? [
|
4648
|
+
encoding[0].y[0]
|
4649
|
+
] : [
|
4630
4650
|
encoding[0].y[0],
|
4631
4651
|
unfoldInfo.groupId
|
4632
4652
|
];
|
@@ -4806,7 +4826,12 @@ const areaStyle_areaStyle = (spec, context)=>{
|
|
4806
4826
|
const { advancedVSeed } = context;
|
4807
4827
|
const { markStyle, encoding, dataset } = advancedVSeed;
|
4808
4828
|
const { areaStyle } = markStyle;
|
4809
|
-
if (!areaStyle) return
|
4829
|
+
if (!areaStyle) return {
|
4830
|
+
...spec,
|
4831
|
+
area: {
|
4832
|
+
visible: true
|
4833
|
+
}
|
4834
|
+
};
|
4810
4835
|
const result = {
|
4811
4836
|
...spec
|
4812
4837
|
};
|
@@ -4814,19 +4839,20 @@ const areaStyle_areaStyle = (spec, context)=>{
|
|
4814
4839
|
areaStyle
|
4815
4840
|
];
|
4816
4841
|
const group = encoding[0]?.group?.[0];
|
4817
|
-
const
|
4842
|
+
const areaGroups = (0, external_remeda_namespaceObject.groupBy)(dataset, (d)=>d[group ?? '']);
|
4818
4843
|
const customMap = areaStyles.reduce((result, style, index)=>{
|
4819
|
-
const { areaColor, areaColorOpacity } = style;
|
4844
|
+
const { areaColor, areaColorOpacity, areaVisible = true } = style;
|
4820
4845
|
return {
|
4821
4846
|
...result,
|
4822
4847
|
[`custom${index + 1}`]: {
|
4823
4848
|
level: index + 1,
|
4824
4849
|
filter: (datum)=>{
|
4825
|
-
const lineData =
|
4850
|
+
const lineData = areaGroups[datum[group ?? '']];
|
4826
4851
|
for (const d of lineData)if (selector_selector(d, style.selector)) return true;
|
4827
4852
|
return false;
|
4828
4853
|
},
|
4829
4854
|
style: {
|
4855
|
+
visible: areaVisible,
|
4830
4856
|
fill: areaColor,
|
4831
4857
|
fillOpacity: areaColorOpacity
|
4832
4858
|
}
|
@@ -4836,6 +4862,7 @@ const areaStyle_areaStyle = (spec, context)=>{
|
|
4836
4862
|
return {
|
4837
4863
|
...result,
|
4838
4864
|
area: {
|
4865
|
+
visible: true,
|
4839
4866
|
state: {
|
4840
4867
|
...customMap
|
4841
4868
|
}
|
@@ -6764,7 +6791,7 @@ const pivotDualAxis = [
|
|
6764
6791
|
pivotIndicators_pivotIndicatorsAsRow,
|
6765
6792
|
datasetPivot,
|
6766
6793
|
pivotIndicators_pivotIndicators([
|
6767
|
-
|
6794
|
+
series([
|
6768
6795
|
initDualAxisPrimary,
|
6769
6796
|
dualChartTypePrimary,
|
6770
6797
|
datasetPrimary,
|
@@ -7383,11 +7410,14 @@ const initRoseParallel = (spec, context)=>{
|
|
7383
7410
|
...spec
|
7384
7411
|
};
|
7385
7412
|
const { advancedVSeed } = context;
|
7386
|
-
const { encoding, datasetReshapeInfo, dataset } = advancedVSeed;
|
7413
|
+
const { encoding, datasetReshapeInfo, dataset, dimensions } = advancedVSeed;
|
7387
7414
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
7388
7415
|
if (!encoding[0].radius || !encoding[0].angle || !encoding[0].group) return result;
|
7416
|
+
const sameDimensionsMode = dimensions.length > 1 && dimensions.every((dim)=>dim.id === dimensions[0].id);
|
7389
7417
|
result.type = 'rose';
|
7390
|
-
result.categoryField = [
|
7418
|
+
result.categoryField = sameDimensionsMode ? [
|
7419
|
+
encoding[0].angle[0]
|
7420
|
+
] : [
|
7391
7421
|
encoding[0].angle[0],
|
7392
7422
|
unfoldInfo.groupId
|
7393
7423
|
];
|
@@ -9301,6 +9331,7 @@ const zBarStyle = external_zod_namespaceObject.z.object({
|
|
9301
9331
|
zSelector,
|
9302
9332
|
zSelectors
|
9303
9333
|
]).nullish(),
|
9334
|
+
barVisible: external_zod_namespaceObject.z.boolean().nullish(),
|
9304
9335
|
barColor: external_zod_namespaceObject.z.string().nullish(),
|
9305
9336
|
barColorOpacity: external_zod_namespaceObject.z.number().nullish(),
|
9306
9337
|
barBorderColor: external_zod_namespaceObject.z.string().nullish(),
|
@@ -9320,6 +9351,7 @@ const zPointStyle = external_zod_namespaceObject.z.object({
|
|
9320
9351
|
zSelector,
|
9321
9352
|
zSelectors
|
9322
9353
|
]).nullish(),
|
9354
|
+
pointVisible: external_zod_namespaceObject.z.boolean().nullish(),
|
9323
9355
|
pointSize: external_zod_namespaceObject.z.number().nullish(),
|
9324
9356
|
pointColor: external_zod_namespaceObject.z.string().nullish(),
|
9325
9357
|
pointColorOpacity: external_zod_namespaceObject.z.number().nullish(),
|
@@ -9338,6 +9370,7 @@ const zLineStyle = external_zod_namespaceObject.z.object({
|
|
9338
9370
|
zSelector,
|
9339
9371
|
zSelectors
|
9340
9372
|
]).nullish(),
|
9373
|
+
lineVisible: external_zod_namespaceObject.z.boolean().nullish(),
|
9341
9374
|
lineSmooth: external_zod_namespaceObject.z.boolean().nullish(),
|
9342
9375
|
lineColor: external_zod_namespaceObject.z.string().nullish(),
|
9343
9376
|
lineColorOpacity: external_zod_namespaceObject.z.number().nullish(),
|
@@ -9355,6 +9388,7 @@ const zAreaStyle = external_zod_namespaceObject.z.object({
|
|
9355
9388
|
zSelector,
|
9356
9389
|
zSelectors
|
9357
9390
|
]).nullish(),
|
9391
|
+
areaVisible: external_zod_namespaceObject.z.boolean().nullish(),
|
9358
9392
|
areaColor: external_zod_namespaceObject.z.string().nullish(),
|
9359
9393
|
areaColorOpacity: external_zod_namespaceObject.z.number().nullish()
|
9360
9394
|
});
|