Chartjs-Chart.js: Don't stretch axes beyond chart

0👍

You may want to add delay at streaming plugin, the config will look something like:

scales: {
      x: {
        type: 'realtime',   // x axis will auto-scroll from right to left
        realtime: {         // per-axis options
          delay: 1000,      // delay of 1000 ms, so upcoming values are known before plotting a line
          pause: false,     // chart is not paused
          ttl: undefined,   // data will be automatically deleted as it disappears off the chart
          
        }
      },
      

I have tested this on your code, and it seems to work as expected, you may want to tune some parameters as needed.

Leave a comment