apache / apache/echarts

[Feature] Option to peridiodically refresh

Open
#20,739 5 comments 0 reactions 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

Dear,
It seems weird to me if this feature wouldn't exist already, but cannot find anything unfortunately. Perhaps I am just searching for the wrong keywords. Apologies in that case already...

I am continiously appending new datapoints to my chart using `chart.appendData`. However calling each time the `chart.resize()` (to show the new appended datapoint) is too resource extensive. So I tried a simple workaround to refresh the chart only every 500 msecs, however the updating looks very ugly, as you can see in [this](https://codepen.io/bartbutenaers/pen/NPKQEOx) codepen. I have no idea what I am doing wrong... When you set the `refreshInterval` to value `0` in this codepen, then the chart is refreshed for every datapoint and then it looks better.

### What does the proposed API look like?

Perhaps add a parameter like `refreshInterval` (in msecs) or `refreshCount` (as a counter of new datapoints added) could be provided.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.