If no data line graph value to zero

Hi, I’m lcc3108
My English is not good

I develop google analytics plugin.

When querying through the GA API, the data comes in the following format
(date range 2021-03-21 to 2021-03-21)

{
  "reports": [
    {
      "columnHeader": {
        "dimensions": ["ga:dateHour"],
        "metricHeader": {
          "metricHeaderEntries": [
            {
              "name": "ga:users",
              "type": "INTEGER"
            }
          ]
        }
      },
      "data": {
        "rows": [
          {
            "dimensions": ["2021032103"],
            "metrics": [
              {
                "values": ["1"]
              }
            ]
          },
          {
            "dimensions": ["2021032110"],
            "metrics": [
              {
                "values": ["1"]
              }
            ]
          }
        ],
        "totals": [
          {
            "values": ["2"]
          }
        ],
        "rowCount": 2,
      }
    }
  ]
}

plugin convert data to grafana dataframe

Chart

I want line graph to zero when there is no data


Grafana have this kind of function? or plugin add padding data frame

Thanks

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.