@datarailsshared/dr_renderer 1.5.74 → 1.5.79
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/package.json +1 -1
- package/src/highcharts_renderer.js +18 -2
package/package.json
CHANGED
|
@@ -989,7 +989,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
989
989
|
tempAr[temp_len - 1] = highchartsRenderer.getFieldName(colAttrs[j]);
|
|
990
990
|
}
|
|
991
991
|
|
|
992
|
-
|
|
992
|
+
const formattedColKeys = highchartsRenderer.getFormattedColKeys(pivotData, null);
|
|
993
|
+
tempAr = tempAr.concat(lodash.map(formattedColKeys, function (row) {
|
|
993
994
|
return row[j];
|
|
994
995
|
}));
|
|
995
996
|
|
|
@@ -10012,8 +10013,23 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
10012
10013
|
// It is just not counting sum there. So we remove it in order not to show improper values
|
|
10013
10014
|
if ((calculatedValuesInValsCount > 1 || calculatedValuesInValsCount && widget.vals.length > 1) && !widget.rows.length) {
|
|
10014
10015
|
res = lodash.filter(res, record => {
|
|
10016
|
+
// Check if record is metadata (has col_keys or row_keys)
|
|
10017
|
+
const isMetadata = typeof record['col_keys'] !== 'undefined' || typeof record['row_keys'] !== 'undefined';
|
|
10018
|
+
if (isMetadata) {
|
|
10019
|
+
return false;
|
|
10020
|
+
}
|
|
10021
|
+
|
|
10015
10022
|
const isColsTotal = typeof record['DR_Values'] === 'undefined';
|
|
10016
|
-
|
|
10023
|
+
|
|
10024
|
+
if (!isColsTotal) {
|
|
10025
|
+
return true;
|
|
10026
|
+
}
|
|
10027
|
+
|
|
10028
|
+
// If it doesn't have DR_Values, check if it has any value fields
|
|
10029
|
+
// Records with value fields are valid data, not empty subtotals
|
|
10030
|
+
return lodash.some(fieldWithDrValuesNames, fieldName => {
|
|
10031
|
+
return typeof record[fieldName] !== 'undefined' || typeof record['value'] !== 'undefined';
|
|
10032
|
+
});
|
|
10017
10033
|
})
|
|
10018
10034
|
}
|
|
10019
10035
|
}
|