@isoftdata/utility-dashboard-backend 1.4.5 → 1.4.7

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/chart-helper.js CHANGED
@@ -154,7 +154,7 @@ module.exports = {
154
154
  const rowWithValidValue = data.find(row => row[columnProp] !== null)
155
155
  let nullReplacement = ''
156
156
 
157
- if ((destinationType && destinationType === 'number') || (typeof rowWithValidValue[columnProp] === 'number')) {
157
+ if ((destinationType && destinationType === 'number') || (rowWithValidValue && typeof rowWithValidValue[columnProp] === 'number')) {
158
158
  nullReplacement = 0
159
159
  }
160
160
 
package/index.js CHANGED
@@ -21,6 +21,9 @@ const handleChartTypeSpecificQuirks = (chartType, resultSet) => {
21
21
  case 'TreeMap':
22
22
  //tree charts need the 2nd columns to be not null
23
23
  resultSet = coerceNullColumn(Object.keys(resultSet[0])[1], resultSet)
24
+ if (resultSet.length === 1) {
25
+ resultSet[0].id = 'No Data'
26
+ }
24
27
  break
25
28
  default:
26
29
  //all charts need the first column to be not null
@@ -187,6 +190,7 @@ module.exports = {
187
190
  charts: chartsInReport,
188
191
  parameterValues,
189
192
  ownerId: report.ownerId,
193
+ autoRefreshInterval: report.autoRefreshInterval,
190
194
  }
191
195
  } catch (err) {
192
196
  console.error(err)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/utility-dashboard-backend",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "description": "A utility for formatting chart and report data to be usable by the frontend dashboard component.",
5
5
  "main": "index.js",
6
6
  "scripts": {