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
Geting the above error while trying to view the data as a graph, but am able to view it as a table perfectly.
The data in mongoDB is of the format date time.
Has anyone faced similar issue like this!
The text was updated successfully, but these errors were encountered:
fyi, "ts" is the hard-coded time-series key. I was using "date_time" and trying to get several documents. Ended up rewriting the getTimeseriesResults function in mongodb-grafana/dist/server/mongodb-proxy.js to fix things.
function getTimeseriesResults(docs)
{
var results = {}
for ( var i = 0; i < docs.length; i++)
{
var doc = docs[i]
for (const [key, value] of Object.entries(doc))
{
if (key =='date_time')
continue
if (!(key in results))
{
results[key] = {'target': key, 'datapoints':[]}
}
else
{
results[key].datapoints.push([value, doc['date_time'].getTime()])
}
}
}
console.log(results)
return results
Geting the above error while trying to view the data as a graph, but am able to view it as a table perfectly.
The data in mongoDB is of the format date time.
Has anyone faced similar issue like this!
The text was updated successfully, but these errors were encountered: