@isoftdata/utility-dashboard-backend 1.5.2 → 1.5.3
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/index.js +10 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -36,7 +36,15 @@ const handleChartTypeSpecificQuirks = (chartType, resultSet) => {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const loadChartData = async(mysqlConnection, { name, query: queryObject, formatting, chartWrapper, multiSeries, table, parameters, supertype, ...theRest }) => { // needs database connection
|
|
39
|
-
|
|
39
|
+
if(!chartWrapper){
|
|
40
|
+
chartWrapper = {
|
|
41
|
+
chartType: supertype,
|
|
42
|
+
options: {
|
|
43
|
+
height: 450, width: 800
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const { dataTable, processedFormatting } = await loadDataTableAndProcessedFormatting(mysqlConnection, { query: queryObject, multiSeries, formatting, chartType: chartWrapper?.chartType })
|
|
40
48
|
|
|
41
49
|
if (chartWrapper?.chartType === 'Table') {
|
|
42
50
|
return {
|
|
@@ -75,7 +83,7 @@ const loadDataTableAndProcessedFormatting = async(mysqlConnection, { query: quer
|
|
|
75
83
|
|
|
76
84
|
const processedFormatting = handleFormattingTemplates(formatting)
|
|
77
85
|
|
|
78
|
-
if (chartType
|
|
86
|
+
if (chartType?.toLowerCase() === 'table') {
|
|
79
87
|
return { dataTable: getRactiveTableDataFormat(data, fields, processedFormatting), processedFormatting }
|
|
80
88
|
}
|
|
81
89
|
|
package/package.json
CHANGED