Timeseries data flows from the left after chart generation
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
I've attempted to create code that replicates an issue a few people are having EDIT: I am not using react-C3 but my issue is similar and posted to this issues thread before i realized it wasn't C3.js
[https://github.com/bcbcarl/react-c3js/issues/22](https://github.com/bcbcarl/react-c3js/issues/22)
In the process I rediscovered another issue I have been having where timeseries data flows starting from the left after a new generation until it traverses the chart and starts flowing right normally. I have not been able to solve this issue. I attempted to create a fiddle but I am unable to get c3 and d3 externals to load using rawgit... maybe someone else will have better luck (still new to js).
Some notes about the code, You can spawn as many charts as you want. Just click new chart to get a new one. Add data will add a single point to the chart, Auto data will add a point every 200ms and is a toggled button, unload and destroy do as they say. If you destroy a chart when auto update is active it will create an error much like we have been experiencing in the above link, though my problem is that unload isn't finished before destroy is called, i believe based off of this code test. There are things in the code that can be ignored as they were copied from an active project ... like moment() and the the position function for the tooltip.
Problems Noted:
Data flows to the extreme left after a chart is generated.
Zoom gets permanently disabled after flow is called once.
Not in the code, but .flush after manually adding data to the column arrays does nothing.
Code:
[c3 Mulit Timeseries Chart Test](https://gist.github.com/theonlyfox/2c7d993c20c24a4117b2e4ea1892d36f)
PS. this is a nitpicky thing but someone really should update the D3 link so it points to the best known stable version of D3 that works with C3 [D3 v3.5.17](https://github.com/d3/d3/releases/tag/v3.5.17) when I started learning C3 I spend hours trying to get things to work before I realized your Docs D3 link was to the newest ver of D3 now in the 4s.
* **C3 version**: 0.4.18
* **D3 version**: 3.5.17
* **Browser**: FF 57.0.4 (64-bit)
* **OS**: Ubuntu : 16.04.3 LTS (64-bit)
Contributor guide
Assessment
This issue has not been assessed yet.