Line graph in 5 min interval showing previous values

Value Time
6.55 2023-08-24 18:08:00
6.49 2023-08-24 18:11:40
6.50 2023-08-24 18:13:30

I have a line graph of value vs time with minimum interval set to 5m I want to create a 5 min window of this data so when when the graph is created it shows at 18:05:00 the value as 6.55 whereas this value came after…at 18:08:00 similarly on 18:10:00 it shows 6.49 where my value occurred at 18:11:40….so things are going wrong how can i fix this…

Basically my requirement is that 6.55 should appear at 18:10 and not 18:05..wat changes will be needed?

as shown in below image there should not be any value at 18:05
and at 18:10 it should show 6.49

Hi @Saili_Bakalkar

welcome to the Kibana community.

Basically my requirement is that 6.55 should appear at 18:10 and not 18:05..wat changes will be needed?

In Kibana Lens each date histogram bucket has the label shown at the beginning of the bucket: the interval between 18:05 and 18:10 will be identified as 18:05.
Therefore the 6.55 value is shown for the date histogram bucket that starts at 18:05 and ends at 18:10, which is correct as from my understanding it happened at 18:08.

But at business level it is wrong as for them its like if no value was existing at 18.05 than the value should appear at 18.10 is there any way I can achieve this? Thats a critical business requirement...

Can you check the raw response from ES?

On the editor there's the Inspect button on the top right, then switch from View: Data to View: Request and check the Response tab.

{
  "id": "FkczQ256NzhUU182Z2UwRFAxYW5DbHcdc3djc08xQ05UUWVEZE96MEN6eV9Ddzo2NjI5MDU=",
  "rawResponse": {
    "took": 657,
    "timed_out": false,
    "_shards": {
      "total": 1,
      "successful": 1,
      "skipped": 0,
      "failed": 0
    },
    "hits": {
      "total": 3,
      "max_score": null,
      "hits": []
    },
    "aggregations": {
      "0": {
        "doc_count_error_upper_bound": 0,
        "sum_other_doc_count": 0,
        "buckets": [
          {
            "1": {
              "buckets": [
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T17:30:00.000+05:30",
                  "key": 1692878400000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T17:35:00.000+05:30",
                  "key": 1692878700000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T17:40:00.000+05:30",
                  "key": 1692879000000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T17:45:00.000+05:30",
                  "key": 1692879300000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T17:50:00.000+05:30",
                  "key": 1692879600000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T17:55:00.000+05:30",
                  "key": 1692879900000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T18:00:00.000+05:30",
                  "key": 1692880200000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": 6.550000190734863
                    }
                  },
                  "key_as_string": "2023-08-24T18:05:00.000+05:30",
                  "key": 1692880500000,
                  "doc_count": 1
                },
                {
                  "2": {
                    "values": {
                      "50.0": 6.494999885559082
                    }
                  },
                  "key_as_string": "2023-08-24T18:10:00.000+05:30",
                  "key": 1692880800000,
                  "doc_count": 2
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T18:15:00.000+05:30",
                  "key": 1692881100000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T18:20:00.000+05:30",
                  "key": 1692881400000,
                  "doc_count": 0
                },
                {

                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T18:25:00.000+05:30",
                  "key": 1692881700000,
                  "doc_count": 0
                },
                {
                  "2": {
                    "values": {
                      "50.0": null
                    }
                  },
                  "key_as_string": "2023-08-24T18:30:00.000+05:30",
                  "key": 1692882000000,
                  "doc_count": 0
                }
              ]
            },
            "2": {
              "values": {
                "50.0": 6.5
              }
            },
            "key": "CALL",
            "doc_count": 3
          }
        ]
      }
    }
  },
  "isPartial": false,
  "isRunning": false,
  "total": 1,
  "loaded": 1,
  "isRestored": true
}

So the response from ES is actually reporting that value for the 18:05 bucket:

{
                  "2": {
                    "values": {
                      "50.0": 6.550000190734863
                    }
                  },
                  "key_as_string": "2023-08-24T18:05:00.000+05:30",
                  "key": 1692880500000,
                  "doc_count": 1
                },

If you see the same data in Discover, do you seen anything between 18:00 and 18:05?

There is nothing in the 18:00 and 18:05 bucket

Can you extend the time range in Discover and check? I see the @timestamp field which is probably the default time field for the dataView, I guess, and that might filter out some trade_timestamp values.

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