"No field name specified to use for x-axis..." - when display graph as from table data

HI,
I have no idea what I’m doing wrong, or why my data is buggy. In Chrome console I got both
“Invalid dimensions for plot, width = 0, height = 0,…”
and
“No field name specified to use for x-axis, check your axes settings” errors.
The same thing happens on grafana 5.3.2, 5.3.4, 5.4.2
So probably there is some problem with my data (there is no problem with other graphs, but I have no idea whats wrong. Please help

graphProblem

Sample data:
{
“xhrStatus”: “complete”,
“request”: {
“method”: “POST”,
“url”: “api/tsdb/query”,
“data”: {
“from”: “1545379291733”,
“to”: “1545400891734”,
“queries”: [
{
“refId”: “A”,
“intervalMs”: 300000,
“maxDataPoints”: 772,
“datasourceId”: 1,
“rawSql”: " select \r\n convert(int,memoryUsagePercentage) as RAM,\r\n measurementUtcDateTime as time\r\n from NowbEnvs \r\n where hostname = ‘PRDSWMDT3’\r\n and $__timeFilter(measurementUtcDateTime)\r\norder by measurementUtcDateTime desc;“,
“format”: “table”
}
]
}
},
“response”: {
“results”: {
“A”: {
“refId”: “A”,
“meta”: {
“rowCount”: 683,
“sql”: " select \r\n convert(int,memoryUsagePercentage) as RAM,\r\n measurementUtcDateTime as time\r\n from NowbEnvs \r\n where hostname = ‘PRDSWMDT3’\r\n and measurementUtcDateTime BETWEEN ‘2018-12-21T08:01:31Z’ AND ‘2018-12-21T14:01:31Z’\r\norder by measurementUtcDateTime desc;”
},
“series”: null,
“tables”: [
{
“columns”: [
{
“text”: “RAM”
},
{
“text”: “time”
}
],
“rows”: [
[
75,
1545400800377
],
[
75,
1545400800350.0002
],
[
75,
1545400800350.0002
],
[
75,
1545400800347
],
[
75,
1545400749503
],
[
75,
1545400680237
],
[
75,
1545400620169.9998
],
[
75,
1545400560193
],
[
75,
1545400500337
],
[
75,
1545400500320
],
[
75,
1545400500320
],

Can’t delete post, but I found the answer in documentation. 1. Select Format as Time series (for use in Graph or Singlestat panel’s among others) or Table (for use in Table panel among others).

So it has to be time series for graph - period.

1 Like