@datarailsshared/dr_renderer 1.2.252 → 1.2.253
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 +16 -4
package/package.json
CHANGED
|
@@ -1455,7 +1455,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1455
1455
|
keys = value.key;
|
|
1456
1456
|
} else {
|
|
1457
1457
|
_.forEach(value.key, (item) => {
|
|
1458
|
-
const findKeyByValue =
|
|
1458
|
+
const findKeyByValue = lodash.find(
|
|
1459
|
+
Object.keys(pivotData.dateValuesDictionary || {}),
|
|
1460
|
+
key => pivotData.dateValuesDictionary[key] === item
|
|
1461
|
+
);
|
|
1459
1462
|
keys.push(findKeyByValue ? findKeyByValue : item);
|
|
1460
1463
|
})
|
|
1461
1464
|
}
|
|
@@ -1493,7 +1496,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1493
1496
|
|
|
1494
1497
|
resultObject.data.push({
|
|
1495
1498
|
y: val,
|
|
1496
|
-
name: lodash.unescape(name)
|
|
1499
|
+
name: lodash.replace(lodash.unescape(name), 'DR_Others', highchartsRenderer.getOthersName(opts)),
|
|
1497
1500
|
totalIndex: value.trend === 'total' ? index : undefined,
|
|
1498
1501
|
isSum: value.trend === 'total',
|
|
1499
1502
|
isTotal: value.trend === 'total',
|
|
@@ -8915,12 +8918,21 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
8915
8918
|
}
|
|
8916
8919
|
|
|
8917
8920
|
let pivot = {};
|
|
8921
|
+
|
|
8922
|
+
let templateNoData = lodash.find(templates, {id: widget_obj.template_id});
|
|
8923
|
+
if (templateNoData) {
|
|
8924
|
+
|
|
8925
|
+
// we need to assign this before calling getWidgetDataSorters method
|
|
8926
|
+
// other way we won't get dateValuesDictionary
|
|
8927
|
+
// preserved condition templateNoData == true - not to interfere with further logic
|
|
8928
|
+
widget_obj.pivot = pivot;
|
|
8929
|
+
}
|
|
8930
|
+
|
|
8918
8931
|
pivot.sorters = highchartsRenderer.getWidgetDataSorters(res, widget_obj);
|
|
8919
8932
|
pivot.rowData = res;
|
|
8920
8933
|
widget_obj.options = highchartsRenderer.parseOptionsToObject(widget_obj.options);
|
|
8921
|
-
|
|
8934
|
+
|
|
8922
8935
|
if (templateNoData) {
|
|
8923
|
-
widget_obj.pivot = pivot;
|
|
8924
8936
|
let hasServerDrill = widget_obj.chart_type.indexOf("column-chart") > -1 && widget_obj.cols && widget_obj.cols.length >= 1;
|
|
8925
8937
|
if (hasServerDrill)
|
|
8926
8938
|
highchartsRenderer.addPivotOptions(templateNoData, widget_obj, drillDownFunction, openDrillDownListFunction);
|