1

I`m beginner in Grafana, I trying to build simple graph and getting a strange behavior. You are can see two dates (2/10 and 2/11) which is not exist, but Grafana drew them like they are exists.

How can I configure Grafana for set value to 0 for this two dates ?

enter image description here

Artem Chernov
  • 856
  • 2
  • 8
  • 26
  • 1
    Might need to put some SQL into the mix to somehow generate zero if null for each date between the set. Otherwise the line will be drawn from the last value until the next and if that skips dates between then it does. Consider setting the line to false and show points only or perhaps staircase line would be better in your case, etc. Otherwise consider an SQL view or something to emulate a zero where null between the time_sec or whatever field per axis X. – Bitcoin Murderous Maniac Feb 19 '18 at 23:48
  • @bitcoinMurderousManiac may be you are right about rewrite sql – Artem Chernov Feb 20 '18 at 15:51
  • @BitcoinMurderousManiac I did some research too, I guess to resolve this task I should create [date table](https://stackoverflow.com/questions/48888665/how-write-a-query-which-receives-data-group-by-date/48888881?noredirect=1#comment84783266_48888665) in my database. What you think about it ? – Artem Chernov Feb 22 '18 at 07:55
  • Did you see this answer by chance? https://stackoverflow.com/questions/10132024/how-to-populate-a-table-with-a-range-of-dates/10132142#10132142 – Bitcoin Murderous Maniac Mar 02 '18 at 04:10

1 Answers1

0

You can configure how null values are rendering in the Graph panel. by setting the Null value setting under Stacking & Null value http://docs.grafana.org/features/panels/graph/#display-styles

Carl Bergquist
  • 3,894
  • 2
  • 25
  • 42