c3js / c3js/c3

My chart lines are not in order

Open
#2,181 2 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 have a graph and the result of joining all the lines should be as in the image. but currently they are not. what am I doing wrong?

https://i.stack.imgur.com/Bi7lq.jpg

https://jsfiddle.net/r2uaq27a/

var chart = c3.generate({
data: {
xs: {
data1: "data2"
},
columns: [
['data1', 2,3,4,7,8,9,8,7,3],
['data2', 1,2,3,4,5,4,3,2,1]
]

}
});

Contributor guide

Open the contributing guide

Research direction

Start with the linked JSFiddle and reproduce the chart using the supplied c3.generate configuration. Compare the rendered line order with the linked image, focusing on the data1/data2 columns and xs mapping. Done means the chart connects the points in the intended order and the behavior is verified in the fiddle.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.