@datarailsshared/dr_renderer 1.2.117 → 1.2.120

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.117",
3
+ "version": "1.2.120",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -807,14 +807,18 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
807
807
  };
808
808
  if (isNewAngular) {
809
809
  const isPieChart = chartOptions.chart && chartOptions.chart.type === 'pie';
810
+ const x = isPieChart ? 0 :
811
+ chartOptions.yAxis.title.text || chartOptions.yAxis.title.autoylabel ? -60 : -40;
812
+ const y = isPieChart ? 27 :
813
+ chartOptions.xAxis.title.text || chartOptions.xAxis.title.autoxlabel ? 65 : 43;
810
814
  chartOptions.drilldown.breadcrumbs = {
811
815
  formatter: () => '< Back',
812
816
  showFullPath: false,
813
817
  position: {
814
818
  align: 'left',
815
819
  verticalAlign: 'bottom',
816
- x: isPieChart ? 0 : -80,
817
- y: isPieChart ? 27 : 60,
820
+ x: x,
821
+ y: y,
818
822
  },
819
823
  floating: true,
820
824
  buttonTheme: {
@@ -823,7 +827,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
823
827
  'stroke-width': 1,
824
828
  stroke: '#85889c',
825
829
  r: 3,
826
- padding: 7,
830
+ padding: 3,
827
831
  states: {
828
832
  hover: {
829
833
  fill: '#eef3f6',
@@ -4296,7 +4300,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
4296
4300
  filter.values[i] = highchartsRenderer.returnRawDataValue(filter.type, filter.values[i], filter.format, filter.name);
4297
4301
  }
4298
4302
  }
4299
- filter.value_to_show = filter.values.join(',');
4303
+ filter.value_to_show = filter.values.join(', ');
4300
4304
  } else if (filter.values && filter.values.label) {
4301
4305
  filter.value_to_show = filter.values.label;
4302
4306
  } else {
@@ -7581,6 +7585,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7581
7585
  for (let i = 0; i < rowKey.length; i++) {
7582
7586
  let filter = lodash.find(filters, {name: widget.rows[i].name});
7583
7587
  if (filter) {
7588
+ filter.is_excluded = false;
7584
7589
  filter.values = widget.rows[i].type === 'Date' ?
7585
7590
  highchartsRenderer.createDateTypeFromValue(rowKey[i], widget.rows[i].format) :
7586
7591
  [rowKey[i]];
@@ -7591,6 +7596,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7591
7596
  for (let i = 0; i < colKey.length; i++) {
7592
7597
  let filter = lodash.find(filters, {name: widget.cols[i].name});
7593
7598
  if (filter) {
7599
+ filter.is_excluded = false;
7594
7600
  filter.values = widget.cols[i].type === 'Date' ?
7595
7601
  highchartsRenderer.createDateTypeFromValue(colKey[i], widget.cols[i].format) :
7596
7602
  [colKey[i]];
@@ -7684,6 +7690,13 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7684
7690
  };
7685
7691
 
7686
7692
  highchartsRenderer.getWidgetDataSorters = function (res, widget, defaultDateFormat) {
7693
+ if ($.pivotUtilities && !$.pivotUtilities.additionalFieldsList) {
7694
+ $.pivotUtilities.additionalFieldsList = [
7695
+ {key: 'DR_Average', name: 'DR_Average'},
7696
+ {key: 'DR_Others', name: _.get(widget.options, "total_value_options.filter_options.filteredOutFieldName") || 'Others'}
7697
+ ];
7698
+ }
7699
+
7687
7700
  var datesFields = [];
7688
7701
  datesFields = lodash.filter(widget.rows, element => element.type == 'Date');
7689
7702
  datesFields = datesFields.concat(lodash.filter(widget.cols, element => element.type == 'Date'));