You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the latest version of this plugin with Grafana v7.0.1, we've noticed a bug in how the sub-group values are shown. If a sub-group value is not present in the first data point of the first main category column, but is present on subsequent main category columns, it won't be shown on any of them.
Take this SQL:
CONCAT(MONTH(sampled),"/",DAY(sampled)) as date,
recipe,
ber,
sampled
ORDER BY sampled
Which generates these values:
Generates this plot:
Note how it is missing the GENZ_ALL_IBIST_OTXEQ sub-group values. However, if we change the time range such that the first main category column has a value for that sub-group (starting at 6/4 vs 6/3), it shows up as expected for the rest of the main category columns:
The text was updated successfully, but these errors were encountered:
I tried to root cause the issue, but couldn't track it down. I did create a simple patch to workaround the issue. The patch looks like this, and works great:
diff --git a/dist/ctrl.js b/dist/ctrl.js
index 9da3a76..9bb34c5 100644
--- a/dist/ctrl.js+++ b/dist/ctrl.js@@ -149,6 +149,29 @@ System.register(['app/plugins/sdk', 'lodash', 'app/core/utils/kbn', 'app/core/ti
key: 'onDataReceived',
value: function onDataReceived(dataList) {
if (dataList && dataList.length) {
+ // Workaround bug where bars are missing if not present in first data point+ if (dataList[0].rows && dataList[0].rows.length) { + // Make a set of all the main categories used in any data point+ let mySet = new Set()+ var firstCategory = dataList[0].rows[0][0];+ dataList[0].rows.forEach((element) => {+ mySet.add(element[1]);+ })+ // Remove the main categories already part of the first data point+ dataList[0].rows.forEach((element) => {+ if (firstCategory == element[0]) {+ mySet.delete(element[1]);+ };+ })+ // Add the main categories missing from the first data point to it with data=0+ for (let item of mySet) {+ var row = Array.from(dataList[0].rows[0]);+ row[1] = item;+ row[2] = 0;+ dataList[0].rows.push(row);+ };+ }+
var o = _.groupBy(dataList[0].rows, function (e) {
return e[0];
});
When using the latest version of this plugin with Grafana v7.0.1, we've noticed a bug in how the sub-group values are shown. If a sub-group value is not present in the first data point of the first main category column, but is present on subsequent main category columns, it won't be shown on any of them.
Take this SQL:
CONCAT(MONTH(sampled),"/",DAY(sampled)) as date,
recipe,
ber,
sampled
ORDER BY sampled
Which generates these values:
Generates this plot:
Note how it is missing the GENZ_ALL_IBIST_OTXEQ sub-group values. However, if we change the time range such that the first main category column has a value for that sub-group (starting at 6/4 vs 6/3), it shows up as expected for the rest of the main category columns:
The text was updated successfully, but these errors were encountered: