flow() with category-labels on the X-axis doesn't work
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
Example code:
```
var chart = c3.generate({
data: {
x: 'x',
columns: [
['x', '2012-12-29', '2012-12-30', '2012-12-31'],
['data1', 230, 300, 330],
['data2', 190, 230, 200],
['data3', 90, 130, 180],
]
},
axis: {
x: {
type: 'category' // this needed to load string x value
}
}
});
setTimeout(function () {
chart.flow({
columns: [
['x', '2013-01-11', '2013-01-21'],
['data1', 500, 200],
['data2', 100, 300],
['data3', 200, 120],
],
});
}, 1000);
```
## Expected behavior
Data flowing into the graph, new data added, with labels intact (the verbatim '2013-01-11' and '2013-01-21' values)
## Actual behavior
The data is flowing into the graph, new data added, but he labels are changed to '2', '3', and '4' (I suspect these are the array-indexes for the data entries)
On a side-node: when flowing data into the graph, the datastructure 'chart.x()' contains arrays with length 5, while only 3 elements are shown. When flowing a lot of data into a chart (I'm using it to flow new data into the chart every second) this will result in a memory problem. But I don't know if this is a related problem to the one addressed above.
Contributor guide
Assessment
This issue has not been assessed yet.