How to display NaN in a time series panel?

My query of a time series returns NaN in values. And the panel stops showing anything.

    {
        "metric": "Garage_ACP",
        "tags": {
            "unit": "W"
        },
        "aggregateTags": [],
        "dps": {
            "1731923221": 949.0,
            "1731923289": nan,
            "1731923361": 971.0,
            "1731923430": 941.0
        }
    }

How do I display such a time series in panel? I tried value mapping but it still doesn’t work.

can you fix it on the datasource side itself? is it a rest api? and which datasource are you using?

The data source is TickTockDB, a OpenTSDB APIs compatible Time Series DB. I am actually the co-owner of TickTockDB.

Well, we could fix TickTockDB to return a numerical value like ‘0’ in case NaN. But still NaN is different from ‘0’ semantically. Clients might make mistakes in their inputs to TickTockDB and want to pinpoint it. This question is basically derived from a client’s request.

It would be great if Grafana could map NaN/Null to a numerical value so that we can visualize time series even if with NaN/Null. I thought Grafana supports that. But it seems not, does it?

which numerical value would that be?

0 probably the default one. But it is up to user to decide by using value mapping.

grafana’s value mapping ? or some other value mapping? your requirements seem to keep changing with every post.

I am referring to Grafana’s value mapping. If Grafana’s value mapping doesn’t support this currently, please do let me know. I am fine with that. Just try to get a clarification.

this might help

the data you posted is not even valid json. if you vetted this data via some json validator it will complain about nan. highly recommend you tackle it on the datasource itself.