dbgate-datalib 6.5.5 → 6.5.6
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/lib/chartDefinitions.js
CHANGED
package/lib/chartProcessor.js
CHANGED
|
@@ -261,7 +261,7 @@ class ChartProcessor {
|
|
|
261
261
|
this.availableColumns = Object.values(this.availableColumnsDict);
|
|
262
262
|
for (const chart of this.chartsProcessing) {
|
|
263
263
|
if (chart.errorMessage) {
|
|
264
|
-
this.charts.push(chart);
|
|
264
|
+
this.charts.push(Object.assign(Object.assign({}, chart), { availableColumns: this.availableColumns }));
|
|
265
265
|
continue;
|
|
266
266
|
}
|
|
267
267
|
let addedChart = chart;
|
|
@@ -315,14 +315,17 @@ class ChartProcessor {
|
|
|
315
315
|
}
|
|
316
316
|
groupPieOtherBuckets(chart) {
|
|
317
317
|
var _a, _b, _c;
|
|
318
|
-
if (chart.definition.chartType
|
|
318
|
+
if (chart.definition.chartType != 'pie' && chart.definition.chartType != 'polarArea') {
|
|
319
319
|
return; // only for pie charts
|
|
320
320
|
}
|
|
321
321
|
const ratioLimit = (_a = chart.definition.pieRatioLimit) !== null && _a !== void 0 ? _a : chartDefinitions_1.ChartLimits.PIE_RATIO_LIMIT;
|
|
322
|
-
|
|
323
|
-
if (
|
|
324
|
-
|
|
322
|
+
let countLimit = (_b = chart.definition.pieCountLimit) !== null && _b !== void 0 ? _b : chartDefinitions_1.ChartLimits.PIE_COUNT_LIMIT;
|
|
323
|
+
if (!countLimit || countLimit < 1 || countLimit > chartDefinitions_1.ChartLimits.MAX_PIE_COUNT_LIMIT) {
|
|
324
|
+
countLimit = chartDefinitions_1.ChartLimits.MAX_PIE_COUNT_LIMIT; // limit to max pie count
|
|
325
325
|
}
|
|
326
|
+
// if (ratioLimit == 0 && countLimit == 0) {
|
|
327
|
+
// return; // no grouping if limit is 0
|
|
328
|
+
// }
|
|
326
329
|
const otherBucket = {};
|
|
327
330
|
let newBuckets = {};
|
|
328
331
|
const cardSum = (0, sum_1.default)(Object.values(chart.buckets).map(bucket => (0, chartTools_1.computeChartBucketCardinality)(bucket)));
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "6.5.
|
|
2
|
+
"version": "6.5.6",
|
|
3
3
|
"name": "dbgate-datalib",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"typings": "lib/index.d.ts",
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"date-fns": "^4.1.0",
|
|
18
|
-
"dbgate-filterparser": "^6.5.
|
|
19
|
-
"dbgate-sqltree": "^6.5.
|
|
20
|
-
"dbgate-tools": "^6.5.
|
|
18
|
+
"dbgate-filterparser": "^6.5.6",
|
|
19
|
+
"dbgate-sqltree": "^6.5.6",
|
|
20
|
+
"dbgate-tools": "^6.5.6",
|
|
21
21
|
"uuid": "^3.4.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^13.7.0",
|
|
25
|
-
"dbgate-types": "^6.5.
|
|
25
|
+
"dbgate-types": "^6.5.6",
|
|
26
26
|
"jest": "^28.1.3",
|
|
27
27
|
"ts-jest": "^28.0.7",
|
|
28
28
|
"typescript": "^4.4.3"
|