c3js / c3js/c3

data order does not sort correctly when x axis is category type

Open
#2,572 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

* **C3 version**: 0.6.12
* **D3 version**: 5.7.0
* **Browser**: Chrome
* **OS**: Linux CentOS 7

Example, data2 should be on top of tooltip for the last bar but it is not.

To replicate, replace code in https://c3js.org/samples/data_order.html with the code below
```
var chart = c3.generate({
data: {
x: 'x',
columns: [
['x', 'data1', 'data2', 'data3'],
['data1', 130, 200, 320],
['data2', -130, 10, 430],
['data3', -130, -50, -10]
],
type: 'bar',
groups: [
['data1', 'data2', 'data3']
],
order: 'desc' // stack order by sum of values descendantly. this is default.
},
axis: {
x: {
type: 'category'
}
}
});
```

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.