@visactor/vseed 0.1.1 → 0.1.3
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 +120 -28
- package/dist/dataReshape/constant.d.ts +0 -8
- package/dist/dataReshape/dataReshapeByEncoding.d.ts +1 -0
- package/dist/dataReshape/foldMeasures.d.ts +7 -24
- package/dist/index.cjs +820 -506
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +802 -464
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/chart/pipes/encoding/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/{init/autoDualMeasures.d.ts → encoding/line.d.ts} +1 -1
- package/dist/pipeline/advanced/chart/pipes/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/init/index.d.ts +0 -3
- package/dist/pipeline/advanced/chart/pipes/{init/autoMeasures.d.ts → measures/buildMeasures.d.ts} +1 -1
- package/dist/pipeline/advanced/chart/pipes/measures/buildMeasuresForDualAxis.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/measures/buildMeasuresForScatter.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/measures/index.d.ts +3 -0
- package/dist/pipeline/advanced/chart/pipes/measures/utils.d.ts +28 -0
- package/dist/pipeline/spec/chart/pipes/color/colorAdapter.d.ts +4 -0
- package/dist/pipeline/spec/chart/pipes/color/colorAreaStyleFill.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/colorBarStyleFill.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/colorLineStyleFill.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/colorPointStyleFill.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/color/index.d.ts +7 -0
- package/dist/pipeline/spec/chart/pipes/{tooltip/tooltipDisable.d.ts → color/linearColor.d.ts} +1 -1
- package/dist/pipeline/spec/chart/pipes/color/linearColorForDualAxis.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/legend/colorLegend.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/legend/index.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/legend/pivotColorLegend.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/tooltip/index.d.ts +0 -1
- package/dist/pipeline/utils/chatType.d.ts +1 -1
- package/dist/pipeline/utils/dimensions/find.d.ts +0 -2
- package/dist/pipeline/utils/dimensions/index.d.ts +0 -1
- package/dist/pipeline/utils/dimensions/typeGuard.d.ts +0 -4
- package/dist/types/advancedVSeed.d.ts +53 -14
- package/dist/types/chartType/area/zArea.d.ts +14 -0
- package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +14 -0
- package/dist/types/chartType/bar/zBar.d.ts +14 -0
- package/dist/types/chartType/barParallel/zBarParallel.d.ts +14 -0
- package/dist/types/chartType/barPercent/zBarPercent.d.ts +14 -0
- package/dist/types/chartType/column/zColumn.d.ts +14 -0
- package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +14 -0
- package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +14 -0
- package/dist/types/chartType/donut/zDonut.d.ts +14 -0
- package/dist/types/chartType/dualAxis/zDualAxis.d.ts +66 -0
- package/dist/types/chartType/funnel/zFunnel.d.ts +15 -0
- package/dist/types/chartType/heatmap/zHeatmap.d.ts +15 -0
- package/dist/types/chartType/line/line.d.ts +0 -1
- package/dist/types/chartType/line/zLine.d.ts +14 -0
- package/dist/types/chartType/pie/zPie.d.ts +14 -0
- package/dist/types/chartType/pivotTable/zPivotTable.d.ts +13 -0
- package/dist/types/chartType/radar/zRadar.d.ts +14 -0
- package/dist/types/chartType/rose/zRose.d.ts +14 -0
- package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +14 -0
- package/dist/types/chartType/scatter/zScatter.d.ts +66 -0
- package/dist/types/chartType/table/zTable.d.ts +13 -0
- package/dist/types/properties/config/color/color.d.ts +8 -2
- package/dist/types/properties/config/config.d.ts +36 -0
- package/dist/types/properties/config/legend/legend.d.ts +9 -5
- package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +2 -0
- package/dist/types/properties/datasetReshapeInfo/zDatasetReshapeInfo.d.ts +6 -0
- package/dist/types/properties/encoding/encoding.d.ts +0 -1
- package/dist/types/properties/encoding/index.d.ts +2 -2
- package/dist/types/properties/encoding/zEncoding.d.ts +0 -14
- package/dist/types/properties/measures/dualMeasures.d.ts +1 -0
- package/dist/types/properties/measures/measures.d.ts +19 -0
- package/dist/types/properties/measures/scatterMeasures.d.ts +1 -0
- package/dist/types/properties/measures/zDualMeasures.d.ts +104 -0
- package/dist/types/properties/measures/zMeasures.d.ts +39 -0
- package/dist/types/properties/measures/zScatterMeasures.d.ts +104 -0
- package/dist/types/properties/theme/customTheme.d.ts +36 -0
- package/dist/types/zVseed.d.ts +384 -0
- package/dist/umd/index.js +820 -490
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/pipeline/advanced/chart/pipes/init/autoScatterMeasures.d.ts +0 -2
package/dist/index.cjs
CHANGED
@@ -24,7 +24,6 @@ var __webpack_require__ = {};
|
|
24
24
|
var __webpack_exports__ = {};
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
27
|
-
zTooltip: ()=>zTooltip,
|
28
27
|
funnelAdvancedPipeline: ()=>funnelAdvancedPipeline,
|
29
28
|
zHeatmapConfig: ()=>zHeatmapConfig,
|
30
29
|
zBar: ()=>zBar,
|
@@ -74,12 +73,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
74
73
|
zRoseParallel: ()=>zRoseParallel,
|
75
74
|
MeasureName: ()=>MeasureName,
|
76
75
|
zDataset: ()=>zDataset,
|
77
|
-
UnfoldDimensionGroupId: ()=>UnfoldDimensionGroupId,
|
78
76
|
zNumFormat: ()=>zNumFormat,
|
79
77
|
barPercentAdvancedPipeline: ()=>barPercentAdvancedPipeline,
|
80
78
|
findAllDimensions: ()=>findAllDimensions,
|
81
79
|
FoldYMeasureValue: ()=>FoldYMeasureValue,
|
82
|
-
findDimensionById: ()=>findDimensionById,
|
83
80
|
zPivotTableConfig: ()=>zPivotTableConfig,
|
84
81
|
zArea: ()=>zArea,
|
85
82
|
zColumnParallel: ()=>zColumnParallel,
|
@@ -105,31 +102,31 @@ __webpack_require__.d(__webpack_exports__, {
|
|
105
102
|
registerLightTheme: ()=>registerLightTheme,
|
106
103
|
roseAdvancedPipeline: ()=>roseAdvancedPipeline,
|
107
104
|
zBarParallel: ()=>zBarParallel,
|
108
|
-
registerDarkTheme: ()=>registerDarkTheme,
|
109
|
-
registerPivotTable: ()=>registerPivotTable,
|
110
105
|
isPartialDatumSelector: ()=>isPartialDatumSelector,
|
111
|
-
|
112
|
-
isDimensionGroup: ()=>isDimensionGroup,
|
113
|
-
dualAxisSpecPipeline: ()=>dualAxisSpecPipeline,
|
106
|
+
registerPivotTable: ()=>registerPivotTable,
|
114
107
|
tableAdvancedPipeline: ()=>tableAdvancedPipeline,
|
115
|
-
|
108
|
+
registerDarkTheme: ()=>registerDarkTheme,
|
109
|
+
dualAxisSpecPipeline: ()=>dualAxisSpecPipeline,
|
110
|
+
pieSpecPipeline: ()=>pieSpecPipeline,
|
116
111
|
zAnnotationVerticalLine: ()=>zAnnotationVerticalLine,
|
117
|
-
|
112
|
+
barSpecPipeline: ()=>barSpecPipeline,
|
118
113
|
zChartType: ()=>zChartType,
|
114
|
+
registerRose: ()=>registerRose,
|
115
|
+
zMeasureTree: ()=>zMeasureTree,
|
119
116
|
unfoldDimensions: ()=>unfoldDimensions,
|
120
117
|
roseParallelAdvancedPipeline: ()=>roseParallelAdvancedPipeline,
|
121
118
|
registerTable: ()=>registerTable,
|
122
|
-
Builder: ()=>Builder,
|
123
119
|
isMeasureGroup: ()=>isMeasureGroup,
|
120
|
+
autoFormatter: ()=>autoFormatter,
|
124
121
|
YEncoding: ()=>YEncoding,
|
125
122
|
registerAll: ()=>registerAll,
|
126
123
|
registerBar: ()=>registerBar,
|
127
124
|
isVChart: ()=>isVChart,
|
128
125
|
radarSpecPipeline: ()=>radarSpecPipeline,
|
129
|
-
|
130
|
-
autoFormatter: ()=>autoFormatter,
|
131
|
-
zMeasureTree: ()=>zMeasureTree,
|
126
|
+
Builder: ()=>Builder,
|
132
127
|
zPieConfig: ()=>zPieConfig,
|
128
|
+
zPivotTable: ()=>zPivotTable,
|
129
|
+
zRadar: ()=>zRadar,
|
133
130
|
registerLine: ()=>registerLine,
|
134
131
|
registerCustomTheme: ()=>registerCustomTheme,
|
135
132
|
zColor: ()=>zColor,
|
@@ -149,21 +146,19 @@ __webpack_require__.d(__webpack_exports__, {
|
|
149
146
|
zAxis: ()=>zAxis,
|
150
147
|
isVTable: ()=>isVTable,
|
151
148
|
zMeasures: ()=>zMeasures,
|
152
|
-
|
149
|
+
zRadarConfig: ()=>zRadarConfig,
|
153
150
|
zLine: ()=>zLine,
|
154
151
|
columnSpecPipeline: ()=>columnSpecPipeline,
|
155
|
-
UnfoldDimensionGroup: ()=>UnfoldDimensionGroup,
|
156
|
-
zDatasetReshapeInfo: ()=>zDatasetReshapeInfo,
|
157
152
|
zFoldInfo: ()=>zFoldInfo,
|
153
|
+
zDatasetReshapeInfo: ()=>zDatasetReshapeInfo,
|
158
154
|
zLinearColor: ()=>zLinearColor,
|
155
|
+
zStackCornerRadius: ()=>zStackCornerRadius,
|
159
156
|
zAreaStyle: ()=>zAreaStyle,
|
160
157
|
ORIGINAL_DATA: ()=>ORIGINAL_DATA,
|
161
|
-
|
158
|
+
zUnfoldInfo: ()=>zUnfoldInfo,
|
162
159
|
zAnnotationArea: ()=>zAnnotationArea,
|
163
|
-
zStackCornerRadius: ()=>zStackCornerRadius,
|
164
160
|
DetailEncoding: ()=>DetailEncoding,
|
165
161
|
zRose: ()=>zRose,
|
166
|
-
zUnfoldInfo: ()=>zUnfoldInfo,
|
167
162
|
columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
|
168
163
|
i18n: ()=>i18n,
|
169
164
|
zPointStyle: ()=>zPointStyle,
|
@@ -172,7 +167,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
172
167
|
registerColumnParallel: ()=>registerColumnParallel,
|
173
168
|
updateAdvanced: ()=>updateAdvanced,
|
174
169
|
zDimension: ()=>zDimension,
|
175
|
-
zRadar: ()=>zRadar,
|
176
170
|
zTable: ()=>zTable,
|
177
171
|
isMeasure: ()=>isMeasure,
|
178
172
|
FoldSecondaryMeasureValue: ()=>FoldSecondaryMeasureValue,
|
@@ -195,10 +189,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
195
189
|
zBackgroundColor: ()=>zBackgroundColor,
|
196
190
|
registerBarParallel: ()=>registerBarParallel,
|
197
191
|
registerRadar: ()=>registerRadar,
|
198
|
-
zEncodings: ()=>zEncodings,
|
199
|
-
isDimension: ()=>isDimension,
|
200
|
-
pivotTableSpecPipeline: ()=>pivotTableSpecPipeline,
|
201
192
|
zLocale: ()=>zLocale,
|
193
|
+
pivotTableSpecPipeline: ()=>pivotTableSpecPipeline,
|
194
|
+
zMeasure: ()=>zMeasure,
|
202
195
|
FoldXMeasureValue: ()=>FoldXMeasureValue,
|
203
196
|
dualAxisAdvancedPipeline: ()=>dualAxisAdvancedPipeline,
|
204
197
|
registerScatter: ()=>registerScatter,
|
@@ -210,10 +203,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
210
203
|
zAdvancedVSeed: ()=>zAdvancedVSeed,
|
211
204
|
zConfig: ()=>zConfig,
|
212
205
|
zBarStyle: ()=>zBarStyle,
|
213
|
-
zMeasure: ()=>zMeasure,
|
214
206
|
zRoseParallelConfig: ()=>zRoseParallelConfig,
|
215
|
-
zAreaPercent: ()=>zAreaPercent,
|
216
207
|
zXLinearAxis: ()=>zXLinearAxis,
|
208
|
+
zAreaPercent: ()=>zAreaPercent,
|
217
209
|
columnParallelAdvancedPipeline: ()=>columnParallelAdvancedPipeline,
|
218
210
|
isValueSelector: ()=>isValueSelector,
|
219
211
|
donutAdvancedPipeline: ()=>donutAdvancedPipeline,
|
@@ -231,8 +223,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
231
223
|
lineAdvancedPipeline: ()=>lineAdvancedPipeline,
|
232
224
|
dataReshapeByEncoding: ()=>dataReshapeByEncoding,
|
233
225
|
lineSpecPipeline: ()=>lineSpecPipeline,
|
234
|
-
isDimensions: ()=>isDimensions,
|
235
226
|
zBarPercentConfig: ()=>zBarPercentConfig,
|
227
|
+
zTooltip: ()=>zTooltip,
|
236
228
|
createFormatter: ()=>createFormatter,
|
237
229
|
zDimensionGroup: ()=>zDimensionGroup,
|
238
230
|
isMeasureSelector: ()=>isMeasureSelector,
|
@@ -956,32 +948,6 @@ const autoPivotMeasures = (advancedVSeed, context)=>{
|
|
956
948
|
}));
|
957
949
|
return result;
|
958
950
|
};
|
959
|
-
const findDimensionById = (dimensions = [], id)=>{
|
960
|
-
if (!dimensions) return;
|
961
|
-
let result;
|
962
|
-
preorderTraverse(dimensions, (node)=>{
|
963
|
-
if (!('children' in node)) {
|
964
|
-
if (node.id === id) {
|
965
|
-
result = node;
|
966
|
-
return true;
|
967
|
-
}
|
968
|
-
}
|
969
|
-
return false;
|
970
|
-
});
|
971
|
-
return result;
|
972
|
-
};
|
973
|
-
const findFirstDimension = (dimensions = [])=>{
|
974
|
-
if (!dimensions) return;
|
975
|
-
let result;
|
976
|
-
preorderTraverse(dimensions, (node)=>{
|
977
|
-
if (!('children' in node)) {
|
978
|
-
result = node;
|
979
|
-
return true;
|
980
|
-
}
|
981
|
-
return false;
|
982
|
-
});
|
983
|
-
return result;
|
984
|
-
};
|
985
951
|
const findAllDimensions = (dimensions = [])=>{
|
986
952
|
if (!dimensions) return [];
|
987
953
|
const result = [];
|
@@ -1305,6 +1271,39 @@ const initAdvancedVSeed_initAdvancedVSeed = (advancedVSeed, context)=>{
|
|
1305
1271
|
locale: locale || 'zh-CN'
|
1306
1272
|
};
|
1307
1273
|
};
|
1274
|
+
const getBasicMeasures = (vseed)=>{
|
1275
|
+
const { dataset, measures } = vseed;
|
1276
|
+
if (!measures || 0 === measures.length) return generateMeasuresByDataset(dataset);
|
1277
|
+
return measures;
|
1278
|
+
};
|
1279
|
+
const generateMeasuresByDataset = (dataset)=>{
|
1280
|
+
if (!dataset) throw new Error('dataset is required');
|
1281
|
+
if (0 === dataset.length) return [];
|
1282
|
+
const top100dataset = dataset.slice(0, 100);
|
1283
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1284
|
+
...prev,
|
1285
|
+
...cur
|
1286
|
+
}), {});
|
1287
|
+
const basicMeasures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
|
1288
|
+
'',
|
1289
|
+
null,
|
1290
|
+
void 0
|
1291
|
+
].includes(key)).map((measure)=>({
|
1292
|
+
id: measure,
|
1293
|
+
alias: measure
|
1294
|
+
}));
|
1295
|
+
return basicMeasures;
|
1296
|
+
};
|
1297
|
+
const isMeasureTreeWithChildren = (vseed)=>{
|
1298
|
+
const { measures } = vseed;
|
1299
|
+
if (!measures) return false;
|
1300
|
+
return measures.some((measure)=>'children' in measure);
|
1301
|
+
};
|
1302
|
+
const isMeasureTreeWithParentId = (vseed)=>{
|
1303
|
+
const { measures } = vseed;
|
1304
|
+
if (!measures) return false;
|
1305
|
+
return measures.some((measure)=>'parentId' in measure);
|
1306
|
+
};
|
1308
1307
|
const measureDepth = (measures = [])=>{
|
1309
1308
|
if (!measures) return 0;
|
1310
1309
|
let depth = 1;
|
@@ -1323,23 +1322,26 @@ const isVTable = (vseed)=>[
|
|
1323
1322
|
const isVChart = (vseed)=>!isVTable(vseed);
|
1324
1323
|
const isPivotChart = (vseed)=>{
|
1325
1324
|
if (isVTable(vseed)) return false;
|
1325
|
+
if (isMeasureTreeWithParentId(vseed)) {
|
1326
|
+
const parentIds = vseed.measures?.map((measure)=>measure.parentId);
|
1327
|
+
return parentIds && parentIds.length > 1;
|
1328
|
+
}
|
1326
1329
|
if ('dualAxis' === vseed.chartType || 'scatter' === vseed.chartType) {
|
1327
1330
|
const { dimensions = [] } = vseed;
|
1328
1331
|
const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'rowDimension' === dimension.location || 'columnDimension' === dimension.location);
|
1329
1332
|
if (hasRowOrColumnDimension) return true;
|
1330
1333
|
if ('scatter' === vseed.chartType) {
|
1331
|
-
if (vseed
|
1334
|
+
if (isMeasureTreeWithChildren(vseed)) {
|
1332
1335
|
const depth = measureDepth(vseed.measures);
|
1333
|
-
|
1334
|
-
return false;
|
1336
|
+
return 3 === depth;
|
1335
1337
|
}
|
1336
1338
|
if (vseed.scatterMeasures && vseed.scatterMeasures.length > 1) return true;
|
1339
|
+
return false;
|
1337
1340
|
}
|
1338
1341
|
if ('dualAxis' === vseed.chartType) {
|
1339
|
-
if (vseed
|
1342
|
+
if (isMeasureTreeWithChildren(vseed)) {
|
1340
1343
|
const depth = measureDepth(vseed.measures);
|
1341
|
-
|
1342
|
-
return false;
|
1344
|
+
return 3 === depth;
|
1343
1345
|
}
|
1344
1346
|
if (vseed.dualMeasures && vseed.dualMeasures.length > 1) return true;
|
1345
1347
|
}
|
@@ -1350,77 +1352,49 @@ const isPivotChart = (vseed)=>{
|
|
1350
1352
|
const hasMeasureGroup = measures && measures.some((measure)=>measure && measure.children);
|
1351
1353
|
return hasRowOrColumnDimension || hasMeasureGroup;
|
1352
1354
|
};
|
1353
|
-
const
|
1354
|
-
const result = {
|
1355
|
-
...advancedVSeed
|
1356
|
-
};
|
1355
|
+
const buildMeasures = (advancedVSeed, context)=>{
|
1357
1356
|
const { vseed } = context;
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
if (isPivotChart(vseed)) return autoMeasureGroup(advancedVSeed, context);
|
1362
|
-
if (measures) {
|
1363
|
-
result.measures = measures;
|
1364
|
-
return result;
|
1357
|
+
if (isMeasureTreeWithChildren(vseed)) {
|
1358
|
+
advancedVSeed.measures = vseed.measures;
|
1359
|
+
return advancedVSeed;
|
1365
1360
|
}
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
...cur
|
1370
|
-
}), {});
|
1371
|
-
result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
|
1372
|
-
'',
|
1373
|
-
null,
|
1374
|
-
void 0
|
1375
|
-
].includes(key)).map((measure)=>({
|
1376
|
-
id: measure,
|
1377
|
-
alias: measure
|
1378
|
-
}));
|
1379
|
-
return result;
|
1380
|
-
};
|
1381
|
-
const autoMeasureGroup = (advancedVSeed, context)=>{
|
1382
|
-
const { vseed } = context;
|
1383
|
-
const { measures } = vseed;
|
1384
|
-
const hasMeasureGroup = measures?.some((measure)=>measure.children);
|
1385
|
-
if (!measures) return advancedVSeed;
|
1386
|
-
if (!hasMeasureGroup) {
|
1387
|
-
const newMeasures = [
|
1388
|
-
{
|
1389
|
-
id: 'measureGroup',
|
1390
|
-
alias: 'measureGroup',
|
1391
|
-
children: measures
|
1392
|
-
}
|
1393
|
-
];
|
1394
|
-
return {
|
1395
|
-
...advancedVSeed,
|
1396
|
-
measures: newMeasures
|
1397
|
-
};
|
1361
|
+
if (isMeasureTreeWithParentId(vseed)) {
|
1362
|
+
advancedVSeed.measures = generateMeasuresByParentId(vseed.measures);
|
1363
|
+
return advancedVSeed;
|
1398
1364
|
}
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
if (currentGroup.children?.length) {
|
1403
|
-
currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
|
1404
|
-
currentGroup.id = currentGroup.alias + currentGroup.children.map((item)=>item.id).join('-');
|
1405
|
-
measureGroups.push(currentGroup);
|
1406
|
-
currentGroup = createEmptyMeasureGroup();
|
1407
|
-
}
|
1408
|
-
measureGroups.push(measure);
|
1409
|
-
} else currentGroup.children?.push(measure);
|
1410
|
-
if (currentGroup.children?.length) {
|
1411
|
-
currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
|
1412
|
-
currentGroup.id = currentGroup.alias + currentGroup.children.map((item)=>item.id).join('-');
|
1413
|
-
measureGroups.push(currentGroup);
|
1414
|
-
currentGroup = createEmptyMeasureGroup();
|
1415
|
-
}
|
1416
|
-
advancedVSeed.measures = measureGroups;
|
1365
|
+
const basicMeasures = getBasicMeasures(vseed);
|
1366
|
+
if (isPivotChart(vseed)) advancedVSeed.measures = basicMeasuresToMeasureTree(basicMeasures);
|
1367
|
+
else advancedVSeed.measures = basicMeasures;
|
1417
1368
|
return advancedVSeed;
|
1418
1369
|
};
|
1419
|
-
const
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1370
|
+
const generateMeasuresByParentId = (measures)=>{
|
1371
|
+
const measureTree = [];
|
1372
|
+
measures.forEach((measure)=>{
|
1373
|
+
if (!measure.parentId) return;
|
1374
|
+
const parent = measureTree.find((item)=>item.id === measure.parentId);
|
1375
|
+
if (parent && 'children' in parent) {
|
1376
|
+
parent.children = parent.children || [];
|
1377
|
+
parent.children.push(measure);
|
1378
|
+
} else measureTree.push({
|
1379
|
+
id: measure.parentId,
|
1380
|
+
children: [
|
1381
|
+
measure
|
1382
|
+
]
|
1383
|
+
});
|
1423
1384
|
});
|
1385
|
+
return measureTree;
|
1386
|
+
};
|
1387
|
+
const basicMeasuresToMeasureTree = (measures)=>{
|
1388
|
+
const id = measures.map((item)=>item.id).join('-');
|
1389
|
+
const alias = measures.map((item)=>item.alias || item.id).join('-');
|
1390
|
+
return [
|
1391
|
+
{
|
1392
|
+
id,
|
1393
|
+
alias,
|
1394
|
+
children: measures
|
1395
|
+
}
|
1396
|
+
];
|
1397
|
+
};
|
1424
1398
|
const ORIGINAL_DATA = '__OriginalData__';
|
1425
1399
|
const Separator = '-';
|
1426
1400
|
const FoldMeasureName = '__MeaName__';
|
@@ -1437,8 +1411,6 @@ const AngleEncoding = '__Dim_Angle__';
|
|
1437
1411
|
const DetailEncoding = '__Dim_Detail__';
|
1438
1412
|
const ColorEncoding = '__Dim_Color__';
|
1439
1413
|
const ColorIdEncoding = '__Dim_ColorId__';
|
1440
|
-
const UnfoldDimensionGroup = '__DimGroup__';
|
1441
|
-
const UnfoldDimensionGroupId = '__DimGroupID__';
|
1442
1414
|
const autoDimensions_autoDimensions = (advancedVSeed, context)=>{
|
1443
1415
|
const result = {
|
1444
1416
|
...advancedVSeed
|
@@ -1478,7 +1450,7 @@ const autoDimensions_autoDimensions = (advancedVSeed, context)=>{
|
|
1478
1450
|
result.dimensions.push(MeaName);
|
1479
1451
|
return result;
|
1480
1452
|
};
|
1481
|
-
const
|
1453
|
+
const encodingForLine = (advancedVSeed, context)=>{
|
1482
1454
|
const { vseed } = context;
|
1483
1455
|
const { dimensions } = advancedVSeed;
|
1484
1456
|
if (!dimensions) return advancedVSeed;
|
@@ -1491,10 +1463,7 @@ const encodingForColumn = (advancedVSeed, context)=>{
|
|
1491
1463
|
(dimensions[1] || dimensions[0]).id
|
1492
1464
|
];
|
1493
1465
|
const detail = encoding.detail || [];
|
1494
|
-
const mergedDetail =
|
1495
|
-
...color,
|
1496
|
-
...detail
|
1497
|
-
]);
|
1466
|
+
const mergedDetail = 0 === detail.length ? dimensions.map((d)=>d.id).filter((id)=>!x.includes(id)) : encoding.detail;
|
1498
1467
|
return {
|
1499
1468
|
...advancedVSeed,
|
1500
1469
|
encoding: {
|
@@ -1526,11 +1495,20 @@ const pivotAdapter = (pipeline, pivotPipeline)=>(advancedVSeed, context)=>{
|
|
1526
1495
|
if (usePivotChart) return execPipeline(pivotPipeline, context, advancedVSeed);
|
1527
1496
|
return execPipeline(pipeline, context, advancedVSeed);
|
1528
1497
|
};
|
1529
|
-
const foldMeasures = (dataset, measures,
|
1498
|
+
const foldMeasures = (dataset, measures, encoding, options)=>{
|
1499
|
+
const { measureId, measureName, measureValue, colorMeasureId } = options || {};
|
1530
1500
|
const foldInfo = {
|
1531
1501
|
measureId,
|
1532
1502
|
measureName,
|
1533
1503
|
measureValue,
|
1504
|
+
colorRange: [
|
1505
|
+
0,
|
1506
|
+
1
|
1507
|
+
],
|
1508
|
+
measureRange: [
|
1509
|
+
0,
|
1510
|
+
1
|
1511
|
+
],
|
1534
1512
|
foldMap: {}
|
1535
1513
|
};
|
1536
1514
|
const result = new Array(dataset.length * measures.length);
|
@@ -1547,6 +1525,19 @@ const foldMeasures = (dataset, measures, measureId = FoldMeasureId, measureName
|
|
1547
1525
|
datum[measureId] = id;
|
1548
1526
|
datum[measureName] = alias || id;
|
1549
1527
|
datum[measureValue] = dataset[i][id];
|
1528
|
+
if (colorMeasureId) {
|
1529
|
+
const value = datum[ORIGINAL_DATA][colorMeasureId];
|
1530
|
+
datum[ColorEncoding] = value;
|
1531
|
+
datum[ColorIdEncoding] = colorMeasureId;
|
1532
|
+
foldInfo.colorRange = [
|
1533
|
+
Math.min(foldInfo.colorRange[0] || 1 / 0, Number(value)),
|
1534
|
+
Math.max(foldInfo.colorRange[1] || -1 / 0, Number(value))
|
1535
|
+
];
|
1536
|
+
}
|
1537
|
+
foldInfo.measureRange = [
|
1538
|
+
Math.min(foldInfo.measureRange[0] || 1 / 0, Number(datum[id])),
|
1539
|
+
Math.max(foldInfo.measureRange[1] || -1 / 0, Number(datum[id]))
|
1540
|
+
];
|
1550
1541
|
foldInfo.foldMap[id] = alias;
|
1551
1542
|
result[index++] = datum;
|
1552
1543
|
}
|
@@ -1582,7 +1573,7 @@ const unfoldDimensions = (dataset, dimensions, encoding, options)=>{
|
|
1582
1573
|
applyEncoding(YEncoding, yDimensions, datum, separator);
|
1583
1574
|
applyEncoding(ColorEncoding, colorDimensions, datum, separator);
|
1584
1575
|
applyEncoding(DetailEncoding, detailDimensions, datum, separator);
|
1585
|
-
if (!datum[ColorEncoding]) continue;
|
1576
|
+
if (!colorDimensions.length || !datum[ColorEncoding]) continue;
|
1586
1577
|
const measureId = String(datum[foldMeasureId]);
|
1587
1578
|
const colorItem = String(datum[ColorEncoding]);
|
1588
1579
|
const colorId = colorItemAsId ? colorItem : measureId ? [
|
@@ -1603,29 +1594,14 @@ const unfoldDimensions = (dataset, dimensions, encoding, options)=>{
|
|
1603
1594
|
const applyEncoding = (encoding, dimensions, datum, separator)=>{
|
1604
1595
|
if (encoding && dimensions.length) datum[encoding] = dimensions.map((dim)=>String(datum[dim.id])).join(separator);
|
1605
1596
|
};
|
1606
|
-
const emptyReshapeResult = {
|
1607
|
-
dataset: [],
|
1608
|
-
foldInfo: {
|
1609
|
-
foldMap: {},
|
1610
|
-
measureId: '',
|
1611
|
-
measureName: '',
|
1612
|
-
measureValue: ''
|
1613
|
-
},
|
1614
|
-
unfoldInfo: {
|
1615
|
-
encodingAngle: AngleEncoding,
|
1616
|
-
encodingX: XEncoding,
|
1617
|
-
encodingY: YEncoding,
|
1618
|
-
encodingDetail: DetailEncoding,
|
1619
|
-
encodingColor: ColorEncoding,
|
1620
|
-
encodingColorId: ColorIdEncoding,
|
1621
|
-
colorItems: [],
|
1622
|
-
colorIdMap: {}
|
1623
|
-
}
|
1624
|
-
};
|
1625
1597
|
const dataReshapeByEncoding = (dataset, dimensions, measures, encoding, options)=>{
|
1626
|
-
const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, colorItemAsId = false } = options || {};
|
1627
|
-
|
1628
|
-
|
1598
|
+
const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, colorItemAsId = false, colorMeasureId } = options || {};
|
1599
|
+
const { dataset: foldedDataset, foldInfo } = foldMeasures(dataset, measures, encoding, {
|
1600
|
+
measureId: foldMeasureId,
|
1601
|
+
measureName: foldMeasureName,
|
1602
|
+
measureValue: foldMeasureValue,
|
1603
|
+
colorMeasureId
|
1604
|
+
});
|
1629
1605
|
const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(foldedDataset, dimensions, encoding, {
|
1630
1606
|
foldMeasureId,
|
1631
1607
|
separator: Separator,
|
@@ -1637,6 +1613,24 @@ const dataReshapeByEncoding = (dataset, dimensions, measures, encoding, options)
|
|
1637
1613
|
unfoldInfo
|
1638
1614
|
};
|
1639
1615
|
};
|
1616
|
+
const colorAdapter = (ordinalPipe, linearPipe)=>(spec, context)=>{
|
1617
|
+
const { advancedVSeed } = context;
|
1618
|
+
if (isLinearColor(advancedVSeed)) return linearPipe(spec, context);
|
1619
|
+
return ordinalPipe(spec, context);
|
1620
|
+
};
|
1621
|
+
const isLinearColor = (advancedVSeed)=>{
|
1622
|
+
const { encoding, measures } = advancedVSeed;
|
1623
|
+
const measureIdList = findAllMeasures(measures).map((measure)=>measure.id);
|
1624
|
+
const { color } = encoding;
|
1625
|
+
return color?.length === 1 && measureIdList.includes(color[0]);
|
1626
|
+
};
|
1627
|
+
const getColorMeasureId = (advancedVSeed)=>{
|
1628
|
+
if (isLinearColor(advancedVSeed)) {
|
1629
|
+
const { encoding } = advancedVSeed;
|
1630
|
+
const { color } = encoding;
|
1631
|
+
return color?.[0];
|
1632
|
+
}
|
1633
|
+
};
|
1640
1634
|
const reshapeWithEncoding = (advancedVSeed, context)=>{
|
1641
1635
|
const result = {
|
1642
1636
|
...advancedVSeed
|
@@ -1646,7 +1640,9 @@ const reshapeWithEncoding = (advancedVSeed, context)=>{
|
|
1646
1640
|
const { dimensions, measures, encoding } = advancedVSeed;
|
1647
1641
|
if (!measures || !dimensions || !dataset || !encoding) return result;
|
1648
1642
|
if (0 === measures.length) throw new Error('measures can not be empty');
|
1649
|
-
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, measures, encoding
|
1643
|
+
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, measures, encoding, {
|
1644
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
1645
|
+
});
|
1650
1646
|
return {
|
1651
1647
|
...result,
|
1652
1648
|
dataset: newDatasets,
|
@@ -1682,7 +1678,8 @@ const pivotReshapeWithEncoding = (advancedVSeed, context)=>{
|
|
1682
1678
|
if (!measures) return;
|
1683
1679
|
const groupId = measureGroup.id;
|
1684
1680
|
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, measures, encoding, {
|
1685
|
-
foldMeasureValue: `${FoldMeasureValue}${groupId}
|
1681
|
+
foldMeasureValue: `${FoldMeasureValue}${groupId}`,
|
1682
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
1686
1683
|
});
|
1687
1684
|
const reshapeInfo = {
|
1688
1685
|
id: groupId,
|
@@ -1889,9 +1886,9 @@ const annotation_annotation = (advancedVSeed, context)=>{
|
|
1889
1886
|
};
|
1890
1887
|
const lineAdvancedPipeline = [
|
1891
1888
|
initAdvancedVSeed_initAdvancedVSeed,
|
1892
|
-
|
1889
|
+
buildMeasures,
|
1893
1890
|
autoDimensions_autoDimensions,
|
1894
|
-
|
1891
|
+
encodingForLine,
|
1895
1892
|
pivotAdapter([
|
1896
1893
|
reshapeWithEncoding
|
1897
1894
|
], [
|
@@ -1915,7 +1912,7 @@ const initLine = (spec, context)=>{
|
|
1915
1912
|
result.direction = 'vertical';
|
1916
1913
|
result.xField = unfoldInfo.encodingX;
|
1917
1914
|
result.yField = foldInfo.measureValue;
|
1918
|
-
result.seriesField = unfoldInfo.encodingColorId;
|
1915
|
+
result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
1919
1916
|
result.padding = 0;
|
1920
1917
|
result.region = [
|
1921
1918
|
{
|
@@ -1976,6 +1973,31 @@ const createSpecifiedForColorMapping = (colorMapping, colorIdMap, colorItems)=>{
|
|
1976
1973
|
...accurateMap
|
1977
1974
|
};
|
1978
1975
|
};
|
1976
|
+
const linearColor = (spec, context)=>{
|
1977
|
+
const result = {
|
1978
|
+
...spec
|
1979
|
+
};
|
1980
|
+
const { advancedVSeed } = context;
|
1981
|
+
const { datasetReshapeInfo, chartType } = advancedVSeed;
|
1982
|
+
const { unfoldInfo, id } = datasetReshapeInfo[0];
|
1983
|
+
const baseConfig = advancedVSeed.config[chartType];
|
1984
|
+
if (!baseConfig || !baseConfig.color) return result;
|
1985
|
+
const { color } = baseConfig;
|
1986
|
+
const { colorScheme, linearColorScheme } = color;
|
1987
|
+
result.color = {
|
1988
|
+
type: 'linear',
|
1989
|
+
range: linearColorScheme || colorScheme || [],
|
1990
|
+
domain: [
|
1991
|
+
{
|
1992
|
+
dataId: id,
|
1993
|
+
fields: [
|
1994
|
+
unfoldInfo.encodingColor
|
1995
|
+
]
|
1996
|
+
}
|
1997
|
+
]
|
1998
|
+
};
|
1999
|
+
return result;
|
2000
|
+
};
|
1979
2001
|
const background_backgroundColor = (spec, context)=>{
|
1980
2002
|
const result = {
|
1981
2003
|
...spec
|
@@ -2483,6 +2505,95 @@ const discreteLegend = (spec, context)=>{
|
|
2483
2505
|
};
|
2484
2506
|
return result;
|
2485
2507
|
};
|
2508
|
+
const colorLegend = (spec, context)=>{
|
2509
|
+
const result = {
|
2510
|
+
...spec
|
2511
|
+
};
|
2512
|
+
const { advancedVSeed } = context;
|
2513
|
+
const { datasetReshapeInfo, chartType } = advancedVSeed;
|
2514
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
2515
|
+
const baseConfig = advancedVSeed.config[chartType];
|
2516
|
+
if (!baseConfig || !baseConfig.legend) return result;
|
2517
|
+
const { legend } = baseConfig;
|
2518
|
+
const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight } = legend || {};
|
2519
|
+
const orient = [
|
2520
|
+
'bottom',
|
2521
|
+
'bottomLeft',
|
2522
|
+
'bottomRight',
|
2523
|
+
'bl',
|
2524
|
+
'br'
|
2525
|
+
].includes(position) ? 'bottom' : [
|
2526
|
+
'top',
|
2527
|
+
'topLeft',
|
2528
|
+
'topRight',
|
2529
|
+
'tl',
|
2530
|
+
'tr'
|
2531
|
+
].includes(position) ? 'top' : [
|
2532
|
+
'left',
|
2533
|
+
'leftTop',
|
2534
|
+
'leftBottom',
|
2535
|
+
'lt',
|
2536
|
+
'lb'
|
2537
|
+
].includes(position) ? 'left' : 'right';
|
2538
|
+
const legendPosition = [
|
2539
|
+
'topLeft',
|
2540
|
+
'bottomLeft',
|
2541
|
+
'leftTop',
|
2542
|
+
'rightTop',
|
2543
|
+
'lt',
|
2544
|
+
'rt',
|
2545
|
+
'tl',
|
2546
|
+
'bl'
|
2547
|
+
].includes(position) ? 'start' : [
|
2548
|
+
'topRight',
|
2549
|
+
'bottomRight',
|
2550
|
+
'leftBottom',
|
2551
|
+
'rightBottom',
|
2552
|
+
'lb',
|
2553
|
+
'rb',
|
2554
|
+
'rt',
|
2555
|
+
'br'
|
2556
|
+
].includes(position) ? 'end' : 'middle';
|
2557
|
+
result.legends = {
|
2558
|
+
type: 'color',
|
2559
|
+
visible: enable,
|
2560
|
+
orient,
|
2561
|
+
position: legendPosition,
|
2562
|
+
padding: 0,
|
2563
|
+
field: unfoldInfo.encodingColor,
|
2564
|
+
maxWidth: '30%',
|
2565
|
+
startText: {
|
2566
|
+
visible: true,
|
2567
|
+
style: {
|
2568
|
+
fill: labelFontColor,
|
2569
|
+
fontSize: labelFontSize,
|
2570
|
+
fontWeight: labelFontWeight
|
2571
|
+
}
|
2572
|
+
},
|
2573
|
+
endText: {
|
2574
|
+
visible: true,
|
2575
|
+
style: {
|
2576
|
+
fill: labelFontColor,
|
2577
|
+
fontSize: labelFontSize,
|
2578
|
+
fontWeight: labelFontWeight
|
2579
|
+
}
|
2580
|
+
}
|
2581
|
+
};
|
2582
|
+
return result;
|
2583
|
+
};
|
2584
|
+
const colorPointStyleFill = (stylePipe)=>(spec, context)=>{
|
2585
|
+
const result = stylePipe(spec, context);
|
2586
|
+
const { advancedVSeed } = context;
|
2587
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
2588
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
2589
|
+
if (isLinearColor(advancedVSeed)) {
|
2590
|
+
if (result?.point?.style) result.point.style.fill = {
|
2591
|
+
field: unfoldInfo.encodingColor,
|
2592
|
+
scale: 'color'
|
2593
|
+
};
|
2594
|
+
}
|
2595
|
+
return result;
|
2596
|
+
};
|
2486
2597
|
const selector_selector = (vchartDatum, selector)=>{
|
2487
2598
|
if (!selector) return true;
|
2488
2599
|
const selectorMode = 'And';
|
@@ -2579,7 +2690,10 @@ const pointStyle_pointStyle = (spec, context)=>{
|
|
2579
2690
|
const { markStyle } = advancedVSeed;
|
2580
2691
|
const { pointStyle } = markStyle;
|
2581
2692
|
const result = {
|
2582
|
-
...spec
|
2693
|
+
...spec,
|
2694
|
+
point: {
|
2695
|
+
style: {}
|
2696
|
+
}
|
2583
2697
|
};
|
2584
2698
|
if (!pointStyle) return result;
|
2585
2699
|
const pointStyles = Array.isArray(pointStyle) ? pointStyle : [
|
@@ -2623,6 +2737,7 @@ const pointStyle_pointStyle = (spec, context)=>{
|
|
2623
2737
|
return {
|
2624
2738
|
...result,
|
2625
2739
|
point: {
|
2740
|
+
...result.point,
|
2626
2741
|
state: {
|
2627
2742
|
...customMap
|
2628
2743
|
}
|
@@ -2678,15 +2793,31 @@ const pointStateHover = (spec, context)=>{
|
|
2678
2793
|
};
|
2679
2794
|
return result;
|
2680
2795
|
};
|
2796
|
+
const colorLineStyleFill = (stylePipe)=>(spec, context)=>{
|
2797
|
+
const result = stylePipe(spec, context);
|
2798
|
+
const { advancedVSeed } = context;
|
2799
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
2800
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
2801
|
+
if (isLinearColor(advancedVSeed)) {
|
2802
|
+
if (result?.line?.style) result.line.style.stroke = {
|
2803
|
+
field: unfoldInfo.encodingColor,
|
2804
|
+
scale: 'color'
|
2805
|
+
};
|
2806
|
+
}
|
2807
|
+
return result;
|
2808
|
+
};
|
2681
2809
|
const lineStyle_lineStyle = (spec, context)=>{
|
2682
2810
|
const { advancedVSeed } = context;
|
2683
2811
|
const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed;
|
2684
2812
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
2685
2813
|
const { lineStyle } = markStyle;
|
2686
|
-
if (!lineStyle) return spec;
|
2687
2814
|
const result = {
|
2688
|
-
...spec
|
2815
|
+
...spec,
|
2816
|
+
line: {
|
2817
|
+
style: {}
|
2818
|
+
}
|
2689
2819
|
};
|
2820
|
+
if (!lineStyle) return result;
|
2690
2821
|
const lineStyles = Array.isArray(lineStyle) ? lineStyle : [
|
2691
2822
|
lineStyle
|
2692
2823
|
];
|
@@ -2730,6 +2861,7 @@ const lineStyle_lineStyle = (spec, context)=>{
|
|
2730
2861
|
return {
|
2731
2862
|
...result,
|
2732
2863
|
line: {
|
2864
|
+
...result.line,
|
2733
2865
|
state: {
|
2734
2866
|
...customMap
|
2735
2867
|
}
|
@@ -3502,7 +3634,7 @@ const pivotAdapter_pivotAdapter = (pipeline, pivotPipeline)=>(spec, context)=>{
|
|
3502
3634
|
};
|
3503
3635
|
const line_line = [
|
3504
3636
|
initLine,
|
3505
|
-
color_color,
|
3637
|
+
colorAdapter(color_color, linearColor),
|
3506
3638
|
background_backgroundColor,
|
3507
3639
|
datasetXY,
|
3508
3640
|
progressive,
|
@@ -3511,10 +3643,10 @@ const line_line = [
|
|
3511
3643
|
label_label,
|
3512
3644
|
tooltip_tooltip,
|
3513
3645
|
verticalCrosshairLine,
|
3514
|
-
discreteLegend,
|
3515
|
-
pointStyle_pointStyle,
|
3646
|
+
colorAdapter(discreteLegend, colorLegend),
|
3647
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
3516
3648
|
pointStateDimensionHover,
|
3517
|
-
lineStyle_lineStyle,
|
3649
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
3518
3650
|
annotationPoint_annotationPoint,
|
3519
3651
|
annotationVerticalLine_annotationVerticalLine,
|
3520
3652
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -3555,9 +3687,51 @@ const registerLine = ()=>{
|
|
3555
3687
|
Builder._advancedPipelineMap.line = lineAdvancedPipeline;
|
3556
3688
|
Builder._specPipelineMap.line = lineSpecPipeline;
|
3557
3689
|
};
|
3690
|
+
const encodingForColumn = (advancedVSeed, context)=>{
|
3691
|
+
const { vseed } = context;
|
3692
|
+
const { dimensions } = advancedVSeed;
|
3693
|
+
if (!dimensions) return advancedVSeed;
|
3694
|
+
const encoding = vseed.encoding;
|
3695
|
+
if (encoding) {
|
3696
|
+
const x = encoding.x || [
|
3697
|
+
dimensions[0].id
|
3698
|
+
];
|
3699
|
+
const color = encoding.color || [
|
3700
|
+
(dimensions[1] || dimensions[0]).id
|
3701
|
+
];
|
3702
|
+
const detail = encoding.detail || [];
|
3703
|
+
const mergedDetail = 0 === detail.length ? (0, external_remeda_namespaceObject.unique)([
|
3704
|
+
...color,
|
3705
|
+
...detail
|
3706
|
+
]) : detail;
|
3707
|
+
return {
|
3708
|
+
...advancedVSeed,
|
3709
|
+
encoding: {
|
3710
|
+
...encoding,
|
3711
|
+
x,
|
3712
|
+
color,
|
3713
|
+
detail: mergedDetail
|
3714
|
+
}
|
3715
|
+
};
|
3716
|
+
}
|
3717
|
+
const onlyMeasureName = 1 === dimensions.length && dimensions.find((item)=>item.id === MeasureName);
|
3718
|
+
const mergedEncoding = {
|
3719
|
+
x: dimensions.slice(0, 1).map((item)=>item.id),
|
3720
|
+
color: dimensions.slice(onlyMeasureName ? 0 : 1).map((item)=>item.id),
|
3721
|
+
detail: dimensions.slice(onlyMeasureName ? 0 : 1).map((item)=>item.id),
|
3722
|
+
tooltip: dimensions.map((item)=>item.id),
|
3723
|
+
label: [],
|
3724
|
+
row: [],
|
3725
|
+
column: []
|
3726
|
+
};
|
3727
|
+
return {
|
3728
|
+
...advancedVSeed,
|
3729
|
+
encoding: mergedEncoding
|
3730
|
+
};
|
3731
|
+
};
|
3558
3732
|
const columnAdvancedPipeline = [
|
3559
3733
|
initAdvancedVSeed_initAdvancedVSeed,
|
3560
|
-
|
3734
|
+
buildMeasures,
|
3561
3735
|
autoDimensions_autoDimensions,
|
3562
3736
|
encodingForColumn,
|
3563
3737
|
pivotAdapter([
|
@@ -3597,9 +3771,14 @@ const stackCornerRadius_stackCornerRadius = (spec, context)=>{
|
|
3597
3771
|
const { advancedVSeed, vseed } = context;
|
3598
3772
|
const { chartType } = vseed;
|
3599
3773
|
const stackCornerRadius = advancedVSeed.config?.[chartType]?.stackCornerRadius;
|
3774
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
3775
|
+
const { foldInfo } = datasetReshapeInfo[0];
|
3600
3776
|
return {
|
3601
3777
|
...spec,
|
3602
|
-
stackCornerRadius
|
3778
|
+
stackCornerRadius: (_, datum)=>{
|
3779
|
+
if (datum[foldInfo.measureValue] > 0) return stackCornerRadius;
|
3780
|
+
return 0;
|
3781
|
+
}
|
3603
3782
|
};
|
3604
3783
|
};
|
3605
3784
|
const stackInverse = (spec)=>{
|
@@ -3649,6 +3828,19 @@ const verticalCrosshairRect = (spec, context)=>{
|
|
3649
3828
|
};
|
3650
3829
|
return result;
|
3651
3830
|
};
|
3831
|
+
const colorBarStyleFill = (stylePipe)=>(spec, context)=>{
|
3832
|
+
const result = stylePipe(spec, context);
|
3833
|
+
const { advancedVSeed } = context;
|
3834
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
3835
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
3836
|
+
if (isLinearColor(advancedVSeed)) {
|
3837
|
+
if (result?.bar?.style) result.bar.style.fill = {
|
3838
|
+
field: unfoldInfo.encodingColor,
|
3839
|
+
scale: 'color'
|
3840
|
+
};
|
3841
|
+
}
|
3842
|
+
return result;
|
3843
|
+
};
|
3652
3844
|
const barStyle_barStyle = (spec, context)=>{
|
3653
3845
|
const { advancedVSeed } = context;
|
3654
3846
|
const { markStyle, dataset = [] } = advancedVSeed;
|
@@ -3837,18 +4029,105 @@ const annotationAreaBand = (spec, context)=>{
|
|
3837
4029
|
cornerRadius: areaBorderRadius
|
3838
4030
|
}
|
3839
4031
|
}
|
3840
|
-
};
|
3841
|
-
});
|
4032
|
+
};
|
4033
|
+
});
|
4034
|
+
return {
|
4035
|
+
...spec,
|
4036
|
+
markArea: markArea
|
4037
|
+
};
|
4038
|
+
};
|
4039
|
+
const pivotColorLegend = (spec, context)=>{
|
4040
|
+
const result = {
|
4041
|
+
...spec
|
4042
|
+
};
|
4043
|
+
const { advancedVSeed } = context;
|
4044
|
+
const { chartType } = advancedVSeed;
|
4045
|
+
const baseConfig = advancedVSeed.config[chartType];
|
4046
|
+
if (!baseConfig || !baseConfig.legend) return result;
|
4047
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
4048
|
+
const max = Math.max(...datasetReshapeInfo.map((d)=>d.foldInfo.colorRange[1]));
|
4049
|
+
const min = Math.min(...datasetReshapeInfo.map((d)=>d.foldInfo.colorRange[0]));
|
4050
|
+
const { legend, color } = baseConfig;
|
4051
|
+
const { colorScheme, linearColorScheme } = color;
|
4052
|
+
const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight = 400 } = legend || {};
|
4053
|
+
const orient = [
|
4054
|
+
'bottom',
|
4055
|
+
'bottomLeft',
|
4056
|
+
'bottomRight',
|
4057
|
+
'bl',
|
4058
|
+
'br'
|
4059
|
+
].includes(position) ? 'bottom' : [
|
4060
|
+
'top',
|
4061
|
+
'topLeft',
|
4062
|
+
'topRight',
|
4063
|
+
'tl',
|
4064
|
+
'tr'
|
4065
|
+
].includes(position) ? 'top' : [
|
4066
|
+
'left',
|
4067
|
+
'leftTop',
|
4068
|
+
'leftBottom',
|
4069
|
+
'lt',
|
4070
|
+
'lb'
|
4071
|
+
].includes(position) ? 'left' : 'right';
|
4072
|
+
const legendPosition = [
|
4073
|
+
'topLeft',
|
4074
|
+
'bottomLeft',
|
4075
|
+
'leftTop',
|
4076
|
+
'rightTop',
|
4077
|
+
'lt',
|
4078
|
+
'rt',
|
4079
|
+
'tl',
|
4080
|
+
'bl'
|
4081
|
+
].includes(position) ? 'start' : [
|
4082
|
+
'topRight',
|
4083
|
+
'bottomRight',
|
4084
|
+
'leftBottom',
|
4085
|
+
'rightBottom',
|
4086
|
+
'lb',
|
4087
|
+
'rb',
|
4088
|
+
'rt',
|
4089
|
+
'br'
|
4090
|
+
].includes(position) ? 'end' : 'middle';
|
4091
|
+
const legends = {
|
4092
|
+
visible: enable,
|
4093
|
+
type: 'color',
|
4094
|
+
orient,
|
4095
|
+
position: legendPosition,
|
4096
|
+
colors: linearColorScheme || colorScheme || [],
|
4097
|
+
value: [
|
4098
|
+
min,
|
4099
|
+
max
|
4100
|
+
],
|
4101
|
+
min: min,
|
4102
|
+
max: max,
|
4103
|
+
maxWidth: '30%',
|
4104
|
+
startText: {
|
4105
|
+
visible: true,
|
4106
|
+
style: {
|
4107
|
+
fill: labelFontColor,
|
4108
|
+
fontSize: labelFontSize,
|
4109
|
+
fontWeight: labelFontWeight
|
4110
|
+
}
|
4111
|
+
},
|
4112
|
+
endText: {
|
4113
|
+
visible: true,
|
4114
|
+
style: {
|
4115
|
+
fill: labelFontColor,
|
4116
|
+
fontSize: labelFontSize,
|
4117
|
+
fontWeight: labelFontWeight
|
4118
|
+
}
|
4119
|
+
}
|
4120
|
+
};
|
3842
4121
|
return {
|
3843
|
-
...
|
3844
|
-
|
4122
|
+
...result,
|
4123
|
+
legends
|
3845
4124
|
};
|
3846
4125
|
};
|
3847
4126
|
const column = [
|
3848
4127
|
initColumn,
|
3849
4128
|
stackCornerRadius_stackCornerRadius,
|
3850
4129
|
stackInverse,
|
3851
|
-
color_color,
|
4130
|
+
colorAdapter(color_color, linearColor),
|
3852
4131
|
background_backgroundColor,
|
3853
4132
|
datasetXY,
|
3854
4133
|
progressive,
|
@@ -3857,8 +4136,8 @@ const column = [
|
|
3857
4136
|
label_label,
|
3858
4137
|
tooltip_tooltip,
|
3859
4138
|
verticalCrosshairRect,
|
3860
|
-
discreteLegend,
|
3861
|
-
barStyle_barStyle,
|
4139
|
+
colorAdapter(discreteLegend, colorLegend),
|
4140
|
+
colorBarStyleFill(barStyle_barStyle),
|
3862
4141
|
annotationPoint_annotationPoint,
|
3863
4142
|
annotationVerticalLine_annotationVerticalLine,
|
3864
4143
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -3873,7 +4152,7 @@ const pivotColumn = [
|
|
3873
4152
|
initColumn,
|
3874
4153
|
stackCornerRadius_stackCornerRadius,
|
3875
4154
|
stackInverse,
|
3876
|
-
color_color,
|
4155
|
+
colorAdapter(color_color, linearColor),
|
3877
4156
|
background_backgroundColor,
|
3878
4157
|
datasetXY,
|
3879
4158
|
progressive,
|
@@ -3882,7 +4161,7 @@ const pivotColumn = [
|
|
3882
4161
|
label_label,
|
3883
4162
|
tooltip_tooltip,
|
3884
4163
|
verticalCrosshairRect,
|
3885
|
-
barStyle_barStyle,
|
4164
|
+
colorBarStyleFill(barStyle_barStyle),
|
3886
4165
|
annotationPoint_annotationPoint,
|
3887
4166
|
annotationVerticalLine_annotationVerticalLine,
|
3888
4167
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -3890,7 +4169,7 @@ const pivotColumn = [
|
|
3890
4169
|
]),
|
3891
4170
|
pivotRowDimensions,
|
3892
4171
|
pivotColumnDimensions,
|
3893
|
-
pivotDiscreteLegend
|
4172
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
3894
4173
|
];
|
3895
4174
|
const columnSpecPipeline = [
|
3896
4175
|
pivotAdapter_pivotAdapter(column, pivotColumn)
|
@@ -3901,7 +4180,7 @@ const registerColumn = ()=>{
|
|
3901
4180
|
};
|
3902
4181
|
const columnParallelAdvancedPipeline = [
|
3903
4182
|
initAdvancedVSeed_initAdvancedVSeed,
|
3904
|
-
|
4183
|
+
buildMeasures,
|
3905
4184
|
autoDimensions_autoDimensions,
|
3906
4185
|
encodingForColumn,
|
3907
4186
|
pivotAdapter([
|
@@ -3946,7 +4225,7 @@ const initColumnParallel = (spec, context)=>{
|
|
3946
4225
|
const columnParallel = [
|
3947
4226
|
initColumnParallel,
|
3948
4227
|
stackCornerRadius_stackCornerRadius,
|
3949
|
-
color_color,
|
4228
|
+
colorAdapter(color_color, linearColor),
|
3950
4229
|
background_backgroundColor,
|
3951
4230
|
datasetXY,
|
3952
4231
|
progressive,
|
@@ -3954,9 +4233,9 @@ const columnParallel = [
|
|
3954
4233
|
yLinear,
|
3955
4234
|
label_label,
|
3956
4235
|
tooltip_tooltip,
|
3957
|
-
discreteLegend,
|
4236
|
+
colorAdapter(discreteLegend, colorLegend),
|
3958
4237
|
verticalCrosshairRect,
|
3959
|
-
barStyle_barStyle,
|
4238
|
+
colorBarStyleFill(barStyle_barStyle),
|
3960
4239
|
annotationPoint_annotationPoint,
|
3961
4240
|
annotationVerticalLine_annotationVerticalLine,
|
3962
4241
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -3970,7 +4249,7 @@ const pivotColumnParallel = [
|
|
3970
4249
|
pivotIndicators_pivotIndicators([
|
3971
4250
|
initColumnParallel,
|
3972
4251
|
stackCornerRadius_stackCornerRadius,
|
3973
|
-
color_color,
|
4252
|
+
colorAdapter(color_color, linearColor),
|
3974
4253
|
background_backgroundColor,
|
3975
4254
|
datasetXY,
|
3976
4255
|
progressive,
|
@@ -3979,7 +4258,7 @@ const pivotColumnParallel = [
|
|
3979
4258
|
label_label,
|
3980
4259
|
tooltip_tooltip,
|
3981
4260
|
verticalCrosshairRect,
|
3982
|
-
barStyle_barStyle,
|
4261
|
+
colorBarStyleFill(barStyle_barStyle),
|
3983
4262
|
annotationPoint_annotationPoint,
|
3984
4263
|
annotationVerticalLine_annotationVerticalLine,
|
3985
4264
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -3987,7 +4266,7 @@ const pivotColumnParallel = [
|
|
3987
4266
|
]),
|
3988
4267
|
pivotRowDimensions,
|
3989
4268
|
pivotColumnDimensions,
|
3990
|
-
pivotDiscreteLegend
|
4269
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
3991
4270
|
];
|
3992
4271
|
const columnParallelSpecPipeline = [
|
3993
4272
|
pivotAdapter_pivotAdapter(columnParallel, pivotColumnParallel)
|
@@ -3998,7 +4277,7 @@ const registerColumnParallel = ()=>{
|
|
3998
4277
|
};
|
3999
4278
|
const columnPercentAdvancedPipeline = [
|
4000
4279
|
initAdvancedVSeed_initAdvancedVSeed,
|
4001
|
-
|
4280
|
+
buildMeasures,
|
4002
4281
|
autoDimensions_autoDimensions,
|
4003
4282
|
encodingForColumn,
|
4004
4283
|
pivotAdapter([
|
@@ -4024,7 +4303,7 @@ const columnPercent = [
|
|
4024
4303
|
initColumn,
|
4025
4304
|
stackCornerRadius_stackCornerRadius,
|
4026
4305
|
stackInverse,
|
4027
|
-
color_color,
|
4306
|
+
colorAdapter(color_color, linearColor),
|
4028
4307
|
background_backgroundColor,
|
4029
4308
|
percent,
|
4030
4309
|
datasetXY,
|
@@ -4033,9 +4312,9 @@ const columnPercent = [
|
|
4033
4312
|
yLinear,
|
4034
4313
|
label_label,
|
4035
4314
|
tooltip_tooltip,
|
4315
|
+
colorAdapter(discreteLegend, colorLegend),
|
4036
4316
|
verticalCrosshairRect,
|
4037
|
-
|
4038
|
-
barStyle_barStyle,
|
4317
|
+
colorBarStyleFill(barStyle_barStyle),
|
4039
4318
|
annotationPoint_annotationPoint,
|
4040
4319
|
annotationVerticalLine_annotationVerticalLine,
|
4041
4320
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4050,7 +4329,7 @@ const pivotColumnPercent = [
|
|
4050
4329
|
initColumn,
|
4051
4330
|
stackCornerRadius_stackCornerRadius,
|
4052
4331
|
stackInverse,
|
4053
|
-
color_color,
|
4332
|
+
colorAdapter(color_color, linearColor),
|
4054
4333
|
percent,
|
4055
4334
|
background_backgroundColor,
|
4056
4335
|
datasetXY,
|
@@ -4060,7 +4339,7 @@ const pivotColumnPercent = [
|
|
4060
4339
|
label_label,
|
4061
4340
|
tooltip_tooltip,
|
4062
4341
|
verticalCrosshairRect,
|
4063
|
-
barStyle_barStyle,
|
4342
|
+
colorBarStyleFill(barStyle_barStyle),
|
4064
4343
|
annotationPoint_annotationPoint,
|
4065
4344
|
annotationVerticalLine_annotationVerticalLine,
|
4066
4345
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4068,7 +4347,7 @@ const pivotColumnPercent = [
|
|
4068
4347
|
]),
|
4069
4348
|
pivotRowDimensions,
|
4070
4349
|
pivotColumnDimensions,
|
4071
|
-
pivotDiscreteLegend
|
4350
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
4072
4351
|
];
|
4073
4352
|
const columnPercentSpecPipeline = [
|
4074
4353
|
pivotAdapter_pivotAdapter(columnPercent, pivotColumnPercent)
|
@@ -4090,10 +4369,10 @@ const encodingForBar = (advancedVSeed, context)=>{
|
|
4090
4369
|
(dimensions[1] || dimensions[0]).id
|
4091
4370
|
];
|
4092
4371
|
const detail = encoding.detail || [];
|
4093
|
-
const mergedDetail = (0, external_remeda_namespaceObject.unique)([
|
4372
|
+
const mergedDetail = 0 === detail.length ? (0, external_remeda_namespaceObject.unique)([
|
4094
4373
|
...color,
|
4095
4374
|
...detail
|
4096
|
-
]);
|
4375
|
+
]) : detail;
|
4097
4376
|
return {
|
4098
4377
|
...advancedVSeed,
|
4099
4378
|
encoding: {
|
@@ -4137,7 +4416,7 @@ const sortYBandAxis = (advancedVSeed, context)=>{
|
|
4137
4416
|
};
|
4138
4417
|
const barAdvancedPipeline = [
|
4139
4418
|
initAdvancedVSeed_initAdvancedVSeed,
|
4140
|
-
|
4419
|
+
buildMeasures,
|
4141
4420
|
autoDimensions_autoDimensions,
|
4142
4421
|
encodingForBar,
|
4143
4422
|
pivotAdapter([
|
@@ -4437,7 +4716,7 @@ const horizontalCrosshairRect = (spec, context)=>{
|
|
4437
4716
|
const bar = [
|
4438
4717
|
initBar,
|
4439
4718
|
stackCornerRadius_stackCornerRadius,
|
4440
|
-
color_color,
|
4719
|
+
colorAdapter(color_color, linearColor),
|
4441
4720
|
background_backgroundColor,
|
4442
4721
|
datasetYX,
|
4443
4722
|
progressive,
|
@@ -4445,9 +4724,9 @@ const bar = [
|
|
4445
4724
|
yBand,
|
4446
4725
|
label_label,
|
4447
4726
|
tooltip_tooltip,
|
4727
|
+
colorAdapter(discreteLegend, colorLegend),
|
4448
4728
|
horizontalCrosshairRect,
|
4449
|
-
|
4450
|
-
barStyle_barStyle,
|
4729
|
+
colorBarStyleFill(barStyle_barStyle),
|
4451
4730
|
annotationPoint_annotationPoint,
|
4452
4731
|
annotationVerticalLine_annotationVerticalLine,
|
4453
4732
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4461,7 +4740,7 @@ const pivotBar = [
|
|
4461
4740
|
pivotIndicators_pivotIndicators([
|
4462
4741
|
initBar,
|
4463
4742
|
stackCornerRadius_stackCornerRadius,
|
4464
|
-
color_color,
|
4743
|
+
colorAdapter(color_color, linearColor),
|
4465
4744
|
background_backgroundColor,
|
4466
4745
|
datasetYX,
|
4467
4746
|
progressive,
|
@@ -4470,8 +4749,8 @@ const pivotBar = [
|
|
4470
4749
|
label_label,
|
4471
4750
|
label_label,
|
4472
4751
|
tooltip_tooltip,
|
4752
|
+
colorBarStyleFill(barStyle_barStyle),
|
4473
4753
|
horizontalCrosshairRect,
|
4474
|
-
barStyle_barStyle,
|
4475
4754
|
annotationPoint_annotationPoint,
|
4476
4755
|
annotationVerticalLine_annotationVerticalLine,
|
4477
4756
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4479,7 +4758,7 @@ const pivotBar = [
|
|
4479
4758
|
]),
|
4480
4759
|
pivotRowDimensions,
|
4481
4760
|
pivotColumnDimensions,
|
4482
|
-
pivotDiscreteLegend
|
4761
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
4483
4762
|
];
|
4484
4763
|
const barSpecPipeline = [
|
4485
4764
|
pivotAdapter_pivotAdapter(bar, pivotBar)
|
@@ -4490,7 +4769,7 @@ const registerBar = ()=>{
|
|
4490
4769
|
};
|
4491
4770
|
const barParallelAdvancedPipeline = [
|
4492
4771
|
initAdvancedVSeed_initAdvancedVSeed,
|
4493
|
-
|
4772
|
+
buildMeasures,
|
4494
4773
|
autoDimensions_autoDimensions,
|
4495
4774
|
encodingForBar,
|
4496
4775
|
pivotAdapter([
|
@@ -4535,7 +4814,7 @@ const initBarParallel = (spec, context)=>{
|
|
4535
4814
|
const barParallel = [
|
4536
4815
|
initBarParallel,
|
4537
4816
|
stackCornerRadius_stackCornerRadius,
|
4538
|
-
color_color,
|
4817
|
+
colorAdapter(color_color, linearColor),
|
4539
4818
|
background_backgroundColor,
|
4540
4819
|
datasetYX,
|
4541
4820
|
progressive,
|
@@ -4543,9 +4822,9 @@ const barParallel = [
|
|
4543
4822
|
yBand,
|
4544
4823
|
label_label,
|
4545
4824
|
tooltip_tooltip,
|
4825
|
+
colorAdapter(discreteLegend, colorLegend),
|
4546
4826
|
horizontalCrosshairRect,
|
4547
|
-
|
4548
|
-
barStyle_barStyle,
|
4827
|
+
colorBarStyleFill(barStyle_barStyle),
|
4549
4828
|
annotationPoint_annotationPoint,
|
4550
4829
|
annotationVerticalLine_annotationVerticalLine,
|
4551
4830
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4559,15 +4838,15 @@ const pivotBarParallel = [
|
|
4559
4838
|
pivotIndicators_pivotIndicators([
|
4560
4839
|
initBarParallel,
|
4561
4840
|
stackCornerRadius_stackCornerRadius,
|
4562
|
-
color_color,
|
4841
|
+
colorAdapter(color_color, linearColor),
|
4563
4842
|
background_backgroundColor,
|
4564
4843
|
datasetYX,
|
4565
4844
|
xLinear,
|
4566
4845
|
yBand,
|
4567
4846
|
label_label,
|
4568
4847
|
tooltip_tooltip,
|
4848
|
+
colorBarStyleFill(barStyle_barStyle),
|
4569
4849
|
horizontalCrosshairRect,
|
4570
|
-
barStyle_barStyle,
|
4571
4850
|
annotationPoint_annotationPoint,
|
4572
4851
|
annotationVerticalLine_annotationVerticalLine,
|
4573
4852
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4575,7 +4854,7 @@ const pivotBarParallel = [
|
|
4575
4854
|
]),
|
4576
4855
|
pivotRowDimensions,
|
4577
4856
|
pivotColumnDimensions,
|
4578
|
-
pivotDiscreteLegend
|
4857
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
4579
4858
|
];
|
4580
4859
|
const barParallelSpecPipeline = [
|
4581
4860
|
pivotAdapter_pivotAdapter(barParallel, pivotBarParallel)
|
@@ -4586,7 +4865,7 @@ const registerBarParallel = ()=>{
|
|
4586
4865
|
};
|
4587
4866
|
const barPercentAdvancedPipeline = [
|
4588
4867
|
initAdvancedVSeed_initAdvancedVSeed,
|
4589
|
-
|
4868
|
+
buildMeasures,
|
4590
4869
|
autoDimensions_autoDimensions,
|
4591
4870
|
encodingForBar,
|
4592
4871
|
pivotAdapter([
|
@@ -4604,7 +4883,7 @@ const barPercentAdvancedPipeline = [
|
|
4604
4883
|
const barPercent = [
|
4605
4884
|
initBar,
|
4606
4885
|
stackCornerRadius_stackCornerRadius,
|
4607
|
-
color_color,
|
4886
|
+
colorAdapter(color_color, linearColor),
|
4608
4887
|
background_backgroundColor,
|
4609
4888
|
percent,
|
4610
4889
|
datasetYX,
|
@@ -4613,9 +4892,9 @@ const barPercent = [
|
|
4613
4892
|
yBand,
|
4614
4893
|
label_label,
|
4615
4894
|
tooltip_tooltip,
|
4895
|
+
colorAdapter(discreteLegend, colorLegend),
|
4616
4896
|
horizontalCrosshairRect,
|
4617
|
-
|
4618
|
-
barStyle_barStyle,
|
4897
|
+
colorBarStyleFill(barStyle_barStyle),
|
4619
4898
|
annotationPoint_annotationPoint,
|
4620
4899
|
annotationVerticalLine_annotationVerticalLine,
|
4621
4900
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4629,7 +4908,7 @@ const pivotBarPercent = [
|
|
4629
4908
|
pivotIndicators_pivotIndicators([
|
4630
4909
|
initBar,
|
4631
4910
|
stackCornerRadius_stackCornerRadius,
|
4632
|
-
color_color,
|
4911
|
+
colorAdapter(color_color, linearColor),
|
4633
4912
|
background_backgroundColor,
|
4634
4913
|
percent,
|
4635
4914
|
datasetYX,
|
@@ -4637,8 +4916,8 @@ const pivotBarPercent = [
|
|
4637
4916
|
xLinear,
|
4638
4917
|
label_label,
|
4639
4918
|
tooltip_tooltip,
|
4919
|
+
colorBarStyleFill(barStyle_barStyle),
|
4640
4920
|
horizontalCrosshairRect,
|
4641
|
-
barStyle_barStyle,
|
4642
4921
|
annotationPoint_annotationPoint,
|
4643
4922
|
annotationVerticalLine_annotationVerticalLine,
|
4644
4923
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4646,7 +4925,7 @@ const pivotBarPercent = [
|
|
4646
4925
|
]),
|
4647
4926
|
pivotRowDimensions,
|
4648
4927
|
pivotColumnDimensions,
|
4649
|
-
pivotDiscreteLegend
|
4928
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
4650
4929
|
];
|
4651
4930
|
const barPercentSpecPipeline = [
|
4652
4931
|
pivotAdapter_pivotAdapter(barPercent, pivotBarPercent)
|
@@ -4657,7 +4936,7 @@ const registerBarPercent = ()=>{
|
|
4657
4936
|
};
|
4658
4937
|
const areaAdvancedPipeline = [
|
4659
4938
|
initAdvancedVSeed_initAdvancedVSeed,
|
4660
|
-
|
4939
|
+
buildMeasures,
|
4661
4940
|
autoDimensions_autoDimensions,
|
4662
4941
|
encodingForColumn,
|
4663
4942
|
pivotAdapter([
|
@@ -4683,7 +4962,7 @@ const initArea = (spec, context)=>{
|
|
4683
4962
|
result.direction = 'vertical';
|
4684
4963
|
result.yField = foldInfo.measureValue;
|
4685
4964
|
result.xField = unfoldInfo.encodingX;
|
4686
|
-
result.seriesField = unfoldInfo.encodingColorId;
|
4965
|
+
result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
4687
4966
|
result.padding = 0;
|
4688
4967
|
result.region = [
|
4689
4968
|
{
|
@@ -4693,20 +4972,32 @@ const initArea = (spec, context)=>{
|
|
4693
4972
|
result.animation = true;
|
4694
4973
|
return result;
|
4695
4974
|
};
|
4975
|
+
const colorAreaStyleFill = (stylePipe)=>(spec, context)=>{
|
4976
|
+
const result = stylePipe(spec, context);
|
4977
|
+
const { advancedVSeed } = context;
|
4978
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
4979
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
4980
|
+
if (isLinearColor(advancedVSeed)) {
|
4981
|
+
if (result?.area?.style) result.area.style.fill = {
|
4982
|
+
field: unfoldInfo.encodingColor,
|
4983
|
+
scale: 'color'
|
4984
|
+
};
|
4985
|
+
}
|
4986
|
+
return result;
|
4987
|
+
};
|
4696
4988
|
const areaStyle_areaStyle = (spec, context)=>{
|
4697
4989
|
const { advancedVSeed } = context;
|
4698
4990
|
const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed;
|
4699
4991
|
const { areaStyle } = markStyle;
|
4700
4992
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
4701
|
-
|
4993
|
+
const result = {
|
4702
4994
|
...spec,
|
4703
4995
|
area: {
|
4704
|
-
visible: true
|
4996
|
+
visible: true,
|
4997
|
+
style: {}
|
4705
4998
|
}
|
4706
4999
|
};
|
4707
|
-
|
4708
|
-
...spec
|
4709
|
-
};
|
5000
|
+
if (!areaStyle) return result;
|
4710
5001
|
const areaStyles = Array.isArray(areaStyle) ? areaStyle : [
|
4711
5002
|
areaStyle
|
4712
5003
|
];
|
@@ -4734,6 +5025,7 @@ const areaStyle_areaStyle = (spec, context)=>{
|
|
4734
5025
|
return {
|
4735
5026
|
...result,
|
4736
5027
|
area: {
|
5028
|
+
...result.area,
|
4737
5029
|
visible: true,
|
4738
5030
|
state: {
|
4739
5031
|
...customMap
|
@@ -4744,7 +5036,7 @@ const areaStyle_areaStyle = (spec, context)=>{
|
|
4744
5036
|
const area_area = [
|
4745
5037
|
initArea,
|
4746
5038
|
stackInverse,
|
4747
|
-
color_color,
|
5039
|
+
colorAdapter(color_color, linearColor),
|
4748
5040
|
background_backgroundColor,
|
4749
5041
|
datasetXY,
|
4750
5042
|
progressive,
|
@@ -4752,12 +5044,12 @@ const area_area = [
|
|
4752
5044
|
yLinear,
|
4753
5045
|
label_label,
|
4754
5046
|
tooltip_tooltip,
|
5047
|
+
colorAdapter(discreteLegend, colorLegend),
|
4755
5048
|
verticalCrosshairLine,
|
4756
|
-
|
4757
|
-
pointStyle_pointStyle,
|
5049
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
4758
5050
|
pointStateDimensionHover,
|
4759
|
-
lineStyle_lineStyle,
|
4760
|
-
areaStyle_areaStyle,
|
5051
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
5052
|
+
colorAreaStyleFill(areaStyle_areaStyle),
|
4761
5053
|
annotationPoint_annotationPoint,
|
4762
5054
|
annotationVerticalLine_annotationVerticalLine,
|
4763
5055
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4770,7 +5062,7 @@ const pivotArea = [
|
|
4770
5062
|
datasetPivot,
|
4771
5063
|
pivotIndicators_pivotIndicators([
|
4772
5064
|
initArea,
|
4773
|
-
color_color,
|
5065
|
+
colorAdapter(color_color, linearColor),
|
4774
5066
|
background_backgroundColor,
|
4775
5067
|
stackInverse,
|
4776
5068
|
datasetXY,
|
@@ -4780,10 +5072,10 @@ const pivotArea = [
|
|
4780
5072
|
label_label,
|
4781
5073
|
tooltip_tooltip,
|
4782
5074
|
verticalCrosshairLine,
|
4783
|
-
pointStyle_pointStyle,
|
5075
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
4784
5076
|
pointStateDimensionHover,
|
4785
|
-
lineStyle_lineStyle,
|
4786
|
-
areaStyle_areaStyle,
|
5077
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
5078
|
+
colorAreaStyleFill(areaStyle_areaStyle),
|
4787
5079
|
annotationPoint_annotationPoint,
|
4788
5080
|
annotationVerticalLine_annotationVerticalLine,
|
4789
5081
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4791,7 +5083,7 @@ const pivotArea = [
|
|
4791
5083
|
]),
|
4792
5084
|
pivotRowDimensions,
|
4793
5085
|
pivotColumnDimensions,
|
4794
|
-
pivotDiscreteLegend
|
5086
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
4795
5087
|
];
|
4796
5088
|
const areaSpecPipeline = [
|
4797
5089
|
pivotAdapter_pivotAdapter(area_area, pivotArea)
|
@@ -4802,7 +5094,7 @@ const registerArea = ()=>{
|
|
4802
5094
|
};
|
4803
5095
|
const areaPercentAdvancedPipeline = [
|
4804
5096
|
initAdvancedVSeed_initAdvancedVSeed,
|
4805
|
-
|
5097
|
+
buildMeasures,
|
4806
5098
|
autoDimensions_autoDimensions,
|
4807
5099
|
encodingForColumn,
|
4808
5100
|
pivotAdapter([
|
@@ -4820,7 +5112,7 @@ const areaPercentAdvancedPipeline = [
|
|
4820
5112
|
const areaPercent = [
|
4821
5113
|
initArea,
|
4822
5114
|
stackInverse,
|
4823
|
-
color_color,
|
5115
|
+
colorAdapter(color_color, linearColor),
|
4824
5116
|
background_backgroundColor,
|
4825
5117
|
percent,
|
4826
5118
|
datasetXY,
|
@@ -4829,11 +5121,12 @@ const areaPercent = [
|
|
4829
5121
|
yLinear,
|
4830
5122
|
label_label,
|
4831
5123
|
tooltip_tooltip,
|
5124
|
+
colorAdapter(discreteLegend, colorLegend),
|
4832
5125
|
verticalCrosshairLine,
|
4833
|
-
|
4834
|
-
|
4835
|
-
lineStyle_lineStyle,
|
4836
|
-
areaStyle_areaStyle,
|
5126
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
5127
|
+
pointStateDimensionHover,
|
5128
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
5129
|
+
colorAreaStyleFill(areaStyle_areaStyle),
|
4837
5130
|
annotationPoint_annotationPoint,
|
4838
5131
|
annotationVerticalLine_annotationVerticalLine,
|
4839
5132
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4847,7 +5140,7 @@ const pivotAreaPercent = [
|
|
4847
5140
|
pivotIndicators_pivotIndicators([
|
4848
5141
|
initArea,
|
4849
5142
|
stackInverse,
|
4850
|
-
color_color,
|
5143
|
+
colorAdapter(color_color, linearColor),
|
4851
5144
|
background_backgroundColor,
|
4852
5145
|
percent,
|
4853
5146
|
datasetXY,
|
@@ -4857,9 +5150,10 @@ const pivotAreaPercent = [
|
|
4857
5150
|
label_label,
|
4858
5151
|
tooltip_tooltip,
|
4859
5152
|
verticalCrosshairLine,
|
4860
|
-
pointStyle_pointStyle,
|
4861
|
-
|
4862
|
-
|
5153
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
5154
|
+
pointStateDimensionHover,
|
5155
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
5156
|
+
colorAreaStyleFill(areaStyle_areaStyle),
|
4863
5157
|
annotationPoint_annotationPoint,
|
4864
5158
|
annotationVerticalLine_annotationVerticalLine,
|
4865
5159
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4867,7 +5161,7 @@ const pivotAreaPercent = [
|
|
4867
5161
|
]),
|
4868
5162
|
pivotRowDimensions,
|
4869
5163
|
pivotColumnDimensions,
|
4870
|
-
pivotDiscreteLegend
|
5164
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
4871
5165
|
];
|
4872
5166
|
const areaPercentSpecPipeline = [
|
4873
5167
|
pivotAdapter_pivotAdapter(areaPercent, pivotAreaPercent)
|
@@ -4876,95 +5170,105 @@ const registerAreaPercent = ()=>{
|
|
4876
5170
|
Builder._advancedPipelineMap.areaPercent = areaPercentAdvancedPipeline;
|
4877
5171
|
Builder._specPipelineMap.areaPercent = areaPercentSpecPipeline;
|
4878
5172
|
};
|
4879
|
-
const
|
4880
|
-
const result = {
|
4881
|
-
...advancedVSeed
|
4882
|
-
};
|
5173
|
+
const buildMeasuresForScatter = (advancedVSeed, context)=>{
|
4883
5174
|
const { vseed } = context;
|
4884
|
-
|
4885
|
-
|
4886
|
-
|
4887
|
-
if (scatterMeasures) {
|
4888
|
-
result.measures = scatterMeasuresToMeasureTree(scatterMeasures);
|
4889
|
-
return result;
|
5175
|
+
if (isMeasureTreeWithChildren(vseed)) {
|
5176
|
+
advancedVSeed.measures = vseed.measures;
|
5177
|
+
return advancedVSeed;
|
4890
5178
|
}
|
4891
|
-
if (
|
4892
|
-
|
4893
|
-
return
|
5179
|
+
if (isMeasureTreeWithParentId(vseed)) {
|
5180
|
+
advancedVSeed.measures = buildMeasuresForScatter_generateMeasuresByParentId(vseed.measures);
|
5181
|
+
return advancedVSeed;
|
4894
5182
|
}
|
4895
|
-
const
|
4896
|
-
const
|
4897
|
-
|
4898
|
-
|
4899
|
-
|
4900
|
-
|
4901
|
-
|
4902
|
-
|
4903
|
-
|
4904
|
-
]
|
4905
|
-
|
4906
|
-
|
4907
|
-
|
4908
|
-
|
4909
|
-
|
4910
|
-
|
4911
|
-
|
4912
|
-
|
4913
|
-
|
4914
|
-
|
4915
|
-
|
4916
|
-
else if (newMeasures.length > 1) result.measures = [
|
4917
|
-
{
|
4918
|
-
id: 'primary',
|
4919
|
-
alias: 'primary',
|
4920
|
-
children: newMeasures.slice(0, 1)
|
4921
|
-
},
|
5183
|
+
const basicMeasures = getBasicMeasures(vseed);
|
5184
|
+
const scatterMeasures = vseed.scatterMeasures ? vseed.scatterMeasures : basicMeasuresToScatterMeasures(basicMeasures);
|
5185
|
+
advancedVSeed.measures = scatterMeasuresToMeasureTree(scatterMeasures);
|
5186
|
+
return advancedVSeed;
|
5187
|
+
};
|
5188
|
+
const basicMeasuresToScatterMeasures = (basicMeasures)=>{
|
5189
|
+
const yMeasures = [];
|
5190
|
+
const xMeasures = [];
|
5191
|
+
for(let index = 0; index < basicMeasures.length; index++){
|
5192
|
+
const item = basicMeasures[index];
|
5193
|
+
const encoding = Array.isArray(item.encoding) ? item.encoding : [
|
5194
|
+
item.encoding
|
5195
|
+
];
|
5196
|
+
const isYAxis = encoding.includes('yAxis');
|
5197
|
+
const isXAxis = encoding.includes('xAxis');
|
5198
|
+
if (isYAxis) yMeasures.push(item);
|
5199
|
+
else if (isXAxis) xMeasures.push(item);
|
5200
|
+
else if (0 === index) yMeasures.push(item);
|
5201
|
+
else xMeasures.push(item);
|
5202
|
+
}
|
5203
|
+
return [
|
4922
5204
|
{
|
4923
|
-
id: '
|
4924
|
-
|
4925
|
-
|
5205
|
+
id: 'scatterMeasures',
|
5206
|
+
xMeasures,
|
5207
|
+
yMeasures
|
4926
5208
|
}
|
4927
5209
|
];
|
4928
|
-
return result;
|
4929
5210
|
};
|
4930
5211
|
const scatterMeasuresToMeasureTree = (scatterMeasures)=>{
|
4931
5212
|
const measureTree = scatterMeasures.map((item, index)=>{
|
4932
|
-
const { xMeasures, yMeasures } = item;
|
5213
|
+
const { id, xMeasures, yMeasures } = item;
|
4933
5214
|
const groupChildren = [];
|
4934
|
-
let
|
5215
|
+
let groupId = `${id}-`;
|
4935
5216
|
if (xMeasures) {
|
4936
|
-
const
|
5217
|
+
const arrPrimaryMeasures = Array.isArray(xMeasures) ? xMeasures : [
|
4937
5218
|
xMeasures
|
4938
5219
|
];
|
4939
|
-
const alias =
|
4940
|
-
|
5220
|
+
const alias = arrPrimaryMeasures.map((item)=>item.alias || item.id).toString();
|
5221
|
+
groupId += alias;
|
4941
5222
|
groupChildren.push({
|
4942
5223
|
id: `${index}-x`,
|
4943
|
-
alias:
|
4944
|
-
children:
|
5224
|
+
alias: arrPrimaryMeasures.map((item)=>item.alias || item.id).toString(),
|
5225
|
+
children: arrPrimaryMeasures
|
4945
5226
|
});
|
4946
5227
|
}
|
4947
5228
|
if (yMeasures) {
|
4948
|
-
const
|
5229
|
+
const arrSecondaryMeasures = Array.isArray(yMeasures) ? yMeasures : [
|
4949
5230
|
yMeasures
|
4950
5231
|
];
|
4951
|
-
const alias =
|
4952
|
-
|
5232
|
+
const alias = arrSecondaryMeasures.map((item)=>item.alias || item.id).toString();
|
5233
|
+
groupId += alias;
|
4953
5234
|
groupChildren.push({
|
4954
5235
|
id: `${index}-y`,
|
4955
|
-
alias:
|
4956
|
-
children:
|
5236
|
+
alias: arrSecondaryMeasures.map((item)=>item.alias || item.id).toString(),
|
5237
|
+
children: arrSecondaryMeasures
|
4957
5238
|
});
|
4958
5239
|
}
|
4959
5240
|
return {
|
4960
|
-
id,
|
4961
|
-
alias:
|
5241
|
+
id: groupId,
|
5242
|
+
alias: groupId,
|
4962
5243
|
children: groupChildren
|
4963
5244
|
};
|
4964
5245
|
});
|
4965
5246
|
if (1 === scatterMeasures.length) return measureTree[0].children || [];
|
4966
5247
|
return measureTree;
|
4967
5248
|
};
|
5249
|
+
const buildMeasuresForScatter_generateMeasuresByParentId = (measures)=>{
|
5250
|
+
const scatterMeasures = [];
|
5251
|
+
measures.forEach((item)=>{
|
5252
|
+
if (!item.parentId) return;
|
5253
|
+
if (!scatterMeasures.find((d)=>d.id === item.parentId)) scatterMeasures.push({
|
5254
|
+
id: item.parentId,
|
5255
|
+
yMeasures: [],
|
5256
|
+
xMeasures: []
|
5257
|
+
});
|
5258
|
+
const scatterChart = scatterMeasures.find((d)=>d.id === item.parentId);
|
5259
|
+
if (!scatterChart || !Array.isArray(scatterChart.yMeasures) || !Array.isArray(scatterChart.xMeasures)) return;
|
5260
|
+
const encoding = Array.isArray(item.encoding) ? item.encoding : [
|
5261
|
+
item.encoding
|
5262
|
+
];
|
5263
|
+
const isY = encoding.includes('yAxis');
|
5264
|
+
const isX = encoding.includes('xAxis');
|
5265
|
+
if (isY) scatterChart.yMeasures.push(item);
|
5266
|
+
else if (isX) scatterChart.xMeasures.push(item);
|
5267
|
+
else if (!isY && !isX) if (0 === scatterChart.yMeasures.length) scatterChart.yMeasures.push(item);
|
5268
|
+
else scatterChart.xMeasures.push(item);
|
5269
|
+
});
|
5270
|
+
return scatterMeasuresToMeasureTree(scatterMeasures);
|
5271
|
+
};
|
4968
5272
|
const encodingForScatter = (advancedVSeed, context)=>{
|
4969
5273
|
const { vseed } = context;
|
4970
5274
|
const { dimensions } = advancedVSeed;
|
@@ -4975,10 +5279,10 @@ const encodingForScatter = (advancedVSeed, context)=>{
|
|
4975
5279
|
const color = encoding.color || [
|
4976
5280
|
(dimensions[1] || dimensions[0]).id
|
4977
5281
|
];
|
4978
|
-
const mergedDetail = (0, external_remeda_namespaceObject.unique)([
|
5282
|
+
const mergedDetail = 0 === detail.length ? (0, external_remeda_namespaceObject.unique)([
|
4979
5283
|
...color,
|
4980
5284
|
...detail
|
4981
|
-
]);
|
5285
|
+
]) : detail;
|
4982
5286
|
return {
|
4983
5287
|
...advancedVSeed,
|
4984
5288
|
encoding: {
|
@@ -5020,7 +5324,8 @@ const reshapeWithScatterEncoding = (advancedVSeed, context)=>{
|
|
5020
5324
|
if (xMeasures && xMeasures.children) {
|
5021
5325
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, xMeasures.children, encoding, {
|
5022
5326
|
foldMeasureValue: FoldXMeasureValue,
|
5023
|
-
colorItemAsId: true
|
5327
|
+
colorItemAsId: true,
|
5328
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
5024
5329
|
});
|
5025
5330
|
datasets.push(newDataset);
|
5026
5331
|
foldInfoList.push(foldInfo);
|
@@ -5029,7 +5334,8 @@ const reshapeWithScatterEncoding = (advancedVSeed, context)=>{
|
|
5029
5334
|
if (yMeasures && yMeasures.children) {
|
5030
5335
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(datasets[0], dimensions, yMeasures.children, encoding, {
|
5031
5336
|
foldMeasureValue: FoldYMeasureValue,
|
5032
|
-
colorItemAsId: true
|
5337
|
+
colorItemAsId: true,
|
5338
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
5033
5339
|
});
|
5034
5340
|
datasets[0] = newDataset;
|
5035
5341
|
foldInfoList.push(foldInfo);
|
@@ -5084,7 +5390,8 @@ const pivotReshapeWithScatterEncoding = (advancedVSeed, context)=>{
|
|
5084
5390
|
if (xMeasures && xMeasures.children) {
|
5085
5391
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, xMeasures.children, encoding, {
|
5086
5392
|
foldMeasureValue: `${FoldXMeasureValue}${index}`,
|
5087
|
-
colorItemAsId: true
|
5393
|
+
colorItemAsId: true,
|
5394
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
5088
5395
|
});
|
5089
5396
|
datasets.push(newDataset);
|
5090
5397
|
foldInfoList.push(foldInfo);
|
@@ -5093,7 +5400,8 @@ const pivotReshapeWithScatterEncoding = (advancedVSeed, context)=>{
|
|
5093
5400
|
if (yMeasures && yMeasures.children) {
|
5094
5401
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, yMeasures.children, encoding, {
|
5095
5402
|
foldMeasureValue: `${FoldYMeasureValue}${index}`,
|
5096
|
-
colorItemAsId: true
|
5403
|
+
colorItemAsId: true,
|
5404
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
5097
5405
|
});
|
5098
5406
|
datasets.push(newDataset);
|
5099
5407
|
foldInfoList.push(foldInfo);
|
@@ -5128,7 +5436,7 @@ const pivotReshapeWithScatterEncoding = (advancedVSeed, context)=>{
|
|
5128
5436
|
};
|
5129
5437
|
const scatterAdvancedPipeline = [
|
5130
5438
|
initAdvancedVSeed_initAdvancedVSeed,
|
5131
|
-
|
5439
|
+
buildMeasuresForScatter,
|
5132
5440
|
autoDimensions_autoDimensions,
|
5133
5441
|
encodingForScatter,
|
5134
5442
|
pivotAdapter([
|
@@ -5222,7 +5530,7 @@ const horizontalCrosshairLine = (spec, context)=>{
|
|
5222
5530
|
};
|
5223
5531
|
const scatter = [
|
5224
5532
|
initScatter,
|
5225
|
-
color_color,
|
5533
|
+
colorAdapter(color_color, linearColor),
|
5226
5534
|
background_backgroundColor,
|
5227
5535
|
datasetScatter,
|
5228
5536
|
progressive,
|
@@ -5230,10 +5538,10 @@ const scatter = [
|
|
5230
5538
|
yLinear,
|
5231
5539
|
label_label,
|
5232
5540
|
tooltip_tooltip,
|
5541
|
+
colorAdapter(discreteLegend, colorLegend),
|
5233
5542
|
verticalCrosshairLine,
|
5234
5543
|
horizontalCrosshairLine,
|
5235
|
-
|
5236
|
-
pointStyle_pointStyle,
|
5544
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
5237
5545
|
pointStateHover,
|
5238
5546
|
annotationPoint_annotationPoint,
|
5239
5547
|
annotationVerticalLine_annotationVerticalLine,
|
@@ -5247,7 +5555,7 @@ const pivotScatter = [
|
|
5247
5555
|
datasetPivot,
|
5248
5556
|
pivotIndicators_pivotIndicators([
|
5249
5557
|
initScatter,
|
5250
|
-
color_color,
|
5558
|
+
colorAdapter(color_color, linearColor),
|
5251
5559
|
background_backgroundColor,
|
5252
5560
|
datasetScatter,
|
5253
5561
|
progressive,
|
@@ -5257,7 +5565,7 @@ const pivotScatter = [
|
|
5257
5565
|
tooltip_tooltip,
|
5258
5566
|
verticalCrosshairLine,
|
5259
5567
|
horizontalCrosshairLine,
|
5260
|
-
pointStyle_pointStyle,
|
5568
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
5261
5569
|
pointStateHover,
|
5262
5570
|
annotationPoint_annotationPoint,
|
5263
5571
|
annotationVerticalLine_annotationVerticalLine,
|
@@ -5275,68 +5583,55 @@ const registerScatter = ()=>{
|
|
5275
5583
|
Builder._advancedPipelineMap.scatter = scatterAdvancedPipeline;
|
5276
5584
|
Builder._specPipelineMap.scatter = scatterSpecPipeline;
|
5277
5585
|
};
|
5278
|
-
const
|
5279
|
-
const result = {
|
5280
|
-
...advancedVSeed
|
5281
|
-
};
|
5586
|
+
const buildMeasuresForDualAxis = (advancedVSeed, context)=>{
|
5282
5587
|
const { vseed } = context;
|
5283
|
-
|
5284
|
-
|
5285
|
-
|
5286
|
-
if (dualMeasures) {
|
5287
|
-
result.measures = dualMeasuresToMeasureTree(dualMeasures);
|
5288
|
-
return result;
|
5588
|
+
if (isMeasureTreeWithChildren(vseed)) {
|
5589
|
+
advancedVSeed.measures = vseed.measures;
|
5590
|
+
return advancedVSeed;
|
5289
5591
|
}
|
5290
|
-
if (
|
5291
|
-
|
5292
|
-
return
|
5592
|
+
if (isMeasureTreeWithParentId(vseed)) {
|
5593
|
+
advancedVSeed.measures = buildMeasuresForDualAxis_generateMeasuresByParentId(vseed.measures);
|
5594
|
+
return advancedVSeed;
|
5293
5595
|
}
|
5294
|
-
const
|
5295
|
-
const
|
5296
|
-
|
5297
|
-
|
5298
|
-
|
5299
|
-
|
5300
|
-
|
5301
|
-
|
5302
|
-
|
5303
|
-
]
|
5304
|
-
|
5305
|
-
|
5306
|
-
|
5307
|
-
|
5308
|
-
|
5309
|
-
|
5310
|
-
|
5311
|
-
|
5312
|
-
|
5313
|
-
|
5314
|
-
|
5315
|
-
else if (newMeasures.length > 1) result.measures = [
|
5316
|
-
{
|
5317
|
-
id: 'primary',
|
5318
|
-
alias: 'primary',
|
5319
|
-
children: newMeasures.slice(0, 1)
|
5320
|
-
},
|
5596
|
+
const basicMeasures = getBasicMeasures(vseed);
|
5597
|
+
const dualMeasures = vseed.dualMeasures ? vseed.dualMeasures : basicMeasuresToDualMeasures(basicMeasures);
|
5598
|
+
advancedVSeed.measures = dualMeasuresToMeasureTree(dualMeasures);
|
5599
|
+
return advancedVSeed;
|
5600
|
+
};
|
5601
|
+
const basicMeasuresToDualMeasures = (basicMeasures)=>{
|
5602
|
+
const primaryMeasures = [];
|
5603
|
+
const secondaryMeasures = [];
|
5604
|
+
for(let index = 0; index < basicMeasures.length; index++){
|
5605
|
+
const item = basicMeasures[index];
|
5606
|
+
const encoding = Array.isArray(item.encoding) ? item.encoding : [
|
5607
|
+
item.encoding
|
5608
|
+
];
|
5609
|
+
const isPrimaryYAxis = encoding.includes('primaryYAxis');
|
5610
|
+
const isSecondaryYAxis = encoding.includes('secondaryYAxis');
|
5611
|
+
if (isPrimaryYAxis) primaryMeasures.push(item);
|
5612
|
+
else if (isSecondaryYAxis) secondaryMeasures.push(item);
|
5613
|
+
else if (0 === index) primaryMeasures.push(item);
|
5614
|
+
else secondaryMeasures.push(item);
|
5615
|
+
}
|
5616
|
+
return [
|
5321
5617
|
{
|
5322
|
-
id: '
|
5323
|
-
|
5324
|
-
|
5618
|
+
id: 'dualMeasures',
|
5619
|
+
primaryMeasures,
|
5620
|
+
secondaryMeasures
|
5325
5621
|
}
|
5326
5622
|
];
|
5327
|
-
return result;
|
5328
5623
|
};
|
5329
5624
|
const dualMeasuresToMeasureTree = (dualMeasures)=>{
|
5330
5625
|
const measureTree = dualMeasures.map((item, index)=>{
|
5331
|
-
const { primaryMeasures, secondaryMeasures } = item;
|
5626
|
+
const { id, primaryMeasures, secondaryMeasures } = item;
|
5332
5627
|
const groupChildren = [];
|
5333
|
-
let
|
5628
|
+
let groupId = `${id}-`;
|
5334
5629
|
if (primaryMeasures) {
|
5335
5630
|
const arrPrimaryMeasures = Array.isArray(primaryMeasures) ? primaryMeasures : [
|
5336
5631
|
primaryMeasures
|
5337
5632
|
];
|
5338
5633
|
const alias = arrPrimaryMeasures.map((item)=>item.alias || item.id).toString();
|
5339
|
-
|
5634
|
+
groupId += alias;
|
5340
5635
|
groupChildren.push({
|
5341
5636
|
id: `${index}-primary`,
|
5342
5637
|
alias: arrPrimaryMeasures.map((item)=>item.alias || item.id).toString(),
|
@@ -5348,7 +5643,7 @@ const dualMeasuresToMeasureTree = (dualMeasures)=>{
|
|
5348
5643
|
secondaryMeasures
|
5349
5644
|
];
|
5350
5645
|
const alias = arrSecondaryMeasures.map((item)=>item.alias || item.id).toString();
|
5351
|
-
|
5646
|
+
groupId += alias;
|
5352
5647
|
groupChildren.push({
|
5353
5648
|
id: `${index}-secondary`,
|
5354
5649
|
alias: arrSecondaryMeasures.map((item)=>item.alias || item.id).toString(),
|
@@ -5356,14 +5651,37 @@ const dualMeasuresToMeasureTree = (dualMeasures)=>{
|
|
5356
5651
|
});
|
5357
5652
|
}
|
5358
5653
|
return {
|
5359
|
-
id,
|
5360
|
-
alias:
|
5654
|
+
id: groupId,
|
5655
|
+
alias: groupId,
|
5361
5656
|
children: groupChildren
|
5362
5657
|
};
|
5363
5658
|
});
|
5364
5659
|
if (1 === dualMeasures.length) return measureTree[0].children || [];
|
5365
5660
|
return measureTree;
|
5366
5661
|
};
|
5662
|
+
const buildMeasuresForDualAxis_generateMeasuresByParentId = (measures)=>{
|
5663
|
+
const dualMeasures = [];
|
5664
|
+
measures.forEach((item)=>{
|
5665
|
+
if (!item.parentId) return;
|
5666
|
+
if (!dualMeasures.find((d)=>d.id === item.parentId)) dualMeasures.push({
|
5667
|
+
id: item.parentId,
|
5668
|
+
primaryMeasures: [],
|
5669
|
+
secondaryMeasures: []
|
5670
|
+
});
|
5671
|
+
const dualChart = dualMeasures.find((d)=>d.id === item.parentId);
|
5672
|
+
if (!dualChart || !Array.isArray(dualChart.primaryMeasures) || !Array.isArray(dualChart.secondaryMeasures)) return;
|
5673
|
+
const encoding = Array.isArray(item.encoding) ? item.encoding : [
|
5674
|
+
item.encoding
|
5675
|
+
];
|
5676
|
+
const isPrimary = encoding.includes('primaryYAxis');
|
5677
|
+
const isSecondary = encoding.includes('secondaryYAxis');
|
5678
|
+
if (isPrimary) dualChart.primaryMeasures.push(item);
|
5679
|
+
else if (isSecondary) dualChart.secondaryMeasures.push(item);
|
5680
|
+
else if (!isPrimary && !isSecondary) if (0 === dualChart.primaryMeasures.length) dualChart.primaryMeasures.push(item);
|
5681
|
+
else dualChart.secondaryMeasures.push(item);
|
5682
|
+
});
|
5683
|
+
return dualMeasuresToMeasureTree(dualMeasures);
|
5684
|
+
};
|
5367
5685
|
const encodingForDualAxis = (advancedVSeed, context)=>{
|
5368
5686
|
const { vseed } = context;
|
5369
5687
|
const { dimensions } = advancedVSeed;
|
@@ -5377,10 +5695,10 @@ const encodingForDualAxis = (advancedVSeed, context)=>{
|
|
5377
5695
|
(dimensions[1] || dimensions[0]).id
|
5378
5696
|
];
|
5379
5697
|
const detail = encoding.detail || [];
|
5380
|
-
const mergedDetail = (0, external_remeda_namespaceObject.unique)([
|
5698
|
+
const mergedDetail = 0 === detail.length ? (0, external_remeda_namespaceObject.unique)([
|
5381
5699
|
...color,
|
5382
5700
|
...detail
|
5383
|
-
]);
|
5701
|
+
]) : detail;
|
5384
5702
|
return {
|
5385
5703
|
...advancedVSeed,
|
5386
5704
|
encoding: {
|
@@ -5422,7 +5740,8 @@ const reshapeWithDualEncoding = (advancedVSeed, context)=>{
|
|
5422
5740
|
const secondaryMeasures = measures[1] || [];
|
5423
5741
|
if (primaryMeasures && primaryMeasures.children) {
|
5424
5742
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, primaryMeasures.children, encoding, {
|
5425
|
-
foldMeasureValue: FoldPrimaryMeasureValue
|
5743
|
+
foldMeasureValue: FoldPrimaryMeasureValue,
|
5744
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
5426
5745
|
});
|
5427
5746
|
datasets.push(newDataset);
|
5428
5747
|
foldInfoList.push(foldInfo);
|
@@ -5430,7 +5749,8 @@ const reshapeWithDualEncoding = (advancedVSeed, context)=>{
|
|
5430
5749
|
}
|
5431
5750
|
if (secondaryMeasures && secondaryMeasures.children) {
|
5432
5751
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, secondaryMeasures.children, encoding, {
|
5433
|
-
foldMeasureValue: FoldSecondaryMeasureValue
|
5752
|
+
foldMeasureValue: FoldSecondaryMeasureValue,
|
5753
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
5434
5754
|
});
|
5435
5755
|
datasets.push(newDataset);
|
5436
5756
|
foldInfoList.push(foldInfo);
|
@@ -5484,7 +5804,8 @@ const pivotReshapeWithDualEncoding = (advancedVSeed, context)=>{
|
|
5484
5804
|
const secondaryMeasures = measures[1] || [];
|
5485
5805
|
if (primaryMeasures && primaryMeasures.children) {
|
5486
5806
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, primaryMeasures.children, encoding, {
|
5487
|
-
foldMeasureValue: `${FoldPrimaryMeasureValue}${index}
|
5807
|
+
foldMeasureValue: `${FoldPrimaryMeasureValue}${index}`,
|
5808
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
5488
5809
|
});
|
5489
5810
|
datasets.push(newDataset);
|
5490
5811
|
foldInfoList.push(foldInfo);
|
@@ -5492,7 +5813,8 @@ const pivotReshapeWithDualEncoding = (advancedVSeed, context)=>{
|
|
5492
5813
|
}
|
5493
5814
|
if (secondaryMeasures && secondaryMeasures.children) {
|
5494
5815
|
const { dataset: newDataset, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, dimensions, secondaryMeasures.children, encoding, {
|
5495
|
-
foldMeasureValue: `${FoldSecondaryMeasureValue}${index}
|
5816
|
+
foldMeasureValue: `${FoldSecondaryMeasureValue}${index}`,
|
5817
|
+
colorMeasureId: getColorMeasureId(advancedVSeed)
|
5496
5818
|
});
|
5497
5819
|
datasets.push(newDataset);
|
5498
5820
|
foldInfoList.push(foldInfo);
|
@@ -5550,7 +5872,7 @@ const dualAxisConfig = (advancedVSeed, context)=>{
|
|
5550
5872
|
};
|
5551
5873
|
const dualAxisAdvancedPipeline = [
|
5552
5874
|
initAdvancedVSeed_initAdvancedVSeed,
|
5553
|
-
|
5875
|
+
buildMeasuresForDualAxis,
|
5554
5876
|
autoDimensions_autoDimensions,
|
5555
5877
|
encodingForDualAxis,
|
5556
5878
|
pivotAdapter([
|
@@ -5637,7 +5959,7 @@ const initDualAxisSecondary = (spec, context)=>{
|
|
5637
5959
|
result.direction = 'vertical';
|
5638
5960
|
result.xField = unfoldInfo.encodingX;
|
5639
5961
|
if (foldInfoList?.[1]) result.yField = foldInfoList[1].measureValue;
|
5640
|
-
result.seriesField = unfoldInfo.encodingColorId;
|
5962
|
+
result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
5641
5963
|
result.animation = true;
|
5642
5964
|
return result;
|
5643
5965
|
};
|
@@ -6263,6 +6585,37 @@ const yLinearSecondary = (spec, context)=>{
|
|
6263
6585
|
];
|
6264
6586
|
return result;
|
6265
6587
|
};
|
6588
|
+
const linearColorForDualAxis = (spec, context)=>{
|
6589
|
+
const result = {
|
6590
|
+
...spec
|
6591
|
+
};
|
6592
|
+
const { advancedVSeed } = context;
|
6593
|
+
const { datasetReshapeInfo, chartType } = advancedVSeed;
|
6594
|
+
const { unfoldInfo, id } = datasetReshapeInfo[0];
|
6595
|
+
const baseConfig = advancedVSeed.config[chartType];
|
6596
|
+
if (!baseConfig || !baseConfig.color) return result;
|
6597
|
+
const { color } = baseConfig;
|
6598
|
+
const { colorScheme, linearColorScheme } = color;
|
6599
|
+
result.color = {
|
6600
|
+
type: 'linear',
|
6601
|
+
range: linearColorScheme || colorScheme || [],
|
6602
|
+
domain: [
|
6603
|
+
{
|
6604
|
+
dataId: `${id}-primary-dataset`,
|
6605
|
+
fields: [
|
6606
|
+
unfoldInfo.encodingColor
|
6607
|
+
]
|
6608
|
+
},
|
6609
|
+
{
|
6610
|
+
dataId: `${id}-secondary-dataset`,
|
6611
|
+
fields: [
|
6612
|
+
unfoldInfo.encodingColor
|
6613
|
+
]
|
6614
|
+
}
|
6615
|
+
]
|
6616
|
+
};
|
6617
|
+
return result;
|
6618
|
+
};
|
6266
6619
|
const dualAxis = [
|
6267
6620
|
seriesDualAxis([
|
6268
6621
|
initDualAxisPrimary,
|
@@ -6271,11 +6624,11 @@ const dualAxis = [
|
|
6271
6624
|
labelPrimary,
|
6272
6625
|
tooltipPrimary,
|
6273
6626
|
progressive,
|
6274
|
-
barStyle_barStyle,
|
6275
|
-
pointStyle_pointStyle,
|
6627
|
+
colorBarStyleFill(barStyle_barStyle),
|
6628
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
6276
6629
|
pointStateDimensionHover,
|
6277
|
-
lineStyle_lineStyle,
|
6278
|
-
areaStyle_areaStyle
|
6630
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
6631
|
+
colorAreaStyleFill(areaStyle_areaStyle)
|
6279
6632
|
], [
|
6280
6633
|
initDualAxisSecondary,
|
6281
6634
|
dualChartTypeSecondary,
|
@@ -6283,18 +6636,18 @@ const dualAxis = [
|
|
6283
6636
|
labelSecondary,
|
6284
6637
|
tooltipSecondary,
|
6285
6638
|
progressive,
|
6286
|
-
barStyle_barStyle,
|
6287
|
-
pointStyle_pointStyle,
|
6639
|
+
colorBarStyleFill(barStyle_barStyle),
|
6640
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
6288
6641
|
pointStateDimensionHover,
|
6289
|
-
lineStyle_lineStyle,
|
6290
|
-
areaStyle_areaStyle
|
6642
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
6643
|
+
colorAreaStyleFill(areaStyle_areaStyle)
|
6291
6644
|
]),
|
6292
6645
|
xBand,
|
6293
6646
|
yLinearPrimary,
|
6294
6647
|
yLinearSecondary,
|
6295
|
-
color_color,
|
6648
|
+
colorAdapter(color_color, linearColorForDualAxis),
|
6649
|
+
colorAdapter(discreteLegend, colorLegend),
|
6296
6650
|
background_backgroundColor,
|
6297
|
-
discreteLegend,
|
6298
6651
|
verticalCrosshairRect,
|
6299
6652
|
annotationPoint_annotationPoint,
|
6300
6653
|
annotationVerticalLine_annotationVerticalLine,
|
@@ -6314,11 +6667,11 @@ const pivotDualAxis = [
|
|
6314
6667
|
labelPrimary,
|
6315
6668
|
tooltipPrimary,
|
6316
6669
|
progressive,
|
6317
|
-
barStyle_barStyle,
|
6318
|
-
pointStyle_pointStyle,
|
6670
|
+
colorBarStyleFill(barStyle_barStyle),
|
6671
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
6319
6672
|
pointStateDimensionHover,
|
6320
|
-
lineStyle_lineStyle,
|
6321
|
-
areaStyle_areaStyle
|
6673
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
6674
|
+
colorAreaStyleFill(areaStyle_areaStyle)
|
6322
6675
|
], [
|
6323
6676
|
initDualAxisSecondary,
|
6324
6677
|
dualChartTypeSecondary,
|
@@ -6326,16 +6679,16 @@ const pivotDualAxis = [
|
|
6326
6679
|
labelSecondary,
|
6327
6680
|
tooltipSecondary,
|
6328
6681
|
progressive,
|
6329
|
-
barStyle_barStyle,
|
6330
|
-
pointStyle_pointStyle,
|
6682
|
+
colorBarStyleFill(barStyle_barStyle),
|
6683
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
6331
6684
|
pointStateDimensionHover,
|
6332
|
-
lineStyle_lineStyle,
|
6333
|
-
areaStyle_areaStyle
|
6685
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
6686
|
+
colorAreaStyleFill(areaStyle_areaStyle)
|
6334
6687
|
]),
|
6335
6688
|
xBand,
|
6336
6689
|
yLinearPrimary,
|
6337
6690
|
yLinearSecondary,
|
6338
|
-
color_color,
|
6691
|
+
colorAdapter(color_color, linearColor),
|
6339
6692
|
background_backgroundColor,
|
6340
6693
|
verticalCrosshairRect,
|
6341
6694
|
annotationPoint_annotationPoint,
|
@@ -6345,7 +6698,7 @@ const pivotDualAxis = [
|
|
6345
6698
|
]),
|
6346
6699
|
pivotRowDimensions,
|
6347
6700
|
pivotColumnDimensions,
|
6348
|
-
pivotDiscreteLegend
|
6701
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
6349
6702
|
];
|
6350
6703
|
const dualAxisSpecPipeline = [
|
6351
6704
|
pivotAdapter_pivotAdapter(dualAxis, pivotDualAxis)
|
@@ -6380,7 +6733,7 @@ const encodingForPie = (advancedVSeed, context)=>{
|
|
6380
6733
|
};
|
6381
6734
|
const pieAdvancedPipeline = [
|
6382
6735
|
initAdvancedVSeed_initAdvancedVSeed,
|
6383
|
-
|
6736
|
+
buildMeasures,
|
6384
6737
|
autoDimensions_autoDimensions,
|
6385
6738
|
encodingForPie,
|
6386
6739
|
pivotAdapter([
|
@@ -6471,7 +6824,7 @@ const registerPie = ()=>{
|
|
6471
6824
|
};
|
6472
6825
|
const donutAdvancedPipeline = [
|
6473
6826
|
initAdvancedVSeed_initAdvancedVSeed,
|
6474
|
-
|
6827
|
+
buildMeasures,
|
6475
6828
|
autoDimensions_autoDimensions,
|
6476
6829
|
encodingForPie,
|
6477
6830
|
pivotAdapter([
|
@@ -6572,10 +6925,10 @@ const encodingForRose = (advancedVSeed, context)=>{
|
|
6572
6925
|
(dimensions[1] || dimensions[0]).id
|
6573
6926
|
];
|
6574
6927
|
const detail = encoding.detail || [];
|
6575
|
-
const mergedDetail = (0, external_remeda_namespaceObject.unique)([
|
6928
|
+
const mergedDetail = 0 === detail.length ? (0, external_remeda_namespaceObject.unique)([
|
6576
6929
|
...color,
|
6577
6930
|
...detail
|
6578
|
-
]);
|
6931
|
+
]) : detail;
|
6579
6932
|
return {
|
6580
6933
|
...advancedVSeed,
|
6581
6934
|
encoding: {
|
@@ -6603,7 +6956,7 @@ const encodingForRose = (advancedVSeed, context)=>{
|
|
6603
6956
|
};
|
6604
6957
|
const roseAdvancedPipeline = [
|
6605
6958
|
initAdvancedVSeed_initAdvancedVSeed,
|
6606
|
-
|
6959
|
+
buildMeasures,
|
6607
6960
|
autoDimensions_autoDimensions,
|
6608
6961
|
encodingForRose,
|
6609
6962
|
pivotAdapter([
|
@@ -6772,7 +7125,7 @@ const registerRose = ()=>{
|
|
6772
7125
|
};
|
6773
7126
|
const roseParallelAdvancedPipeline = [
|
6774
7127
|
initAdvancedVSeed_initAdvancedVSeed,
|
6775
|
-
|
7128
|
+
buildMeasures,
|
6776
7129
|
autoDimensions_autoDimensions,
|
6777
7130
|
encodingForRose,
|
6778
7131
|
pivotAdapter([
|
@@ -6891,10 +7244,10 @@ const encodingForRadar = (advancedVSeed, context)=>{
|
|
6891
7244
|
(dimensions[1] || dimensions[0]).id
|
6892
7245
|
];
|
6893
7246
|
const detail = encoding.detail || [];
|
6894
|
-
const mergedDetail = (0, external_remeda_namespaceObject.unique)([
|
7247
|
+
const mergedDetail = 0 === detail.length ? (0, external_remeda_namespaceObject.unique)([
|
6895
7248
|
...color,
|
6896
7249
|
...detail
|
6897
|
-
]);
|
7250
|
+
]) : detail;
|
6898
7251
|
return {
|
6899
7252
|
...advancedVSeed,
|
6900
7253
|
encoding: {
|
@@ -6921,7 +7274,7 @@ const encodingForRadar = (advancedVSeed, context)=>{
|
|
6921
7274
|
};
|
6922
7275
|
const radarAdvancedPipeline = [
|
6923
7276
|
initAdvancedVSeed_initAdvancedVSeed,
|
6924
|
-
|
7277
|
+
buildMeasures,
|
6925
7278
|
autoDimensions_autoDimensions,
|
6926
7279
|
encodingForRadar,
|
6927
7280
|
pivotAdapter([
|
@@ -6945,7 +7298,7 @@ const initRadar = (spec, context)=>{
|
|
6945
7298
|
result.type = 'radar';
|
6946
7299
|
result.angleField = unfoldInfo.encodingAngle;
|
6947
7300
|
result.radiusField = foldInfo.measureValue;
|
6948
|
-
result.seriesField = unfoldInfo.encodingColorId;
|
7301
|
+
result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
6949
7302
|
result.padding = 0;
|
6950
7303
|
result.region = [
|
6951
7304
|
{
|
@@ -7010,7 +7363,7 @@ const radarRadiusAxis = (spec, context)=>{
|
|
7010
7363
|
};
|
7011
7364
|
const radar = [
|
7012
7365
|
initRadar,
|
7013
|
-
color_color,
|
7366
|
+
colorAdapter(color_color, linearColor),
|
7014
7367
|
background_backgroundColor,
|
7015
7368
|
datasetXY,
|
7016
7369
|
progressive,
|
@@ -7018,12 +7371,12 @@ const radar = [
|
|
7018
7371
|
radarRadiusAxis,
|
7019
7372
|
label_label,
|
7020
7373
|
tooltip_tooltip,
|
7374
|
+
colorAdapter(discreteLegend, colorLegend),
|
7021
7375
|
verticalCrosshairLine,
|
7022
|
-
|
7023
|
-
pointStyle_pointStyle,
|
7376
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
7024
7377
|
pointStateDimensionHover,
|
7025
|
-
lineStyle_lineStyle,
|
7026
|
-
areaStyle_areaStyle
|
7378
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
7379
|
+
colorAreaStyleFill(areaStyle_areaStyle)
|
7027
7380
|
];
|
7028
7381
|
const pivotRadar = [
|
7029
7382
|
initPivot,
|
@@ -7032,7 +7385,7 @@ const pivotRadar = [
|
|
7032
7385
|
datasetPivot,
|
7033
7386
|
pivotIndicators_pivotIndicators([
|
7034
7387
|
initRadar,
|
7035
|
-
color_color,
|
7388
|
+
colorAdapter(color_color, linearColor),
|
7036
7389
|
background_backgroundColor,
|
7037
7390
|
datasetXY,
|
7038
7391
|
progressive,
|
@@ -7041,14 +7394,14 @@ const pivotRadar = [
|
|
7041
7394
|
label_label,
|
7042
7395
|
tooltip_tooltip,
|
7043
7396
|
verticalCrosshairLine,
|
7044
|
-
pointStyle_pointStyle,
|
7397
|
+
colorPointStyleFill(pointStyle_pointStyle),
|
7045
7398
|
pointStateDimensionHover,
|
7046
|
-
lineStyle_lineStyle,
|
7047
|
-
areaStyle_areaStyle
|
7399
|
+
colorLineStyleFill(lineStyle_lineStyle),
|
7400
|
+
colorAreaStyleFill(areaStyle_areaStyle)
|
7048
7401
|
]),
|
7049
7402
|
pivotRowDimensions,
|
7050
7403
|
pivotColumnDimensions,
|
7051
|
-
pivotDiscreteLegend
|
7404
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
7052
7405
|
];
|
7053
7406
|
const radarSpecPipeline = [
|
7054
7407
|
pivotAdapter_pivotAdapter(radar, pivotRadar)
|
@@ -7083,7 +7436,7 @@ const encodingForFunnel = (advancedVSeed, context)=>{
|
|
7083
7436
|
};
|
7084
7437
|
const funnelAdvancedPipeline = [
|
7085
7438
|
initAdvancedVSeed_initAdvancedVSeed,
|
7086
|
-
|
7439
|
+
buildMeasures,
|
7087
7440
|
autoDimensions_autoDimensions,
|
7088
7441
|
encodingForFunnel,
|
7089
7442
|
pivotAdapter([
|
@@ -7214,7 +7567,7 @@ const encodingForHeatmap = (advancedVSeed, context)=>{
|
|
7214
7567
|
};
|
7215
7568
|
const heatmapAdvancedPipeline = [
|
7216
7569
|
initAdvancedVSeed_initAdvancedVSeed,
|
7217
|
-
|
7570
|
+
buildMeasures,
|
7218
7571
|
autoDimensions_autoDimensions,
|
7219
7572
|
encodingForHeatmap,
|
7220
7573
|
pivotAdapter([
|
@@ -7436,6 +7789,10 @@ const lightTheme = ()=>{
|
|
7436
7789
|
const baseConfig = {
|
7437
7790
|
backgroundColor: 'transparent',
|
7438
7791
|
color: {
|
7792
|
+
linearColorScheme: [
|
7793
|
+
'#C2CEFF',
|
7794
|
+
'#5766EC'
|
7795
|
+
],
|
7439
7796
|
colorScheme: [
|
7440
7797
|
'#8D72F6',
|
7441
7798
|
'#5766EC',
|
@@ -7500,8 +7857,8 @@ const lightTheme = ()=>{
|
|
7500
7857
|
stackCornerRadius: [
|
7501
7858
|
4,
|
7502
7859
|
4,
|
7503
|
-
|
7504
|
-
|
7860
|
+
0,
|
7861
|
+
0
|
7505
7862
|
]
|
7506
7863
|
},
|
7507
7864
|
columnParallel: {
|
@@ -7512,8 +7869,8 @@ const lightTheme = ()=>{
|
|
7512
7869
|
stackCornerRadius: [
|
7513
7870
|
4,
|
7514
7871
|
4,
|
7515
|
-
|
7516
|
-
|
7872
|
+
0,
|
7873
|
+
0
|
7517
7874
|
]
|
7518
7875
|
},
|
7519
7876
|
columnPercent: {
|
@@ -7524,8 +7881,8 @@ const lightTheme = ()=>{
|
|
7524
7881
|
stackCornerRadius: [
|
7525
7882
|
4,
|
7526
7883
|
4,
|
7527
|
-
|
7528
|
-
|
7884
|
+
0,
|
7885
|
+
0
|
7529
7886
|
]
|
7530
7887
|
},
|
7531
7888
|
bar: {
|
@@ -7534,10 +7891,10 @@ const lightTheme = ()=>{
|
|
7534
7891
|
yAxis: barBandAxis,
|
7535
7892
|
crosshairRect,
|
7536
7893
|
stackCornerRadius: [
|
7894
|
+
0,
|
7537
7895
|
4,
|
7538
7896
|
4,
|
7539
|
-
|
7540
|
-
4
|
7897
|
+
0
|
7541
7898
|
]
|
7542
7899
|
},
|
7543
7900
|
barParallel: {
|
@@ -7546,10 +7903,10 @@ const lightTheme = ()=>{
|
|
7546
7903
|
yAxis: barBandAxis,
|
7547
7904
|
crosshairRect,
|
7548
7905
|
stackCornerRadius: [
|
7906
|
+
0,
|
7549
7907
|
4,
|
7550
7908
|
4,
|
7551
|
-
|
7552
|
-
4
|
7909
|
+
0
|
7553
7910
|
]
|
7554
7911
|
},
|
7555
7912
|
barPercent: {
|
@@ -7558,10 +7915,10 @@ const lightTheme = ()=>{
|
|
7558
7915
|
yAxis: barBandAxis,
|
7559
7916
|
crosshairRect,
|
7560
7917
|
stackCornerRadius: [
|
7918
|
+
0,
|
7561
7919
|
4,
|
7562
7920
|
4,
|
7563
|
-
|
7564
|
-
4
|
7921
|
+
0
|
7565
7922
|
]
|
7566
7923
|
},
|
7567
7924
|
area: {
|
@@ -7626,38 +7983,10 @@ const lightTheme = ()=>{
|
|
7626
7983
|
...baseConfig
|
7627
7984
|
},
|
7628
7985
|
funnel: {
|
7629
|
-
...baseConfig
|
7630
|
-
color: {
|
7631
|
-
colorScheme: [
|
7632
|
-
'#5766EC',
|
7633
|
-
'#6372F0',
|
7634
|
-
'#7080F4',
|
7635
|
-
'#7C8CFA',
|
7636
|
-
'#8998FF',
|
7637
|
-
'#95A3FF',
|
7638
|
-
'#A0AEFF',
|
7639
|
-
'#ACB9FF',
|
7640
|
-
'#B7C4FF',
|
7641
|
-
'#C2CEFF'
|
7642
|
-
].reverse()
|
7643
|
-
}
|
7986
|
+
...baseConfig
|
7644
7987
|
},
|
7645
7988
|
heatmap: {
|
7646
|
-
...baseConfig
|
7647
|
-
color: {
|
7648
|
-
colorScheme: [
|
7649
|
-
'#5766EC',
|
7650
|
-
'#6372F0',
|
7651
|
-
'#7080F4',
|
7652
|
-
'#7C8CFA',
|
7653
|
-
'#8998FF',
|
7654
|
-
'#95A3FF',
|
7655
|
-
'#A0AEFF',
|
7656
|
-
'#ACB9FF',
|
7657
|
-
'#B7C4FF',
|
7658
|
-
'#C2CEFF'
|
7659
|
-
].reverse()
|
7660
|
-
}
|
7989
|
+
...baseConfig
|
7661
7990
|
}
|
7662
7991
|
}
|
7663
7992
|
};
|
@@ -7769,6 +8098,10 @@ const darkTheme = ()=>{
|
|
7769
8098
|
const baseConfig = {
|
7770
8099
|
backgroundColor: 'transparent',
|
7771
8100
|
color: {
|
8101
|
+
linearColorScheme: [
|
8102
|
+
'#A0CEFF',
|
8103
|
+
'#2E62F1'
|
8104
|
+
],
|
7772
8105
|
colorScheme: [
|
7773
8106
|
'#2E62F1',
|
7774
8107
|
'#4DC36A',
|
@@ -7832,8 +8165,8 @@ const darkTheme = ()=>{
|
|
7832
8165
|
stackCornerRadius: [
|
7833
8166
|
4,
|
7834
8167
|
4,
|
7835
|
-
|
7836
|
-
|
8168
|
+
0,
|
8169
|
+
0
|
7837
8170
|
]
|
7838
8171
|
},
|
7839
8172
|
columnParallel: {
|
@@ -7844,8 +8177,8 @@ const darkTheme = ()=>{
|
|
7844
8177
|
stackCornerRadius: [
|
7845
8178
|
4,
|
7846
8179
|
4,
|
7847
|
-
|
7848
|
-
|
8180
|
+
0,
|
8181
|
+
0
|
7849
8182
|
]
|
7850
8183
|
},
|
7851
8184
|
columnPercent: {
|
@@ -7856,8 +8189,8 @@ const darkTheme = ()=>{
|
|
7856
8189
|
stackCornerRadius: [
|
7857
8190
|
4,
|
7858
8191
|
4,
|
7859
|
-
|
7860
|
-
|
8192
|
+
0,
|
8193
|
+
0
|
7861
8194
|
]
|
7862
8195
|
},
|
7863
8196
|
bar: {
|
@@ -7878,10 +8211,10 @@ const darkTheme = ()=>{
|
|
7878
8211
|
yAxis: barBandAxis,
|
7879
8212
|
crosshairRect: crosshairRect,
|
7880
8213
|
stackCornerRadius: [
|
8214
|
+
0,
|
7881
8215
|
4,
|
7882
8216
|
4,
|
7883
|
-
|
7884
|
-
4
|
8217
|
+
0
|
7885
8218
|
]
|
7886
8219
|
},
|
7887
8220
|
barPercent: {
|
@@ -7890,10 +8223,10 @@ const darkTheme = ()=>{
|
|
7890
8223
|
yAxis: barBandAxis,
|
7891
8224
|
crosshairRect: crosshairRect,
|
7892
8225
|
stackCornerRadius: [
|
8226
|
+
0,
|
7893
8227
|
4,
|
7894
8228
|
4,
|
7895
|
-
|
7896
|
-
4
|
8229
|
+
0
|
7897
8230
|
]
|
7898
8231
|
},
|
7899
8232
|
area: {
|
@@ -7958,21 +8291,7 @@ const darkTheme = ()=>{
|
|
7958
8291
|
...baseConfig
|
7959
8292
|
},
|
7960
8293
|
funnel: {
|
7961
|
-
...baseConfig
|
7962
|
-
color: {
|
7963
|
-
colorScheme: [
|
7964
|
-
'#2E62F1',
|
7965
|
-
'#3A6EF6',
|
7966
|
-
'#4780FA',
|
7967
|
-
'#548CFE',
|
7968
|
-
'#6198FF',
|
7969
|
-
'#6FA3FF',
|
7970
|
-
'#7CACFF',
|
7971
|
-
'#88B7FF',
|
7972
|
-
'#94C2FF',
|
7973
|
-
'#A0CEFF'
|
7974
|
-
]
|
7975
|
-
}
|
8294
|
+
...baseConfig
|
7976
8295
|
},
|
7977
8296
|
heatmap: {
|
7978
8297
|
...baseConfig
|
@@ -8023,9 +8342,6 @@ const updateAdvanced = (chartType, advancedPipe)=>{
|
|
8023
8342
|
const updateSpec = (chartType, specPipe)=>{
|
8024
8343
|
Builder._customSpecPipe[chartType] = specPipe;
|
8025
8344
|
};
|
8026
|
-
const isDimension = (dimension)=>!('children' in dimension);
|
8027
|
-
const isDimensionGroup = (dimension)=>'children' in dimension;
|
8028
|
-
const isDimensions = (dimensions)=>dimensions.every(isDimension);
|
8029
8345
|
const external_zod_namespaceObject = require("zod");
|
8030
8346
|
const zChartType = external_zod_namespaceObject.z["enum"]([
|
8031
8347
|
'table',
|
@@ -8119,7 +8435,20 @@ const zMeasure = external_zod_namespaceObject.z.object({
|
|
8119
8435
|
id: external_zod_namespaceObject.z.string(),
|
8120
8436
|
alias: external_zod_namespaceObject.z.string().optional(),
|
8121
8437
|
autoFormat: external_zod_namespaceObject.z.boolean().default(true),
|
8122
|
-
format: zNumFormat["default"]({})
|
8438
|
+
format: zNumFormat["default"]({}),
|
8439
|
+
encoding: external_zod_namespaceObject.z["enum"]([
|
8440
|
+
'primaryYAxis',
|
8441
|
+
'secondaryYAxis',
|
8442
|
+
'xAxis',
|
8443
|
+
'yAxis',
|
8444
|
+
'angle',
|
8445
|
+
'radius',
|
8446
|
+
'size',
|
8447
|
+
'color',
|
8448
|
+
'label',
|
8449
|
+
'tooltip'
|
8450
|
+
]).optional(),
|
8451
|
+
parentId: external_zod_namespaceObject.z.string().optional()
|
8123
8452
|
});
|
8124
8453
|
const zMeasureGroup = external_zod_namespaceObject.z.object({
|
8125
8454
|
id: external_zod_namespaceObject.z.string(),
|
@@ -8144,6 +8473,8 @@ const zScatterMeasure = external_zod_namespaceObject.z.object({
|
|
8144
8473
|
const zScatterMeasures = external_zod_namespaceObject.z.array(zScatterMeasure);
|
8145
8474
|
const zFoldInfo = external_zod_namespaceObject.z.object({
|
8146
8475
|
foldMap: external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), external_zod_namespaceObject.z.string().or(external_zod_namespaceObject.z.undefined())),
|
8476
|
+
colorRange: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.number()),
|
8477
|
+
measureRange: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.number()),
|
8147
8478
|
measureId: external_zod_namespaceObject.z.string(),
|
8148
8479
|
measureName: external_zod_namespaceObject.z.string(),
|
8149
8480
|
measureValue: external_zod_namespaceObject.z.string()
|
@@ -8179,7 +8510,6 @@ const zEncoding = external_zod_namespaceObject.z.object({
|
|
8179
8510
|
column: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).nullish(),
|
8180
8511
|
group: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).nullish().describe("\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u989C\u8272\u66FF\u4EE3")
|
8181
8512
|
});
|
8182
|
-
const zEncodings = external_zod_namespaceObject.z.array(zEncoding);
|
8183
8513
|
const zXBandAxis = external_zod_namespaceObject.z.object({
|
8184
8514
|
visible: external_zod_namespaceObject.z.boolean().default(true).nullish(),
|
8185
8515
|
labelAutoHide: external_zod_namespaceObject.z.boolean().default(true).nullish(),
|
@@ -8288,10 +8618,11 @@ const zStackCornerRadius = external_zod_namespaceObject.z.number().or(external_z
|
|
8288
8618
|
const zBackgroundColor = external_zod_namespaceObject.z.string().default('transparent').nullish();
|
8289
8619
|
const zColor = external_zod_namespaceObject.z.object({
|
8290
8620
|
colorScheme: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).nullish(),
|
8621
|
+
linearColorScheme: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).nullish(),
|
8291
8622
|
colorMapping: external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), external_zod_namespaceObject.z.string()).nullish()
|
8292
8623
|
});
|
8293
8624
|
const zLinearColor = external_zod_namespaceObject.z.object({
|
8294
|
-
|
8625
|
+
linearColorScheme: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).nullish()
|
8295
8626
|
});
|
8296
8627
|
const zLabel = external_zod_namespaceObject.z.object({
|
8297
8628
|
enable: external_zod_namespaceObject.z.boolean().default(true).nullish()
|
@@ -9272,7 +9603,7 @@ const zFunnel = external_zod_namespaceObject.z.object({
|
|
9272
9603
|
dimensions: zDimensions.nullish(),
|
9273
9604
|
measures: zMeasureTree.nullish(),
|
9274
9605
|
backgroundColor: zBackgroundColor.nullish(),
|
9275
|
-
color:
|
9606
|
+
color: zColor.nullish(),
|
9276
9607
|
label: zLabel.nullish(),
|
9277
9608
|
legend: zColorLegend.nullish(),
|
9278
9609
|
tooltip: zTooltip.nullish(),
|
@@ -9285,7 +9616,7 @@ const zHeatmap = external_zod_namespaceObject.z.object({
|
|
9285
9616
|
dimensions: zDimensions.nullish(),
|
9286
9617
|
measures: zMeasureTree.nullish(),
|
9287
9618
|
backgroundColor: zBackgroundColor.nullish(),
|
9288
|
-
color:
|
9619
|
+
color: zColor.nullish(),
|
9289
9620
|
label: zLabel.nullish(),
|
9290
9621
|
legend: zColorLegend.nullish(),
|
9291
9622
|
tooltip: zTooltip.nullish(),
|
@@ -9321,7 +9652,6 @@ const zAdvancedVSeed = external_zod_namespaceObject.z.object({
|
|
9321
9652
|
dimensions: zDimensionTree,
|
9322
9653
|
measures: zMeasureTree,
|
9323
9654
|
encoding: zEncoding,
|
9324
|
-
encodings: zEncodings,
|
9325
9655
|
config: zConfig,
|
9326
9656
|
analysis: zAnalysis,
|
9327
9657
|
theme: zTheme,
|
@@ -9345,8 +9675,6 @@ exports.FoldYMeasureValue = __webpack_exports__.FoldYMeasureValue;
|
|
9345
9675
|
exports.MeasureName = __webpack_exports__.MeasureName;
|
9346
9676
|
exports.ORIGINAL_DATA = __webpack_exports__.ORIGINAL_DATA;
|
9347
9677
|
exports.Separator = __webpack_exports__.Separator;
|
9348
|
-
exports.UnfoldDimensionGroup = __webpack_exports__.UnfoldDimensionGroup;
|
9349
|
-
exports.UnfoldDimensionGroupId = __webpack_exports__.UnfoldDimensionGroupId;
|
9350
9678
|
exports.XEncoding = __webpack_exports__.XEncoding;
|
9351
9679
|
exports.YEncoding = __webpack_exports__.YEncoding;
|
9352
9680
|
exports.areaAdvancedPipeline = __webpack_exports__.areaAdvancedPipeline;
|
@@ -9378,8 +9706,6 @@ exports.dualAxisSpecPipeline = __webpack_exports__.dualAxisSpecPipeline;
|
|
9378
9706
|
exports.execPipeline = __webpack_exports__.execPipeline;
|
9379
9707
|
exports.findAllDimensions = __webpack_exports__.findAllDimensions;
|
9380
9708
|
exports.findAllMeasures = __webpack_exports__.findAllMeasures;
|
9381
|
-
exports.findDimensionById = __webpack_exports__.findDimensionById;
|
9382
|
-
exports.findFirstDimension = __webpack_exports__.findFirstDimension;
|
9383
9709
|
exports.findFirstMeasure = __webpack_exports__.findFirstMeasure;
|
9384
9710
|
exports.findMeasureById = __webpack_exports__.findMeasureById;
|
9385
9711
|
exports.foldMeasures = __webpack_exports__.foldMeasures;
|
@@ -9389,10 +9715,7 @@ exports.heatmapAdvancedPipeline = __webpack_exports__.heatmapAdvancedPipeline;
|
|
9389
9715
|
exports.heatmapSpecPipeline = __webpack_exports__.heatmapSpecPipeline;
|
9390
9716
|
exports.i18n = __webpack_exports__.i18n;
|
9391
9717
|
exports.intl = __webpack_exports__.intl;
|
9392
|
-
exports.isDimension = __webpack_exports__.isDimension;
|
9393
|
-
exports.isDimensionGroup = __webpack_exports__.isDimensionGroup;
|
9394
9718
|
exports.isDimensionSelector = __webpack_exports__.isDimensionSelector;
|
9395
|
-
exports.isDimensions = __webpack_exports__.isDimensions;
|
9396
9719
|
exports.isMeasure = __webpack_exports__.isMeasure;
|
9397
9720
|
exports.isMeasureGroup = __webpack_exports__.isMeasureGroup;
|
9398
9721
|
exports.isMeasureSelector = __webpack_exports__.isMeasureSelector;
|
@@ -9500,7 +9823,6 @@ exports.zDualChartType = __webpack_exports__.zDualChartType;
|
|
9500
9823
|
exports.zDualMeasure = __webpack_exports__.zDualMeasure;
|
9501
9824
|
exports.zDualMeasures = __webpack_exports__.zDualMeasures;
|
9502
9825
|
exports.zEncoding = __webpack_exports__.zEncoding;
|
9503
|
-
exports.zEncodings = __webpack_exports__.zEncodings;
|
9504
9826
|
exports.zFoldInfo = __webpack_exports__.zFoldInfo;
|
9505
9827
|
exports.zFunnel = __webpack_exports__.zFunnel;
|
9506
9828
|
exports.zFunnelConfig = __webpack_exports__.zFunnelConfig;
|
@@ -9563,8 +9885,6 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
9563
9885
|
"MeasureName",
|
9564
9886
|
"ORIGINAL_DATA",
|
9565
9887
|
"Separator",
|
9566
|
-
"UnfoldDimensionGroup",
|
9567
|
-
"UnfoldDimensionGroupId",
|
9568
9888
|
"XEncoding",
|
9569
9889
|
"YEncoding",
|
9570
9890
|
"areaAdvancedPipeline",
|
@@ -9596,8 +9916,6 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
9596
9916
|
"execPipeline",
|
9597
9917
|
"findAllDimensions",
|
9598
9918
|
"findAllMeasures",
|
9599
|
-
"findDimensionById",
|
9600
|
-
"findFirstDimension",
|
9601
9919
|
"findFirstMeasure",
|
9602
9920
|
"findMeasureById",
|
9603
9921
|
"foldMeasures",
|
@@ -9607,10 +9925,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
9607
9925
|
"heatmapSpecPipeline",
|
9608
9926
|
"i18n",
|
9609
9927
|
"intl",
|
9610
|
-
"isDimension",
|
9611
|
-
"isDimensionGroup",
|
9612
9928
|
"isDimensionSelector",
|
9613
|
-
"isDimensions",
|
9614
9929
|
"isMeasure",
|
9615
9930
|
"isMeasureGroup",
|
9616
9931
|
"isMeasureSelector",
|
@@ -9718,7 +10033,6 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
9718
10033
|
"zDualMeasure",
|
9719
10034
|
"zDualMeasures",
|
9720
10035
|
"zEncoding",
|
9721
|
-
"zEncodings",
|
9722
10036
|
"zFoldInfo",
|
9723
10037
|
"zFunnel",
|
9724
10038
|
"zFunnelConfig",
|