Skip to content

Commit 1c0d6eb

Browse files
sara-resara-gnucoop
authored andcommitted
fix(core/reports): fix boolean value when false for removeZeroValues option
1 parent 1a55b71 commit 1c0d6eb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

projects/core/reports/src/xls-report/xls-report.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ function _buildChart(name: string, sheet: {[key: string]: string}[]): AjfWidget
244244
const stacked = boolOption(options['stacked']);
245245
const beginAtZeroX = boolOption(options['beginAtZeroX']);
246246
const beginAtZeroY = boolOption(options['beginAtZeroY']);
247-
const removeZeroValues = boolOption(options['removeZeroValues']);
247+
const removeZeroValues =
248+
options['removeZeroValues'] != null ? Boolean(options['removeZeroValues']) : true;
248249
const mainDataNumberThreshold = +options['mainDataNumberThreshold'] || 10;
249250

250251
const dataset: AjfChartDataset[] = [];
@@ -327,8 +328,8 @@ function _buildChart(name: string, sheet: {[key: string]: string}[]): AjfWidget
327328
...{width: '100%', maxWidth: '1000px', margin: '10px auto'},
328329
},
329330
exportable: true,
330-
mainDataNumberThreshold,
331-
removeZeroValues,
331+
mainDataNumberThreshold: mainDataNumberThreshold,
332+
removeZeroValues: removeZeroValues,
332333
} as AjfWidgetCreate);
333334
}
334335

0 commit comments

Comments
 (0)