c3js / c3js/c3

Wrong axis range after append data by flow()

Open
#2,815 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

I already have data displayed in the graph (high Y values). Using **flow()** to reads new (much lower) values and old high values are discarded because the length parameter is used.
The X and Y axis range is set incorrectly. Only when I zoom in with the mouse wheel or resize the browser window does the axis ranges be adjusted.

Is this a issue? Is there any way to force recalculated axis ranges?

![](https://i.imgur.com/IFcMEgj.gif)

C3 version: 0.7.2
D3 version: 5.16.0
Browser: Chrome
OS: Windows 10

Update data:
```
this.$chart.flow({
x: 'x',
xFormat: '%Y-%m-%d %H:%M:%S.%L',
columns: [
dataX,
dataY
],
length: cropLen,
})
```

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.