-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong stack order when names a mix of text only and numbers only #1534
Comments
Probably related to the same issue: When the column title is a number (or a string that just contains a number), then the given order of the columns is ignored, and they're rendered in ascending numerical order of the column title. This renders the columns in order they're listed (i.e. 'data5', 'data1', 'data2', 'data4', 'data3') var chart = c3.generate({
data: {
columns: [
['data5', 30],
['data1', 130],
['data2', 35],
['data4', 60],
['data3', 100]
],
type: 'bar'
}
}); This renders the columns in ascending order of their titles (i.e. 1, 2, 3, 4, 5): var chart = c3.generate({
data: {
columns: [
[5, 30],
[1, 130],
[2, 35],
[4, 60],
[3, 100]
],
type: 'bar'
}
}); |
For those stumbling on this looking for a quick fix, I append a space to my column headers.
Here's an example: |
The cause of this issue it the pivot format used between the input data and the generation of the targets. It uses the names as object keys. It "works" when the names are alphanumerical but not at all of the names is numeric. |
Thanks for the issue. This has been fixed at v0.5.3 by #2314 . |
The below code breaks the order and puts the number only name first
This code works as expected
The text was updated successfully, but these errors were encountered: