@datarailsshared/dr_renderer 1.5.147 → 1.5.157

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.
@@ -29,7 +29,7 @@ jobs:
29
29
  branch_postfix: false
30
30
  main_branch: 'master'
31
31
  version_prefix: '1.5'
32
- skip_publish: false
32
+ skip_publish: ${{ github.event_name != 'push' }}
33
33
  secrets:
34
34
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
35
35
 
@@ -41,7 +41,7 @@ jobs:
41
41
  with:
42
42
  new_version: v${{ needs.publish-npm.outputs.version }}
43
43
  node_version: '14.16.1'
44
- run_build: false
44
+ run_build: true
45
45
  package_scope: '@datarailsshared'
46
46
  use_npm_ci: false
47
47
  secrets:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.5.147",
3
+ "version": "1.5.157",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -90,10 +90,15 @@ function DrDonutChart(highchartsRenderer, pivotData, opts, drilldownFunc, disabl
90
90
  const series = chart.series[0];
91
91
 
92
92
  const aggTotal = pivotData.getAggregator([], []);
93
+ const hasAggValue = aggTotal && typeof aggTotal.value === 'function';
94
+ const hasAggFormat = aggTotal && typeof aggTotal.format === 'function';
95
+ const totalValue = hasAggValue ? aggTotal.value() : series.total;
93
96
  const formattedValue =
94
97
  additionOptions && additionOptions.customTotalValueFormatFn
95
- ? additionOptions.customTotalValueFormatFn(series.total)
96
- : aggTotal.format(series.total, true);
98
+ ? additionOptions.customTotalValueFormatFn(totalValue)
99
+ : hasAggFormat
100
+ ? aggTotal.format(totalValue, true)
101
+ : totalValue;
97
102
 
98
103
  if (totalLabel) {
99
104
  totalLabel.destroy();