Apex Real Time Graph

I use Apex Chart to visualization my real time bandwidth usage.
The update interval set to 1s and if we see in the picture the line is not same for previous second, seem the value is changed.

Here my config

type: custom:apexcharts-card
graph_span: 15m
header:
  title: Queue
  show: true
all_series_config:
  stroke_width: 2
  type: line
update_interval: 1s
series:
  - entity: sensor.test1_queue_in_mbps
    name: test1
    color: green
    group_by:
      func: last
      duration: 10s

Your config is set to plot the last data point from every 10 seconds, and refresh every second. So upon every refresh, it’s picking data that is 1s later than the previous refresh.

For example it plots a data point at 10:00:00, 10:00:10, 10:00:20, etc. Then when it refreshes one second later, it plots a data point from 10:00:01, 10:00:11, 10:00:21, etc.

make sense, after i use same interval for refresh and duration now the graph is stable.