@datarailsshared/dr_renderer 1.2.128 → 1.2.131

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.128",
3
+ "version": "1.2.131",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -3578,6 +3578,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
3578
3578
  if (this.ignoreValue) {
3579
3579
  return null;
3580
3580
  }
3581
+ if (useTotalsCalculation) {
3582
+ return this.sum;
3583
+ }
3581
3584
  return this.sum / this.len;
3582
3585
  },
3583
3586
  format: function (x, only_formats) {
@@ -5996,16 +5999,15 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
5996
5999
  elements: [{
5997
6000
  element_type: 'checkbox',
5998
6001
  value_name: 'autoylabel',
5999
- element_label: 'Auto Y-axis column label',
6002
+ element_label: 'Auto label y axis',
6000
6003
  default_value: true
6001
6004
  },
6002
6005
  {
6003
6006
  element_type: 'input',
6004
6007
  value_name: 'name',
6005
- element_label: 'Name',
6008
+ element_label: 'Y axis label',
6006
6009
  default_value: '',
6007
- disabled_str: '{var}.autoylabel',
6008
- disabled_fn: (value) => value.autoylabel,
6010
+ onChange: (value) => value.autoylabel = false,
6009
6011
  },
6010
6012
  {
6011
6013
  element_type: 'input',
@@ -6029,16 +6031,15 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
6029
6031
  {
6030
6032
  element_type: 'checkbox',
6031
6033
  value_name: 'autoxlabel',
6032
- element_label: 'Auto X-axis column label',
6034
+ element_label: 'Auto label x axis',
6033
6035
  default_value: true
6034
6036
  },
6035
6037
  {
6036
6038
  element_type: 'input',
6037
6039
  value_name: 'name',
6038
- element_label: 'Name',
6040
+ element_label: 'X axis label',
6039
6041
  default_value: '',
6040
- disabled_str: '{var}.autoxlabel',
6041
- disabled_fn: (value) => value.autoxlabel,
6042
+ onChange: (value) => value.autoxlabel = false
6042
6043
  },
6043
6044
  {
6044
6045
  element_type: 'input',
@@ -7888,6 +7889,19 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7888
7889
  return sorters;
7889
7890
  };
7890
7891
 
7892
+ highchartsRenderer.getSorters = function (field, values) {
7893
+ if (field.sorting && field.sorting.type === 'DateString') {
7894
+ return $.pivotUtilities.sortDateStrings(field.sorting.month_order);
7895
+ } else if (field.sorting && field.sorting.type === 'largestToSmallest') {
7896
+ if (field.sorting.is_absolute)
7897
+ return $.pivotUtilities.largeToSmallSortByAbsolute;
7898
+
7899
+ return $.pivotUtilities.largeToSmallSort;
7900
+ } else {
7901
+ return $.pivotUtilities.sortAs(values);
7902
+ }
7903
+ };
7904
+
7891
7905
  //highchartsRenderer.getGraphOptions(scope.data, override_values, res, scope.dataModel.templatesWithOutData, scope.openDrillDownList, drillDownFunction)
7892
7906
  highchartsRenderer.getGraphOptions = function (widget_obj, override_values, row_data, templates, openDrillDownListFunction, drillDownFunction) {
7893
7907
  let res = highchartsRenderer.updateSelectedOverrideValues(widget_obj, override_values, row_data);