@visactor/vseed 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +3 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js.map +1 -1
- package/dist/esm/builder/builder/buildSpec.js +2 -3
- package/dist/esm/builder/builder/buildSpec.js.map +1 -1
- package/dist/esm/dataReshape/foldMeasures.d.ts +1 -0
- package/dist/esm/dataReshape/foldMeasures.js +5 -1
- package/dist/esm/dataReshape/foldMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/area.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/area.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/bar.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/column.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/line.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/line.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/radar.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/radar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/rose.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/rose.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js +5 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js +6 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/config.d.ts +0 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/config.js +1 -2
- package/dist/esm/pipeline/advanced/chart/pipes/config/config.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js +32 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultDimensions.js +4 -3
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultDimensions.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js +12 -9
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/init/initAdvancedVSeed.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/init/initAdvancedVSeed.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.js +12 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteEncodingForMeasure.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/index.d.ts +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/index.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +2 -5
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +2 -4
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +2 -5
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js +2 -4
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultDimensions.js +13 -7
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultDimensions.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js +13 -9
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/init/initAdvancedVSeed.js +2 -0
- package/dist/esm/pipeline/advanced/table/pipes/init/initAdvancedVSeed.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/reshape/reshapePivotTable.js +2 -1
- package/dist/esm/pipeline/advanced/table/pipes/reshape/reshapePivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.js +11 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/title/defaultTitleText.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/title/defaultTitleText.js +14 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/title/defaultTitleText.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js +8 -11
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js +7 -10
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js +8 -10
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js +8 -10
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/size/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/size/index.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js +22 -0
- package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js.map +1 -0
- package/dist/esm/pipeline/utils/format/createFormatterByMeasure.js +4 -3
- package/dist/esm/pipeline/utils/format/createFormatterByMeasure.js.map +1 -1
- package/dist/esm/pipeline/utils/format/createNumFormatter.js +4 -1
- package/dist/esm/pipeline/utils/format/createNumFormatter.js.map +1 -1
- package/dist/esm/pipeline/utils/index.d.ts +1 -0
- package/dist/esm/pipeline/utils/index.js +1 -0
- package/dist/esm/pipeline/utils/valid/checkVSeed.d.ts +2 -0
- package/dist/esm/pipeline/utils/valid/checkVSeed.js +11 -0
- package/dist/esm/pipeline/utils/valid/checkVSeed.js.map +1 -0
- package/dist/esm/pipeline/utils/valid/index.d.ts +1 -0
- package/dist/esm/pipeline/utils/valid/index.js +2 -0
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +10 -40
- package/dist/esm/types/chartType/scatter/scatter.d.ts +14 -0
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +12 -40
- package/dist/esm/types/chartType/scatter/zScatter.js +2 -0
- package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
- package/dist/esm/types/properties/config/axes/linearAxis.d.ts +3 -3
- package/dist/esm/types/properties/config/label/label.d.ts +2 -2
- package/dist/esm/types/properties/measures/dualMeasures.d.ts +2 -2
- package/dist/esm/types/properties/measures/scatterMeasures.d.ts +2 -2
- package/dist/esm/types/properties/measures/zDualMeasures.d.ts +20 -80
- package/dist/esm/types/properties/measures/zDualMeasures.js +7 -1
- package/dist/esm/types/properties/measures/zDualMeasures.js.map +1 -1
- package/dist/esm/types/properties/measures/zScatterMeasures.d.ts +20 -80
- package/dist/esm/types/properties/measures/zScatterMeasures.js +8 -2
- package/dist/esm/types/properties/measures/zScatterMeasures.js.map +1 -1
- package/dist/esm/types/zVseed.d.ts +22 -80
- package/dist/umd/index.js +316 -183
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteTooltipAndLabelMeasure.d.ts +0 -2
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteTooltipAndLabelMeasure.js +0 -12
- package/dist/esm/pipeline/advanced/chart/pipes/measures/deleteTooltipAndLabelMeasure.js.map +0 -1
package/dist/umd/index.js
CHANGED
@@ -148,8 +148,8 @@
|
|
148
148
|
registerHeatmap: ()=>registerHeatmap,
|
149
149
|
registerBarPercent: ()=>registerBarPercent,
|
150
150
|
ColorIdEncoding: ()=>ColorIdEncoding,
|
151
|
+
checkVSeed: ()=>checkVSeed,
|
151
152
|
roseSpecPipeline: ()=>roseSpecPipeline,
|
152
|
-
zCrosshairLine: ()=>zCrosshairLine,
|
153
153
|
registerLightTheme: ()=>registerLightTheme,
|
154
154
|
roseAdvancedPipeline: ()=>roseAdvancedPipeline,
|
155
155
|
zBarParallel: ()=>zBarParallel,
|
@@ -175,9 +175,9 @@
|
|
175
175
|
isVChart: ()=>isVChart,
|
176
176
|
radarSpecPipeline: ()=>radarSpecPipeline,
|
177
177
|
Builder: ()=>Builder,
|
178
|
+
zCrosshairLine: ()=>zCrosshairLine,
|
178
179
|
zMeasureTree: ()=>zMeasureTree,
|
179
180
|
zPieConfig: ()=>zPieConfig,
|
180
|
-
zPivotTable: ()=>zPivotTable,
|
181
181
|
registerLine: ()=>registerLine,
|
182
182
|
registerCustomTheme: ()=>registerCustomTheme,
|
183
183
|
zColor: ()=>zColor,
|
@@ -196,18 +196,19 @@
|
|
196
196
|
zAreaConfig: ()=>zAreaConfig,
|
197
197
|
zMeasures: ()=>zMeasures,
|
198
198
|
isVTable: ()=>isVTable,
|
199
|
+
zPivotTable: ()=>zPivotTable,
|
199
200
|
zRadar: ()=>zRadar,
|
200
|
-
zRadarConfig: ()=>zRadarConfig,
|
201
201
|
zLine: ()=>zLine,
|
202
202
|
columnSpecPipeline: ()=>columnSpecPipeline,
|
203
203
|
zFoldInfo: ()=>zFoldInfo,
|
204
204
|
zDatasetReshapeInfo: ()=>zDatasetReshapeInfo,
|
205
205
|
zLinearColor: ()=>zLinearColor,
|
206
|
-
|
206
|
+
zRadarConfig: ()=>zRadarConfig,
|
207
207
|
zAreaStyle: ()=>zAreaStyle,
|
208
208
|
ORIGINAL_DATA: ()=>ORIGINAL_DATA,
|
209
|
-
|
209
|
+
zStackCornerRadius: ()=>zStackCornerRadius,
|
210
210
|
zAnnotationArea: ()=>zAnnotationArea,
|
211
|
+
zUnfoldInfo: ()=>zUnfoldInfo,
|
211
212
|
DetailEncoding: ()=>DetailEncoding,
|
212
213
|
zRose: ()=>zRose,
|
213
214
|
columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
|
@@ -337,7 +338,7 @@
|
|
337
338
|
return advancedVSeed;
|
338
339
|
} catch (e) {
|
339
340
|
console.error(e);
|
340
|
-
throw new Error(
|
341
|
+
throw new Error(`buildAdvanced error: ${e.message}.\ndetails info in console`);
|
341
342
|
} finally{
|
342
343
|
const end = 'undefined' != typeof performance ? performance.now() : Date.now();
|
343
344
|
builder.performance['buildAdvanced'] = `${(end - start).toFixed(4)}ms`;
|
@@ -346,9 +347,8 @@
|
|
346
347
|
const buildSpec = (builder, advancedVSeed)=>{
|
347
348
|
const start = 'undefined' != typeof performance ? performance.now() : Date.now();
|
348
349
|
const { chartType } = builder.vseed;
|
349
|
-
if (!chartType) throw new Error('chartType is nil in buildSpec');
|
350
350
|
const pipeline = Builder.getSpecPipeline(chartType);
|
351
|
-
if (!pipeline) throw new Error(`no spec pipeline for chartType ${chartType}`);
|
351
|
+
if (!pipeline) throw new Error(`please invoke registerAll or register ${chartType} before build, no spec pipeline for chartType ${chartType}`);
|
352
352
|
const context = {
|
353
353
|
vseed: builder.vseed,
|
354
354
|
advancedVSeed
|
@@ -360,7 +360,7 @@
|
|
360
360
|
return spec;
|
361
361
|
} catch (e) {
|
362
362
|
console.error(e);
|
363
|
-
throw new Error(
|
363
|
+
throw new Error(`buildSpec error: ${e.message}.\ndetails info in console`);
|
364
364
|
} finally{
|
365
365
|
const end = 'undefined' != typeof performance ? performance.now() : Date.now();
|
366
366
|
builder.performance['buildSpec'] = `${(end - start).toFixed(4)}ms`;
|
@@ -638,27 +638,79 @@
|
|
638
638
|
static _customSpecPipe = {};
|
639
639
|
static _themeMap = {};
|
640
640
|
}
|
641
|
+
function chunk_VCYTMP4D_n(e) {
|
642
|
+
return void 0 === e ? !0 : "string" == typeof e || Array.isArray(e) ? 0 === e.length : 0 === Object.keys(e).length;
|
643
|
+
}
|
644
|
+
const checkVSeed = (vseed)=>{
|
645
|
+
const { chartType, dataset, dimensions, measures } = vseed;
|
646
|
+
if (!chartType) throw new Error('chartType is required');
|
647
|
+
if (!dataset || chunk_VCYTMP4D_n(dataset)) throw new Error('dataset is required, and must be an array');
|
648
|
+
if (dimensions && !Array.isArray(dimensions)) throw new Error('dimensions must be an array');
|
649
|
+
if (measures && !Array.isArray(measures)) throw new Error('measures must be an array');
|
650
|
+
};
|
641
651
|
const initAdvancedVSeed = (advancedVSeed, context)=>{
|
642
652
|
const { vseed } = context;
|
643
653
|
const { chartType, locale } = vseed;
|
654
|
+
checkVSeed(vseed);
|
644
655
|
return {
|
645
656
|
...advancedVSeed,
|
646
657
|
chartType,
|
647
658
|
locale: locale || 'zh-CN'
|
648
659
|
};
|
649
660
|
};
|
661
|
+
function chunk_D6FCK2GA_u(o, n, a) {
|
662
|
+
let t = (r)=>o(r, ...n);
|
663
|
+
return void 0 === a ? t : Object.assign(t, {
|
664
|
+
lazy: a,
|
665
|
+
lazyArgs: n
|
666
|
+
});
|
667
|
+
}
|
668
|
+
function chunk_WIMGWYZL_u(r, n, o) {
|
669
|
+
let a = r.length - n.length;
|
670
|
+
if (0 === a) return r(...n);
|
671
|
+
if (1 === a) return chunk_D6FCK2GA_u(r, n, o);
|
672
|
+
throw new Error("Wrong number of arguments");
|
673
|
+
}
|
674
|
+
function chunk_BCBB46UE_d(...n) {
|
675
|
+
return chunk_WIMGWYZL_u(chunk_BCBB46UE_u, n);
|
676
|
+
}
|
677
|
+
function chunk_BCBB46UE_u(n, o = [], t = []) {
|
678
|
+
if ("function" == typeof n) return n;
|
679
|
+
if ("object" != typeof n || null === n) return structuredClone(n);
|
680
|
+
let r = Object.getPrototypeOf(n);
|
681
|
+
if (!Array.isArray(n) && null !== r && r !== Object.prototype) return structuredClone(n);
|
682
|
+
let e = o.indexOf(n);
|
683
|
+
return -1 !== e ? t[e] : (o.push(n), Array.isArray(n) ? chunk_BCBB46UE_p(n, o, t) : chunk_BCBB46UE_i(n, o, t));
|
684
|
+
}
|
685
|
+
function chunk_BCBB46UE_i(n, o, t) {
|
686
|
+
let r = {};
|
687
|
+
t.push(r);
|
688
|
+
for (let [e, c] of Object.entries(n))r[e] = chunk_BCBB46UE_u(c, o, t);
|
689
|
+
return r;
|
690
|
+
}
|
691
|
+
function chunk_BCBB46UE_p(n, o, t) {
|
692
|
+
let r = [];
|
693
|
+
t.push(r);
|
694
|
+
for (let [e, c] of n.entries())r[e] = chunk_BCBB46UE_u(c, o, t);
|
695
|
+
return r;
|
696
|
+
}
|
697
|
+
const isMeasure = (measure)=>!('children' in measure);
|
698
|
+
const isMeasureGroup = (measure)=>'children' in measure;
|
699
|
+
const isMeasures = (measures)=>measures.every(isMeasure);
|
650
700
|
const defaultMeasures_defaultMeasures = (advancedVSeed, context)=>{
|
651
701
|
const { vseed } = context;
|
652
702
|
const { measures, dataset } = vseed;
|
653
|
-
if (measures && measures.length > 0)
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
703
|
+
if (measures && measures.length > 0) {
|
704
|
+
const clonedMeasures = chunk_BCBB46UE_d(measures);
|
705
|
+
preorderTraverse(clonedMeasures, (node)=>{
|
706
|
+
if (isMeasure(node)) node.alias = node.alias || node.id;
|
707
|
+
return false;
|
708
|
+
});
|
709
|
+
return {
|
710
|
+
...advancedVSeed,
|
711
|
+
measures: clonedMeasures
|
712
|
+
};
|
713
|
+
}
|
662
714
|
const top100dataset = dataset.slice(0, 100);
|
663
715
|
const sample = top100dataset.reduce((prev, cur)=>({
|
664
716
|
...prev,
|
@@ -677,6 +729,8 @@
|
|
677
729
|
measures: defaultMeasures
|
678
730
|
};
|
679
731
|
};
|
732
|
+
const isDimension = (dimension)=>!('children' in dimension);
|
733
|
+
const isDimensionGroup = (dimension)=>'children' in dimension;
|
680
734
|
const findMeasureById = (measures = [], id)=>{
|
681
735
|
if (!measures) return;
|
682
736
|
let result;
|
@@ -718,12 +772,17 @@
|
|
718
772
|
};
|
719
773
|
const { vseed } = context;
|
720
774
|
const { dimensions, dataset } = vseed;
|
721
|
-
if (dimensions && dimensions.length > 0)
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
775
|
+
if (dimensions && dimensions.length > 0) {
|
776
|
+
const clonedDimensions = chunk_BCBB46UE_d(dimensions);
|
777
|
+
preorderTraverse(clonedDimensions, (node)=>{
|
778
|
+
if (isDimension(node)) node.alias = node.alias || node.id;
|
779
|
+
return false;
|
780
|
+
});
|
781
|
+
return {
|
782
|
+
...advancedVSeed,
|
783
|
+
dimensions: clonedDimensions
|
784
|
+
};
|
785
|
+
}
|
727
786
|
const measures = findAllMeasures(advancedVSeed.measures);
|
728
787
|
const top100dataset = dataset.slice(0, 100);
|
729
788
|
const sample = top100dataset.reduce((prev, cur)=>({
|
@@ -751,19 +810,6 @@
|
|
751
810
|
dataset
|
752
811
|
};
|
753
812
|
};
|
754
|
-
function chunk_D6FCK2GA_u(o, n, a) {
|
755
|
-
let t = (r)=>o(r, ...n);
|
756
|
-
return void 0 === a ? t : Object.assign(t, {
|
757
|
-
lazy: a,
|
758
|
-
lazyArgs: n
|
759
|
-
});
|
760
|
-
}
|
761
|
-
function chunk_WIMGWYZL_u(r, n, o) {
|
762
|
-
let a = r.length - n.length;
|
763
|
-
if (0 === a) return r(...n);
|
764
|
-
if (1 === a) return chunk_D6FCK2GA_u(r, n, o);
|
765
|
-
throw new Error("Wrong number of arguments");
|
766
|
-
}
|
767
813
|
function chunk_2T7K3PFL_i(...e) {
|
768
814
|
return chunk_WIMGWYZL_u(chunk_2T7K3PFL_o, e);
|
769
815
|
}
|
@@ -821,29 +867,6 @@
|
|
821
867
|
}
|
822
868
|
return r;
|
823
869
|
}
|
824
|
-
function chunk_BCBB46UE_d(...n) {
|
825
|
-
return chunk_WIMGWYZL_u(chunk_BCBB46UE_u, n);
|
826
|
-
}
|
827
|
-
function chunk_BCBB46UE_u(n, o = [], t = []) {
|
828
|
-
if ("function" == typeof n) return n;
|
829
|
-
if ("object" != typeof n || null === n) return structuredClone(n);
|
830
|
-
let r = Object.getPrototypeOf(n);
|
831
|
-
if (!Array.isArray(n) && null !== r && r !== Object.prototype) return structuredClone(n);
|
832
|
-
let e = o.indexOf(n);
|
833
|
-
return -1 !== e ? t[e] : (o.push(n), Array.isArray(n) ? chunk_BCBB46UE_p(n, o, t) : chunk_BCBB46UE_i(n, o, t));
|
834
|
-
}
|
835
|
-
function chunk_BCBB46UE_i(n, o, t) {
|
836
|
-
let r = {};
|
837
|
-
t.push(r);
|
838
|
-
for (let [e, c] of Object.entries(n))r[e] = chunk_BCBB46UE_u(c, o, t);
|
839
|
-
return r;
|
840
|
-
}
|
841
|
-
function chunk_BCBB46UE_p(n, o, t) {
|
842
|
-
let r = [];
|
843
|
-
t.push(r);
|
844
|
-
for (let [e, c] of n.entries())r[e] = chunk_BCBB46UE_u(c, o, t);
|
845
|
-
return r;
|
846
|
-
}
|
847
870
|
function chunk_SFZGYJFI_t(r) {
|
848
871
|
return "string" == typeof r;
|
849
872
|
}
|
@@ -931,9 +954,6 @@
|
|
931
954
|
}
|
932
955
|
};
|
933
956
|
};
|
934
|
-
const isMeasure = (measure)=>!('children' in measure);
|
935
|
-
const isMeasureGroup = (measure)=>'children' in measure;
|
936
|
-
const isMeasures = (measures)=>measures.every(isMeasure);
|
937
957
|
const dimensionTreeToColumns = (spec, context)=>{
|
938
958
|
const { advancedVSeed } = context;
|
939
959
|
const dimensions = advancedVSeed.dimensions;
|
@@ -1002,7 +1022,10 @@
|
|
1002
1022
|
numFormatterOptions.maximumSignificantDigits = significantDigits;
|
1003
1023
|
}
|
1004
1024
|
}
|
1005
|
-
const numFormatter = new Intl.NumberFormat(locale,
|
1025
|
+
const numFormatter = new Intl.NumberFormat(locale, {
|
1026
|
+
...numFormatterOptions,
|
1027
|
+
useGrouping: thousandSeparator
|
1028
|
+
});
|
1006
1029
|
return (value)=>{
|
1007
1030
|
let num = Number(value);
|
1008
1031
|
let typeSymbol = '';
|
@@ -1040,15 +1063,13 @@
|
|
1040
1063
|
};
|
1041
1064
|
const createFormatter = (format, locale)=>createNumFormatter(format, locale);
|
1042
1065
|
const autoFormatter = (value, locale = intl.getLocale())=>autoNumFormatter(value, locale);
|
1043
|
-
function chunk_VCYTMP4D_n(e) {
|
1044
|
-
return void 0 === e ? !0 : "string" == typeof e || Array.isArray(e) ? 0 === e.length : 0 === Object.keys(e).length;
|
1045
|
-
}
|
1046
1066
|
const createFormatterByMeasure = (measure)=>{
|
1047
1067
|
if (!measure) return (v)=>String(v);
|
1048
|
-
const { numFormat, format, autoFormat
|
1068
|
+
const { numFormat, format, autoFormat } = measure;
|
1049
1069
|
const formatterFormat = numFormat || format || {};
|
1070
|
+
if (true === autoFormat) return autoFormatter;
|
1071
|
+
if (chunk_JK3VNB42_n(autoFormat) && chunk_VCYTMP4D_n(formatterFormat)) return autoFormatter;
|
1050
1072
|
if (!chunk_VCYTMP4D_n(formatterFormat)) return createFormatter(formatterFormat);
|
1051
|
-
if (autoFormat) return autoFormatter;
|
1052
1073
|
return (v)=>String(v);
|
1053
1074
|
};
|
1054
1075
|
const measureTreeToColumns = (spec, context)=>{
|
@@ -1337,7 +1358,7 @@
|
|
1337
1358
|
return o;
|
1338
1359
|
}
|
1339
1360
|
const foldMeasures = (dataset, measures, options)=>{
|
1340
|
-
const { measureId, measureName, measureValue, colorMeasureId } = options || {};
|
1361
|
+
const { measureId, measureName, measureValue, colorMeasureId, allowEmptyFold = true } = options || {};
|
1341
1362
|
const foldInfo = {
|
1342
1363
|
measureId,
|
1343
1364
|
measureName,
|
@@ -1352,6 +1373,10 @@
|
|
1352
1373
|
},
|
1353
1374
|
foldMap: {}
|
1354
1375
|
};
|
1376
|
+
if (!allowEmptyFold && 0 === measures.length) return {
|
1377
|
+
dataset,
|
1378
|
+
foldInfo
|
1379
|
+
};
|
1355
1380
|
const result = new Array(dataset.length * measures.length);
|
1356
1381
|
let index = 0;
|
1357
1382
|
const ids = measures.map((d)=>d.id);
|
@@ -1397,7 +1422,8 @@
|
|
1397
1422
|
const { dataset: newDatasets, foldInfo } = foldMeasures(dataset, findAllMeasures(measures), {
|
1398
1423
|
measureId: FoldMeasureId,
|
1399
1424
|
measureName: FoldMeasureName,
|
1400
|
-
measureValue: FoldMeasureValue
|
1425
|
+
measureValue: FoldMeasureValue,
|
1426
|
+
allowEmptyFold: false
|
1401
1427
|
});
|
1402
1428
|
const datasetReshapeInfo = [
|
1403
1429
|
{
|
@@ -1691,6 +1717,7 @@
|
|
1691
1717
|
const initAdvancedVSeed_initAdvancedVSeed = (advancedVSeed, context)=>{
|
1692
1718
|
const { vseed } = context;
|
1693
1719
|
const { chartType, locale } = vseed;
|
1720
|
+
checkVSeed(vseed);
|
1694
1721
|
return {
|
1695
1722
|
...advancedVSeed,
|
1696
1723
|
chartType,
|
@@ -1700,15 +1727,17 @@
|
|
1700
1727
|
const default_defaultMeasures_defaultMeasures = (advancedVSeed, context)=>{
|
1701
1728
|
const { vseed } = context;
|
1702
1729
|
const { measures, dataset } = vseed;
|
1703
|
-
if (measures && measures.length > 0)
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1730
|
+
if (measures && measures.length > 0) {
|
1731
|
+
const clonedMeasures = chunk_BCBB46UE_d(measures);
|
1732
|
+
preorderTraverse(clonedMeasures, (node)=>{
|
1733
|
+
if (isMeasure(node)) node.alias = node.alias || node.id;
|
1734
|
+
return false;
|
1735
|
+
});
|
1736
|
+
return {
|
1737
|
+
...advancedVSeed,
|
1738
|
+
measures: clonedMeasures
|
1739
|
+
};
|
1740
|
+
}
|
1712
1741
|
const top100dataset = dataset.slice(0, 100);
|
1713
1742
|
const sample = top100dataset.reduce((prev, cur)=>({
|
1714
1743
|
...prev,
|
@@ -1735,10 +1764,11 @@
|
|
1735
1764
|
const { dimensions, dataset } = vseed;
|
1736
1765
|
if (dimensions && dimensions.length > 0) return {
|
1737
1766
|
...result,
|
1738
|
-
dimensions: chunk_BCBB46UE_d(dimensions)
|
1767
|
+
dimensions: chunk_BCBB46UE_d(dimensions.map((dim)=>({
|
1768
|
+
...dim,
|
1769
|
+
alias: dim.alias || dim.id
|
1770
|
+
})))
|
1739
1771
|
};
|
1740
|
-
if (!dataset) throw new Error('dataset is required');
|
1741
|
-
if (0 === dataset.length) return result;
|
1742
1772
|
const measures = findAllMeasures(advancedVSeed.measures);
|
1743
1773
|
const top100dataset = dataset.slice(0, 100);
|
1744
1774
|
const sample = top100dataset.reduce((prev, cur)=>({
|
@@ -1936,16 +1966,14 @@
|
|
1936
1966
|
}
|
1937
1967
|
return measureTree;
|
1938
1968
|
};
|
1939
|
-
const
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1969
|
+
const deleteEncodingForMeasure = (encodingKeys)=>(advancedVSeed)=>{
|
1970
|
+
const deleteBy = (measure)=>encodingKeys.includes(measure.encoding);
|
1971
|
+
const measureTree = deleteMeasureTreeByCallback(advancedVSeed.measures, deleteBy);
|
1972
|
+
return {
|
1973
|
+
...advancedVSeed,
|
1974
|
+
measures: measureTree
|
1975
|
+
};
|
1945
1976
|
};
|
1946
|
-
};
|
1947
|
-
const isDimension = (dimension)=>!('children' in dimension);
|
1948
|
-
const isDimensionGroup = (dimension)=>'children' in dimension;
|
1949
1977
|
const deleteDimensionTreeByCallback = (dimensionTree, callback)=>{
|
1950
1978
|
if (!dimensionTree) return dimensionTree;
|
1951
1979
|
const stack = [
|
@@ -2101,12 +2129,9 @@
|
|
2101
2129
|
};
|
2102
2130
|
const { vseed } = context;
|
2103
2131
|
const { dataset, chartType } = vseed;
|
2104
|
-
const { dimensions, measures, encoding } = advancedVSeed;
|
2105
|
-
if (!measures || !dimensions || !dataset || !encoding) return result;
|
2106
|
-
if (0 === measures.length) throw new Error('measures can not be empty');
|
2107
|
-
const hasEncoding = (vseed.dimensions || []).some((item)=>item.encoding);
|
2132
|
+
const { dimensions = [], measures = [], encoding } = advancedVSeed;
|
2108
2133
|
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), T(findAllMeasures(measures), (item)=>item.id), encoding, {
|
2109
|
-
colorItemAsId:
|
2134
|
+
colorItemAsId: false,
|
2110
2135
|
colorMeasureId: getColorMeasureId(advancedVSeed)
|
2111
2136
|
});
|
2112
2137
|
return {
|
@@ -2130,14 +2155,11 @@
|
|
2130
2155
|
};
|
2131
2156
|
const { vseed } = context;
|
2132
2157
|
const { dataset } = vseed;
|
2133
|
-
const { dimensions, measures, encoding } = advancedVSeed;
|
2134
|
-
if (!measures || !dimensions || !dataset || !encoding) return result;
|
2135
|
-
if (0 === measures.length) throw new Error('measures can not be empty');
|
2158
|
+
const { dimensions = [], measures = [], encoding } = advancedVSeed;
|
2136
2159
|
const measureGroups = [];
|
2137
2160
|
if (measures) measures.forEach((measure)=>{
|
2138
2161
|
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
2139
2162
|
});
|
2140
|
-
const hasEncoding = (vseed.dimensions || []).some((item)=>item.encoding);
|
2141
2163
|
const datasets = [];
|
2142
2164
|
const datasetReshapeInfo = [];
|
2143
2165
|
measureGroups.forEach((measureGroup, index)=>{
|
@@ -2145,7 +2167,7 @@
|
|
2145
2167
|
if (!measures) return;
|
2146
2168
|
const groupId = measureGroup.id;
|
2147
2169
|
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), T(measures, (item)=>item.id), encoding, {
|
2148
|
-
colorItemAsId:
|
2170
|
+
colorItemAsId: false,
|
2149
2171
|
foldMeasureValue: `${FoldMeasureValue}${groupId}`,
|
2150
2172
|
colorMeasureId: getColorMeasureId(advancedVSeed)
|
2151
2173
|
});
|
@@ -2341,7 +2363,6 @@
|
|
2341
2363
|
};
|
2342
2364
|
const areaConfig = lineConfig;
|
2343
2365
|
const areaPercentConfig = lineConfig;
|
2344
|
-
const scatterConfig = lineConfig;
|
2345
2366
|
const barConfig = columnConfig;
|
2346
2367
|
const barParallelConfig = columnConfig;
|
2347
2368
|
const barPercentConfig = columnConfig;
|
@@ -2391,7 +2412,10 @@
|
|
2391
2412
|
], [
|
2392
2413
|
encodingForLine,
|
2393
2414
|
buildMeasures,
|
2394
|
-
|
2415
|
+
deleteEncodingForMeasure([
|
2416
|
+
'tooltip',
|
2417
|
+
'label'
|
2418
|
+
]),
|
2395
2419
|
deleteTooltipAndLabelDimension
|
2396
2420
|
]),
|
2397
2421
|
pivotAdapter([
|
@@ -2574,12 +2598,23 @@
|
|
2574
2598
|
result.progressiveThreshold = 8000;
|
2575
2599
|
return result;
|
2576
2600
|
};
|
2601
|
+
const defaultTitleText = (measures, dimensions, idList = [])=>{
|
2602
|
+
const allMeasures = findAllMeasures(measures);
|
2603
|
+
return idList.map((id)=>{
|
2604
|
+
const alias = [
|
2605
|
+
...allMeasures,
|
2606
|
+
...dimensions
|
2607
|
+
].find((f)=>f.id === id)?.alias || '';
|
2608
|
+
return alias;
|
2609
|
+
}).join(' & ');
|
2610
|
+
};
|
2577
2611
|
const xBand = (spec, context)=>{
|
2578
2612
|
const result = {
|
2579
2613
|
...spec
|
2580
2614
|
};
|
2581
2615
|
const { advancedVSeed, vseed } = context;
|
2582
2616
|
const { chartType } = vseed;
|
2617
|
+
const { measures, dimensions, encoding } = advancedVSeed;
|
2583
2618
|
const config = advancedVSeed.config?.[chartType]?.xAxis;
|
2584
2619
|
if (!result.axes) result.axes = [];
|
2585
2620
|
if (!config) {
|
@@ -2624,7 +2659,7 @@
|
|
2624
2659
|
},
|
2625
2660
|
title: {
|
2626
2661
|
visible: title?.visible,
|
2627
|
-
text: title?.titleText,
|
2662
|
+
text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x),
|
2628
2663
|
style: {
|
2629
2664
|
fill: title?.titleColor,
|
2630
2665
|
fontSize: title?.titleFontSize,
|
@@ -2668,13 +2703,19 @@
|
|
2668
2703
|
];
|
2669
2704
|
return result;
|
2670
2705
|
};
|
2706
|
+
const createLinearFormat = (value, autoFormat, numFormat, formatter)=>{
|
2707
|
+
if (chunk_JK3VNB42_n(autoFormat) && chunk_VCYTMP4D_n(numFormat)) return autoFormatter(value);
|
2708
|
+
if (true === autoFormat) return autoFormatter(value);
|
2709
|
+
if (!chunk_VCYTMP4D_n(numFormat)) return formatter(value);
|
2710
|
+
return String(value);
|
2711
|
+
};
|
2671
2712
|
const yLinear = (spec, context)=>{
|
2672
2713
|
const result = {
|
2673
2714
|
...spec
|
2674
2715
|
};
|
2675
2716
|
const { advancedVSeed, vseed } = context;
|
2676
2717
|
const { chartType } = vseed;
|
2677
|
-
const {
|
2718
|
+
const { measures, dimensions, encoding } = advancedVSeed;
|
2678
2719
|
const config = advancedVSeed.config?.[chartType]?.yAxis;
|
2679
2720
|
if (!result.axes) result.axes = [];
|
2680
2721
|
if (!config) {
|
@@ -2688,7 +2729,7 @@
|
|
2688
2729
|
];
|
2689
2730
|
return result;
|
2690
2731
|
}
|
2691
|
-
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat
|
2732
|
+
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat, numFormat = {} } = config;
|
2692
2733
|
const formatter = createNumFormatter(numFormat);
|
2693
2734
|
const linearAxis = {
|
2694
2735
|
visible,
|
@@ -2702,11 +2743,7 @@
|
|
2702
2743
|
min,
|
2703
2744
|
label: {
|
2704
2745
|
visible: label?.visible,
|
2705
|
-
formatMethod: (value)=>
|
2706
|
-
if (!chunk_VCYTMP4D_n(numFormat)) return formatter(value);
|
2707
|
-
if (autoFormat) return autoFormatter(value, locale);
|
2708
|
-
return value;
|
2709
|
-
},
|
2746
|
+
formatMethod: (value)=>createLinearFormat(value, autoFormat, numFormat, formatter),
|
2710
2747
|
style: {
|
2711
2748
|
fill: label?.labelColor,
|
2712
2749
|
angle: label?.labelAngle,
|
@@ -2716,7 +2753,7 @@
|
|
2716
2753
|
},
|
2717
2754
|
title: {
|
2718
2755
|
visible: title?.visible,
|
2719
|
-
text: title?.titleText,
|
2756
|
+
text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y),
|
2720
2757
|
style: {
|
2721
2758
|
fill: title?.titleColor,
|
2722
2759
|
fontSize: title?.titleFontSize,
|
@@ -3295,7 +3332,7 @@
|
|
3295
3332
|
]);
|
3296
3333
|
return result;
|
3297
3334
|
};
|
3298
|
-
const generateMeasureValue = (value, measure, labelAutoFormat
|
3335
|
+
const generateMeasureValue = (value, measure, labelAutoFormat, numFormat = {})=>{
|
3299
3336
|
if (!measure) return value;
|
3300
3337
|
const format = chunk_5S4PYKVY_t(numFormat, measure.numFormat || measure.format);
|
3301
3338
|
const mergedMeasure = {
|
@@ -3314,7 +3351,7 @@
|
|
3314
3351
|
return formatter(percentValue);
|
3315
3352
|
};
|
3316
3353
|
const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedMeasures, encoding, foldInfoList)=>{
|
3317
|
-
const { enable, wrap, showValue, showValuePercent, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat
|
3354
|
+
const { enable, wrap, showValue, showValuePercent, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
|
3318
3355
|
const labelDims = T((vseedDimensions || []).filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
|
3319
3356
|
const labelMeas = T((vseedMeasures || []).filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
|
3320
3357
|
const percentFormat = chunk_5S4PYKVY_t(numFormat, {
|
@@ -4459,7 +4496,10 @@
|
|
4459
4496
|
], [
|
4460
4497
|
encodingForColumn,
|
4461
4498
|
buildMeasures,
|
4462
|
-
|
4499
|
+
deleteEncodingForMeasure([
|
4500
|
+
'tooltip',
|
4501
|
+
'label'
|
4502
|
+
]),
|
4463
4503
|
deleteTooltipAndLabelDimension
|
4464
4504
|
]),
|
4465
4505
|
pivotAdapter([
|
@@ -4830,7 +4870,10 @@
|
|
4830
4870
|
], [
|
4831
4871
|
encodingForColumn,
|
4832
4872
|
buildMeasures,
|
4833
|
-
|
4873
|
+
deleteEncodingForMeasure([
|
4874
|
+
'tooltip',
|
4875
|
+
'label'
|
4876
|
+
]),
|
4834
4877
|
deleteTooltipAndLabelDimension
|
4835
4878
|
]),
|
4836
4879
|
pivotAdapter([
|
@@ -4936,7 +4979,10 @@
|
|
4936
4979
|
], [
|
4937
4980
|
encodingForColumn,
|
4938
4981
|
buildMeasures,
|
4939
|
-
|
4982
|
+
deleteEncodingForMeasure([
|
4983
|
+
'tooltip',
|
4984
|
+
'label'
|
4985
|
+
]),
|
4940
4986
|
deleteTooltipAndLabelDimension
|
4941
4987
|
]),
|
4942
4988
|
pivotAdapter([
|
@@ -5111,7 +5157,10 @@
|
|
5111
5157
|
], [
|
5112
5158
|
encodingForBar,
|
5113
5159
|
buildMeasures,
|
5114
|
-
|
5160
|
+
deleteEncodingForMeasure([
|
5161
|
+
'tooltip',
|
5162
|
+
'label'
|
5163
|
+
]),
|
5115
5164
|
deleteTooltipAndLabelDimension
|
5116
5165
|
]),
|
5117
5166
|
pivotAdapter([
|
@@ -5196,8 +5245,8 @@
|
|
5196
5245
|
...spec
|
5197
5246
|
};
|
5198
5247
|
const { advancedVSeed, vseed } = context;
|
5248
|
+
const { encoding, dimensions, measures } = advancedVSeed;
|
5199
5249
|
const { chartType } = vseed;
|
5200
|
-
const { locale } = advancedVSeed;
|
5201
5250
|
const config = advancedVSeed.config?.[chartType]?.xAxis;
|
5202
5251
|
if (!result.axes) result.axes = [];
|
5203
5252
|
if (!config) {
|
@@ -5211,8 +5260,8 @@
|
|
5211
5260
|
];
|
5212
5261
|
return result;
|
5213
5262
|
}
|
5214
|
-
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat
|
5215
|
-
const formatter = createNumFormatter(numFormat
|
5263
|
+
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat, numFormat = {} } = config;
|
5264
|
+
const formatter = createNumFormatter(numFormat);
|
5216
5265
|
const linearAxis = {
|
5217
5266
|
visible,
|
5218
5267
|
type: log ? 'log' : 'linear',
|
@@ -5225,11 +5274,7 @@
|
|
5225
5274
|
min,
|
5226
5275
|
label: {
|
5227
5276
|
visible: label?.visible,
|
5228
|
-
formatMethod: (value)=>
|
5229
|
-
if (!chunk_VCYTMP4D_n(numFormat)) return formatter(value);
|
5230
|
-
if (autoFormat) return autoFormatter(value, locale);
|
5231
|
-
return value;
|
5232
|
-
},
|
5277
|
+
formatMethod: (value)=>createLinearFormat(value, autoFormat, numFormat, formatter),
|
5233
5278
|
style: {
|
5234
5279
|
fill: label?.labelColor,
|
5235
5280
|
angle: label?.labelAngle,
|
@@ -5239,7 +5284,7 @@
|
|
5239
5284
|
},
|
5240
5285
|
title: {
|
5241
5286
|
visible: title?.visible,
|
5242
|
-
text: title?.titleText,
|
5287
|
+
text: title?.titleText || defaultTitleText(measures, dimensions, encoding.x),
|
5243
5288
|
style: {
|
5244
5289
|
fill: title?.titleColor,
|
5245
5290
|
fontSize: title?.titleFontSize,
|
@@ -5284,6 +5329,7 @@
|
|
5284
5329
|
};
|
5285
5330
|
const { advancedVSeed, vseed } = context;
|
5286
5331
|
const { chartType } = vseed;
|
5332
|
+
const { measures, dimensions, encoding } = advancedVSeed;
|
5287
5333
|
const config = advancedVSeed.config?.[chartType]?.yAxis;
|
5288
5334
|
if (!result.axes) result.axes = [];
|
5289
5335
|
if (!config) {
|
@@ -5329,7 +5375,7 @@
|
|
5329
5375
|
},
|
5330
5376
|
title: {
|
5331
5377
|
visible: title?.visible,
|
5332
|
-
text: title?.titleText,
|
5378
|
+
text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y),
|
5333
5379
|
style: {
|
5334
5380
|
fill: title?.titleColor,
|
5335
5381
|
fontSize: title?.titleFontSize,
|
@@ -5478,7 +5524,10 @@
|
|
5478
5524
|
], [
|
5479
5525
|
encodingForBar,
|
5480
5526
|
buildMeasures,
|
5481
|
-
|
5527
|
+
deleteEncodingForMeasure([
|
5528
|
+
'tooltip',
|
5529
|
+
'label'
|
5530
|
+
]),
|
5482
5531
|
deleteTooltipAndLabelDimension
|
5483
5532
|
]),
|
5484
5533
|
pivotAdapter([
|
@@ -5583,7 +5632,10 @@
|
|
5583
5632
|
], [
|
5584
5633
|
encodingForBar,
|
5585
5634
|
buildMeasures,
|
5586
|
-
|
5635
|
+
deleteEncodingForMeasure([
|
5636
|
+
'tooltip',
|
5637
|
+
'label'
|
5638
|
+
]),
|
5587
5639
|
deleteTooltipAndLabelDimension
|
5588
5640
|
]),
|
5589
5641
|
pivotAdapter([
|
@@ -5663,7 +5715,10 @@
|
|
5663
5715
|
], [
|
5664
5716
|
encodingForLine,
|
5665
5717
|
buildMeasures,
|
5666
|
-
|
5718
|
+
deleteEncodingForMeasure([
|
5719
|
+
'tooltip',
|
5720
|
+
'label'
|
5721
|
+
]),
|
5667
5722
|
deleteTooltipAndLabelDimension
|
5668
5723
|
]),
|
5669
5724
|
pivotAdapter([
|
@@ -5830,7 +5885,10 @@
|
|
5830
5885
|
], [
|
5831
5886
|
encodingForLine,
|
5832
5887
|
buildMeasures,
|
5833
|
-
|
5888
|
+
deleteEncodingForMeasure([
|
5889
|
+
'tooltip',
|
5890
|
+
'label'
|
5891
|
+
]),
|
5834
5892
|
deleteTooltipAndLabelDimension
|
5835
5893
|
]),
|
5836
5894
|
pivotAdapter([
|
@@ -5962,6 +6020,7 @@
|
|
5962
6020
|
if (color.length > 0) encoding.color = [
|
5963
6021
|
color[0]
|
5964
6022
|
];
|
6023
|
+
encoding.size = chunk_QJLMYOTX_i(measures.filter((item)=>'size' === item.encoding).map((item)=>item.id));
|
5965
6024
|
const label = chunk_QJLMYOTX_i(measures.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
5966
6025
|
encoding.label = chunk_QJLMYOTX_i([
|
5967
6026
|
...encoding.label || [],
|
@@ -6071,16 +6130,41 @@
|
|
6071
6130
|
});
|
6072
6131
|
return scatterMeasuresToMeasureTree(scatterMeasures);
|
6073
6132
|
};
|
6133
|
+
const scatterConfig = (advancedVSeed, context)=>{
|
6134
|
+
const { vseed } = context;
|
6135
|
+
const { chartType } = vseed;
|
6136
|
+
const result = {
|
6137
|
+
...advancedVSeed
|
6138
|
+
};
|
6139
|
+
const pickedConfig = chunk_2T7K3PFL_i(vseed, [
|
6140
|
+
'backgroundColor',
|
6141
|
+
'color',
|
6142
|
+
'label',
|
6143
|
+
'legend',
|
6144
|
+
'tooltip',
|
6145
|
+
'xAxis',
|
6146
|
+
'yAxis',
|
6147
|
+
'sizeRange',
|
6148
|
+
'size',
|
6149
|
+
'crosshairLine'
|
6150
|
+
]);
|
6151
|
+
const config = replaceNullToUndefined(pickedConfig);
|
6152
|
+
result.config = {
|
6153
|
+
...result.config || {},
|
6154
|
+
[chartType]: {
|
6155
|
+
...config
|
6156
|
+
}
|
6157
|
+
};
|
6158
|
+
return result;
|
6159
|
+
};
|
6074
6160
|
const reshapeWithScatterEncoding = (advancedVSeed, context)=>{
|
6075
6161
|
const result = {
|
6076
6162
|
...advancedVSeed
|
6077
6163
|
};
|
6078
6164
|
const { vseed } = context;
|
6079
6165
|
const { dataset } = vseed;
|
6080
|
-
const { dimensions, measures, encoding, chartType } = advancedVSeed;
|
6081
|
-
if (
|
6082
|
-
if (0 === measures.length) throw new Error('measures can not be empty');
|
6083
|
-
if (measures.length > 2) throw new Error('measures can not be more than 2');
|
6166
|
+
const { dimensions = [], measures = [], encoding, chartType } = advancedVSeed;
|
6167
|
+
if (measures.length > 2) throw new Error('measures can not be more than 2 groups in scatter');
|
6084
6168
|
const foldInfoList = [];
|
6085
6169
|
const unfoldInfoList = [];
|
6086
6170
|
const datasets = [];
|
@@ -6136,8 +6220,7 @@
|
|
6136
6220
|
};
|
6137
6221
|
const { vseed } = context;
|
6138
6222
|
const { dataset } = vseed;
|
6139
|
-
const { dimensions, measures, encoding, chartType } = advancedVSeed;
|
6140
|
-
if (!measures || !dimensions || !dataset || !encoding) return result;
|
6223
|
+
const { dimensions = [], measures = [], encoding, chartType } = advancedVSeed;
|
6141
6224
|
const measureGroups = [];
|
6142
6225
|
const depth = measureDepth(measures);
|
6143
6226
|
if (3 === depth) measures.forEach((measure)=>{
|
@@ -6147,8 +6230,7 @@
|
|
6147
6230
|
const datasetList = [];
|
6148
6231
|
const datasetReshapeInfo = [];
|
6149
6232
|
measureGroups.forEach((measures, index)=>{
|
6150
|
-
if (
|
6151
|
-
if (measures.length > 2) throw new Error('measures can not be more than 2');
|
6233
|
+
if (measures.length > 2) throw new Error('measures can not be more than 2 groups in scatter');
|
6152
6234
|
const foldInfoList = [];
|
6153
6235
|
const unfoldInfoList = [];
|
6154
6236
|
const datasets = [];
|
@@ -6212,7 +6294,11 @@
|
|
6212
6294
|
], [
|
6213
6295
|
encodingForScatter,
|
6214
6296
|
buildMeasuresForScatter,
|
6215
|
-
|
6297
|
+
deleteEncodingForMeasure([
|
6298
|
+
'tooltip',
|
6299
|
+
'label',
|
6300
|
+
'size'
|
6301
|
+
]),
|
6216
6302
|
deleteTooltipAndLabelDimension
|
6217
6303
|
]),
|
6218
6304
|
pivotAdapter([
|
@@ -6260,6 +6346,25 @@
|
|
6260
6346
|
}
|
6261
6347
|
};
|
6262
6348
|
};
|
6349
|
+
const scatterSize = (spec, context)=>{
|
6350
|
+
const result = {
|
6351
|
+
...spec
|
6352
|
+
};
|
6353
|
+
const { advancedVSeed } = context;
|
6354
|
+
const { chartType, encoding } = advancedVSeed;
|
6355
|
+
const baseConfig = advancedVSeed.config[chartType];
|
6356
|
+
if (!baseConfig || !baseConfig.sizeRange && !baseConfig.size) return result;
|
6357
|
+
const size = baseConfig.size ?? baseConfig.sizeRange;
|
6358
|
+
result.size = {
|
6359
|
+
type: 'linear',
|
6360
|
+
range: Array.isArray(size) ? size : [
|
6361
|
+
size,
|
6362
|
+
size
|
6363
|
+
]
|
6364
|
+
};
|
6365
|
+
result.sizeField = encoding?.size?.[0] || void 0;
|
6366
|
+
return result;
|
6367
|
+
};
|
6263
6368
|
const labelScatter = (spec, context)=>{
|
6264
6369
|
const result = {
|
6265
6370
|
...spec
|
@@ -6413,6 +6518,7 @@
|
|
6413
6518
|
progressive,
|
6414
6519
|
xLinear,
|
6415
6520
|
yLinear,
|
6521
|
+
scatterSize,
|
6416
6522
|
labelScatter,
|
6417
6523
|
tooltipScatter,
|
6418
6524
|
colorAdapter(discreteLegend, colorLegend),
|
@@ -6438,6 +6544,7 @@
|
|
6438
6544
|
progressive,
|
6439
6545
|
xLinear,
|
6440
6546
|
yLinear,
|
6547
|
+
scatterSize,
|
6441
6548
|
labelScatter,
|
6442
6549
|
tooltipScatter,
|
6443
6550
|
verticalCrosshairLine,
|
@@ -6631,19 +6738,16 @@
|
|
6631
6738
|
};
|
6632
6739
|
const { vseed } = context;
|
6633
6740
|
const { dataset } = vseed;
|
6634
|
-
const { dimensions, measures, encoding, chartType } = advancedVSeed;
|
6635
|
-
if (
|
6636
|
-
if (0 === measures.length) throw new Error('measures can not be empty');
|
6637
|
-
if (measures.length > 2) throw new Error('measures can not be more than 2');
|
6741
|
+
const { dimensions = [], measures = [], encoding, chartType } = advancedVSeed;
|
6742
|
+
if (measures.length > 2) throw new Error('measures can not be more than 2 groups in dualAxis');
|
6638
6743
|
const foldInfoList = [];
|
6639
6744
|
const unfoldInfoList = [];
|
6640
6745
|
const datasets = [];
|
6641
6746
|
const primaryMeasures = measures[0];
|
6642
6747
|
const secondaryMeasures = measures[1] || [];
|
6643
|
-
const hasEncoding = (vseed.dimensions || []).some((item)=>item.encoding);
|
6644
6748
|
if (primaryMeasures && primaryMeasures.children) {
|
6645
6749
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), T(primaryMeasures.children, (item)=>item.id), encoding, {
|
6646
|
-
colorItemAsId:
|
6750
|
+
colorItemAsId: false,
|
6647
6751
|
foldMeasureValue: FoldPrimaryMeasureValue,
|
6648
6752
|
colorMeasureId: getColorMeasureId(advancedVSeed)
|
6649
6753
|
});
|
@@ -6653,6 +6757,7 @@
|
|
6653
6757
|
}
|
6654
6758
|
if (secondaryMeasures && secondaryMeasures.children) {
|
6655
6759
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), T(secondaryMeasures.children, (item)=>item.id), encoding, {
|
6760
|
+
colorItemAsId: false,
|
6656
6761
|
foldMeasureValue: FoldSecondaryMeasureValue,
|
6657
6762
|
colorMeasureId: getColorMeasureId(advancedVSeed)
|
6658
6763
|
});
|
@@ -6688,9 +6793,7 @@
|
|
6688
6793
|
};
|
6689
6794
|
const { vseed } = context;
|
6690
6795
|
const { dataset } = vseed;
|
6691
|
-
const { dimensions, measures, encoding, chartType } = advancedVSeed;
|
6692
|
-
if (!measures || !dimensions || !dataset || !encoding) return result;
|
6693
|
-
const hasEncoding = (vseed.dimensions || []).some((item)=>item.encoding);
|
6796
|
+
const { dimensions = [], measures = [], encoding, chartType } = advancedVSeed;
|
6694
6797
|
const datasetList = [];
|
6695
6798
|
const datasetReshapeInfo = [];
|
6696
6799
|
const measureGroups = [];
|
@@ -6700,8 +6803,7 @@
|
|
6700
6803
|
});
|
6701
6804
|
else if (2 === depth) measureGroups.push(measures);
|
6702
6805
|
measureGroups.forEach((measures, index)=>{
|
6703
|
-
if (
|
6704
|
-
if (measures.length > 2) throw new Error('measures can not be more than 2');
|
6806
|
+
if (measures.length > 2) throw new Error('measures can not be more than 2 groups in dualAxis');
|
6705
6807
|
const foldInfoList = [];
|
6706
6808
|
const unfoldInfoList = [];
|
6707
6809
|
const datasets = [];
|
@@ -6709,7 +6811,7 @@
|
|
6709
6811
|
const secondaryMeasures = measures[1] || [];
|
6710
6812
|
if (primaryMeasures && primaryMeasures.children) {
|
6711
6813
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), T(primaryMeasures.children, (item)=>item.id), encoding, {
|
6712
|
-
colorItemAsId:
|
6814
|
+
colorItemAsId: false,
|
6713
6815
|
foldMeasureValue: `${FoldPrimaryMeasureValue}${index}`,
|
6714
6816
|
colorMeasureId: getColorMeasureId(advancedVSeed)
|
6715
6817
|
});
|
@@ -6719,6 +6821,7 @@
|
|
6719
6821
|
}
|
6720
6822
|
if (secondaryMeasures && secondaryMeasures.children) {
|
6721
6823
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), T(secondaryMeasures.children, (item)=>item.id), encoding, {
|
6824
|
+
colorItemAsId: false,
|
6722
6825
|
foldMeasureValue: `${FoldSecondaryMeasureValue}${index}`,
|
6723
6826
|
colorMeasureId: getColorMeasureId(advancedVSeed)
|
6724
6827
|
});
|
@@ -6790,7 +6893,10 @@
|
|
6790
6893
|
], [
|
6791
6894
|
encodingForDualAxis,
|
6792
6895
|
buildMeasuresForDualAxis,
|
6793
|
-
|
6896
|
+
deleteEncodingForMeasure([
|
6897
|
+
'tooltip',
|
6898
|
+
'label'
|
6899
|
+
]),
|
6794
6900
|
deleteTooltipAndLabelDimension
|
6795
6901
|
]),
|
6796
6902
|
pivotAdapter([
|
@@ -7176,7 +7282,7 @@
|
|
7176
7282
|
};
|
7177
7283
|
const { advancedVSeed, vseed } = context;
|
7178
7284
|
const { chartType } = vseed;
|
7179
|
-
const {
|
7285
|
+
const { datasetReshapeInfo, encoding, measures, dimensions } = advancedVSeed;
|
7180
7286
|
const { index, id: reshapeInfoId, foldInfoList } = datasetReshapeInfo[0];
|
7181
7287
|
const primaryYAxis = advancedVSeed.config?.[chartType]?.primaryYAxis;
|
7182
7288
|
const yAxisConfig = Array.isArray(primaryYAxis) ? primaryYAxis[index] || primaryYAxis[0] : primaryYAxis;
|
@@ -7204,8 +7310,8 @@
|
|
7204
7310
|
];
|
7205
7311
|
return result;
|
7206
7312
|
}
|
7207
|
-
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat
|
7208
|
-
const formatter = createNumFormatter(numFormat
|
7313
|
+
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, autoFormat, numFormat = {} } = yAxisConfig;
|
7314
|
+
const formatter = createNumFormatter(numFormat);
|
7209
7315
|
const linearAxis = {
|
7210
7316
|
visible: isEmptySecondary ? false : visible,
|
7211
7317
|
id,
|
@@ -7220,11 +7326,7 @@
|
|
7220
7326
|
min,
|
7221
7327
|
label: {
|
7222
7328
|
visible: label?.visible,
|
7223
|
-
formatMethod: (value)=>
|
7224
|
-
if (!chunk_VCYTMP4D_n(numFormat)) return formatter(value);
|
7225
|
-
if (autoFormat) return autoFormatter(value, locale);
|
7226
|
-
return value;
|
7227
|
-
},
|
7329
|
+
formatMethod: (value)=>createLinearFormat(value, autoFormat, numFormat, formatter),
|
7228
7330
|
style: {
|
7229
7331
|
fill: label?.labelColor,
|
7230
7332
|
angle: label?.labelAngle,
|
@@ -7234,7 +7336,7 @@
|
|
7234
7336
|
},
|
7235
7337
|
title: {
|
7236
7338
|
visible: title?.visible,
|
7237
|
-
text: title?.titleText,
|
7339
|
+
text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y),
|
7238
7340
|
style: {
|
7239
7341
|
fill: title?.titleColor,
|
7240
7342
|
fontSize: title?.titleFontSize,
|
@@ -7279,7 +7381,7 @@
|
|
7279
7381
|
};
|
7280
7382
|
const { advancedVSeed, vseed } = context;
|
7281
7383
|
const { chartType } = vseed;
|
7282
|
-
const {
|
7384
|
+
const { datasetReshapeInfo, measures, dimensions, encoding } = advancedVSeed;
|
7283
7385
|
const { index, id: reshapeInfoId, foldInfoList } = datasetReshapeInfo[0];
|
7284
7386
|
const secondaryYAxis = advancedVSeed.config?.[chartType]?.secondaryYAxis;
|
7285
7387
|
const yAxisConfig = Array.isArray(secondaryYAxis) ? secondaryYAxis[index] || secondaryYAxis[0] : secondaryYAxis;
|
@@ -7313,8 +7415,8 @@
|
|
7313
7415
|
];
|
7314
7416
|
return result;
|
7315
7417
|
}
|
7316
|
-
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, numFormat = {}, autoFormat
|
7317
|
-
const formatter = createNumFormatter(numFormat
|
7418
|
+
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10, numFormat = {}, autoFormat } = yAxisConfig;
|
7419
|
+
const formatter = createNumFormatter(numFormat);
|
7318
7420
|
const linearAxis = {
|
7319
7421
|
visible: isEmptySecondary ? false : visible,
|
7320
7422
|
id,
|
@@ -7330,11 +7432,7 @@
|
|
7330
7432
|
min,
|
7331
7433
|
label: {
|
7332
7434
|
visible: label?.visible,
|
7333
|
-
formatMethod: (value)=>
|
7334
|
-
if (!chunk_VCYTMP4D_n(numFormat)) return formatter(value);
|
7335
|
-
if (autoFormat) return autoFormatter(value, locale);
|
7336
|
-
return value;
|
7337
|
-
},
|
7435
|
+
formatMethod: (value)=>createLinearFormat(value, autoFormat, numFormat, formatter),
|
7338
7436
|
style: {
|
7339
7437
|
fill: label?.labelColor,
|
7340
7438
|
angle: label?.labelAngle,
|
@@ -7344,7 +7442,7 @@
|
|
7344
7442
|
},
|
7345
7443
|
title: {
|
7346
7444
|
visible: title?.visible,
|
7347
|
-
text: title?.titleText,
|
7445
|
+
text: title?.titleText || defaultTitleText(measures, dimensions, encoding.y),
|
7348
7446
|
style: {
|
7349
7447
|
fill: title?.titleColor,
|
7350
7448
|
fontSize: title?.titleFontSize,
|
@@ -7581,7 +7679,10 @@
|
|
7581
7679
|
], [
|
7582
7680
|
encodingForPie,
|
7583
7681
|
buildMeasures,
|
7584
|
-
|
7682
|
+
deleteEncodingForMeasure([
|
7683
|
+
'tooltip',
|
7684
|
+
'label'
|
7685
|
+
]),
|
7585
7686
|
deleteTooltipAndLabelDimension
|
7586
7687
|
]),
|
7587
7688
|
pivotAdapter([
|
@@ -7708,7 +7809,10 @@
|
|
7708
7809
|
], [
|
7709
7810
|
encodingForPie,
|
7710
7811
|
buildMeasures,
|
7711
|
-
|
7812
|
+
deleteEncodingForMeasure([
|
7813
|
+
'tooltip',
|
7814
|
+
'label'
|
7815
|
+
]),
|
7712
7816
|
deleteTooltipAndLabelDimension
|
7713
7817
|
]),
|
7714
7818
|
pivotAdapter([
|
@@ -7866,7 +7970,10 @@
|
|
7866
7970
|
], [
|
7867
7971
|
encodingForRose,
|
7868
7972
|
buildMeasures,
|
7869
|
-
|
7973
|
+
deleteEncodingForMeasure([
|
7974
|
+
'tooltip',
|
7975
|
+
'label'
|
7976
|
+
]),
|
7870
7977
|
deleteTooltipAndLabelDimension
|
7871
7978
|
]),
|
7872
7979
|
pivotAdapter([
|
@@ -8075,7 +8182,10 @@
|
|
8075
8182
|
], [
|
8076
8183
|
encodingForRose,
|
8077
8184
|
buildMeasures,
|
8078
|
-
|
8185
|
+
deleteEncodingForMeasure([
|
8186
|
+
'tooltip',
|
8187
|
+
'label'
|
8188
|
+
]),
|
8079
8189
|
deleteTooltipAndLabelDimension
|
8080
8190
|
]),
|
8081
8191
|
pivotAdapter([
|
@@ -8264,7 +8374,10 @@
|
|
8264
8374
|
], [
|
8265
8375
|
encodingForRadar,
|
8266
8376
|
buildMeasures,
|
8267
|
-
|
8377
|
+
deleteEncodingForMeasure([
|
8378
|
+
'tooltip',
|
8379
|
+
'label'
|
8380
|
+
]),
|
8268
8381
|
deleteTooltipAndLabelDimension
|
8269
8382
|
]),
|
8270
8383
|
pivotAdapter([
|
@@ -8478,7 +8591,10 @@
|
|
8478
8591
|
], [
|
8479
8592
|
encodingForFunnel,
|
8480
8593
|
buildMeasures,
|
8481
|
-
|
8594
|
+
deleteEncodingForMeasure([
|
8595
|
+
'tooltip',
|
8596
|
+
'label'
|
8597
|
+
]),
|
8482
8598
|
deleteTooltipAndLabelDimension
|
8483
8599
|
]),
|
8484
8600
|
pivotAdapter([
|
@@ -8681,7 +8797,10 @@
|
|
8681
8797
|
], [
|
8682
8798
|
encodingForHeatmap,
|
8683
8799
|
buildMeasures,
|
8684
|
-
|
8800
|
+
deleteEncodingForMeasure([
|
8801
|
+
'tooltip',
|
8802
|
+
'label'
|
8803
|
+
]),
|
8685
8804
|
deleteTooltipAndLabelDimension
|
8686
8805
|
]),
|
8687
8806
|
pivotAdapter([
|
@@ -13021,14 +13140,26 @@
|
|
13021
13140
|
const zMeasureTree = schemas_array(zMeasureGroup.or(zMeasure));
|
13022
13141
|
const zDualMeasure = schemas_object({
|
13023
13142
|
id: schemas_string(),
|
13024
|
-
primaryMeasures: schemas_array(zMeasure
|
13143
|
+
primaryMeasures: schemas_array(zMeasure.omit({
|
13144
|
+
encoding: true,
|
13145
|
+
parentId: true
|
13146
|
+
})).or(zMeasure.omit({
|
13147
|
+
parentId: true,
|
13148
|
+
encoding: true
|
13149
|
+
})).optional(),
|
13025
13150
|
secondaryMeasures: schemas_array(zMeasure).or(zMeasure).optional()
|
13026
13151
|
});
|
13027
13152
|
const zDualMeasures = schemas_array(zDualMeasure);
|
13028
13153
|
const zScatterMeasure = schemas_object({
|
13029
13154
|
id: schemas_string(),
|
13030
|
-
xMeasures: schemas_array(zMeasure
|
13031
|
-
|
13155
|
+
xMeasures: schemas_array(zMeasure.omit({
|
13156
|
+
parentId: true,
|
13157
|
+
encoding: true
|
13158
|
+
})).or(zMeasure).optional(),
|
13159
|
+
yMeasures: schemas_array(zMeasure.omit({
|
13160
|
+
parentId: true,
|
13161
|
+
encoding: true
|
13162
|
+
})).or(zMeasure).optional()
|
13032
13163
|
});
|
13033
13164
|
const zScatterMeasures = schemas_array(zScatterMeasure);
|
13034
13165
|
const zFoldInfo = schemas_object({
|
@@ -14074,6 +14205,8 @@
|
|
14074
14205
|
measures: zMeasureTree.nullish(),
|
14075
14206
|
scatterMeasures: zScatterMeasures.nullish(),
|
14076
14207
|
backgroundColor: zBackgroundColor.nullish(),
|
14208
|
+
size: schemas_number().or(schemas_array(schemas_number())).nullish(),
|
14209
|
+
sizeRange: schemas_number().or(schemas_array(schemas_number())).nullish(),
|
14077
14210
|
color: zColor.nullish(),
|
14078
14211
|
label: zLabel.nullish(),
|
14079
14212
|
legend: zLegend.nullish(),
|