Bars diagram in Chronograf don't work like i expected

I have a query that calculates energy used per day.

SELECT DERIVATIVE(last("value"), 1d) as usage FROM "home_assistant"."autogen"."kWh" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND "entity_id"='consumption_low_tarif_sensor' GROUP BY time(1d) FILL(none)

I get different results for the table view and the bars view:

I expected two bars (one for each day) with these values but i only get one bar for the last day.

Am i doing something wrong? Anything i should add to the query?

I’ve tried a similar query and it works as expected, in both visuals… but I found the problem

The Query:
SELECT DERIVATIVE(Last("Percent_User_Time")) AS "Derivate of last CPU %" ,last("Percent_User_Time") AS "Last CPU %" FROM "windows_system_monitor"."autogen"."win_cpu" WHERE time > :dashboardTime: AND time < :upperDashboardTime: GROUP BY time(1d) FILL(null)

First example:
Date Picker From 2019-12-09 00:00 to 2020-01-02 10:11

which gives me this result:
time | win_cpu.Derivate of last CPU %   | win_cpu.Last CPU %
------------------------------------------------------------
2019-12-09T00:00:00.000Z | 			    | 6.228960514
2019-12-10T00:00:00.000Z | 10.80228376  | 17.03124428
2019-12-11T00:00:00.000Z | -12.4821806  | 4.549063683
2019-12-12T00:00:00.000Z | -2.20650363  | 2.342560053
2019-12-13T00:00:00.000Z | -1.575127363 | 0.76743269
2019-12-14T00:00:00.000Z |  			| 
2019-12-15T00:00:00.000Z |  			| 
2019-12-16T00:00:00.000Z | 0.046413362  | 0.906672776
2019-12-17T00:00:00.000Z | -0.906672776 | 0
2019-12-18T00:00:00.000Z | 1.265742183  | 1.265742183
2019-12-19T00:00:00.000Z | 41.46238816  | 42.72813034
2019-12-20T00:00:00.000Z | -11.9473877  | 30.78074265

In the chart, the first value is visible: (mean = 6.228960514)

Second example:
Date Picker From 2019-12-09 10:00 to 2020-01-02 10:11
Note that the range starts 10min later

The table returns the same values (but keep in mind that values of the first ten minutes won’t be considered, which is not a problem in this case since the last value is not in that range)

In the chart, the first value is plotted but is somehow hidden: (mean = 6.228960514)
2020-01-02_10-35-15

I’m not sure if this is a bug or if it’s working as intended, for the moment ensure that the range starts exactly from “00:00”… (maybe the Influx guys cant tell us something about that @rawkode)

Hope this explains your issue.

Thanks for your answer.

I see a pattern here indeed. Only the first bar is missing. We’re some days further and this is the result now:

So waiting solves my problem :slight_smile: