@datarailsshared/dr_renderer 1.2.199 → 1.2.201-rocket
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 +25 -7
package/package.json
CHANGED
|
@@ -4371,15 +4371,12 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
4371
4371
|
);
|
|
4372
4372
|
|
|
4373
4373
|
if (uniqueCategories && (uniqueCategories.length > maxCategories || uniqueCategories.length < minCategories )) {
|
|
4374
|
-
const commonErrorSentence = `Please choose ${ minCategories }-${ maxCategories } items in the Category section.`
|
|
4375
4374
|
options.error_has_occurred = true;
|
|
4376
4375
|
options.error_params = {
|
|
4377
|
-
title:
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
btnText: 'Edit Widget',
|
|
4382
|
-
class: 'too-much-data',
|
|
4376
|
+
title: 'Data Conflict',
|
|
4377
|
+
text: `Please adjust your dashboard's reference date and filter selections as \
|
|
4378
|
+
the quantity of data doesn't match the chart's ${ minCategories }-${ maxCategories } value limit.`,
|
|
4379
|
+
class: 'nodata',
|
|
4383
4380
|
}
|
|
4384
4381
|
return highchartsRenderer.getNoDataResult(options.rendererOptions, true);
|
|
4385
4382
|
}
|
|
@@ -5097,6 +5094,27 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
5097
5094
|
dynamicRangeOptions.pivot.calculatedValues = highchartsRenderer.objectCopyJsonMethod(dynamicRangeOptions.calculated_values || []);
|
|
5098
5095
|
}
|
|
5099
5096
|
|
|
5097
|
+
highchartsRenderer.addTemplateDataToCalcModel = function (selectedTemplate, calcModelOptions) {
|
|
5098
|
+
highchartsRenderer.setWidgetFieldsToTemplate(selectedTemplate);
|
|
5099
|
+
|
|
5100
|
+
var fields = highchartsRenderer.objectCopyJsonMethod(selectedTemplate.widget_fields);
|
|
5101
|
+
var fieldOb;
|
|
5102
|
+
var selectedFields = [];
|
|
5103
|
+
|
|
5104
|
+
// fill selected fields
|
|
5105
|
+
lodash.forEach(calcModelOptions.fields, function (valObj) {
|
|
5106
|
+
fieldOb = lodash.find(fields, {id: valObj.id});
|
|
5107
|
+
if (fieldOb) {
|
|
5108
|
+
selectedFields.push(fieldOb);
|
|
5109
|
+
lodash.remove(fields, {id: fieldOb.id});
|
|
5110
|
+
}
|
|
5111
|
+
});
|
|
5112
|
+
|
|
5113
|
+
calcModelOptions.pivot = {};
|
|
5114
|
+
calcModelOptions.pivot.fieldsArray = fields;
|
|
5115
|
+
calcModelOptions.pivot.selectedFieldsArray = selectedFields;
|
|
5116
|
+
}
|
|
5117
|
+
|
|
5100
5118
|
highchartsRenderer.addTemplateDataToFunctionOptions = function (selectedTemplate, functionOptions) {
|
|
5101
5119
|
highchartsRenderer.setWidgetFieldsToTemplate(selectedTemplate);
|
|
5102
5120
|
|