Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CRajiv opened this issue Mar 7, 2023 · 1 comment
Open

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

CRajiv opened this issue Mar 7, 2023 · 1 comment

Comments

@CRajiv
Copy link

CRajiv commented Mar 7, 2023

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); } }, }, },

@CRajiv CRajiv changed the title Chart streaming stops when browser tab is not active Chartjs Line chart streaming stops when browser tab is not active Mar 7, 2023
@alexbodn
Copy link

it seems to be a feature of the browser that slows down on inactive tabs.
it should be configurable per tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants