c3js / c3js/c3

When all values are zero, the y padding is not taken into account

Open
#1,302 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

While testing this, I obtain a curve at the bottom of graph without any padding:

```
var chart = c3.generate({
data: {
columns: [
['data1', 0, 0, 0, 0, 0, 0],
],
},
axis: {
y: {
padding: {top: 200, bottom: 200}
},
}
});
```

![c3](https://cloud.githubusercontent.com/assets/240595/9025238/ba18d18a-38fc-11e5-85a1-33c77d7ae40d.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the c3.generate configuration shown, using six zero values and y-axis top and bottom padding of 200. Trace how the y scale handles an all-zero series and verify that the resulting chart visibly includes the requested padding rather than placing the curve at the bottom.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.