Skip to content

Chartjs Line chart streaming stops when browser tab is not active #191

@CRajiv

Description

@CRajiv

Chart stops streaming when browser tab is not active. Here is picture of my chart and code. You can see that in below image, very few datapoints are added into the chart when browser tab is not active ,and once the tab is active then the chart starts to do streaming as per configured refresh time. Please help me on this.

### Screenshot
ChartJS_Delay

ReactJS Code

scales: { x: { type: "realtime", ticks: { color: "#cdd5d9", }, realtime: { refresh: configData.Refreshtimer, // onRefresh callback will be called every 100 ms // onrefresh callback to update datasets onRefresh: function () { currObj = { x: Date.now(), y: Math.random(), }; chartRef.current.data.datasets[0].data.push(currObj); } }, }, },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions