c3js / c3js/c3

Proper y/y2 axis ticks as per the given tick count

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

When we define a tick count for **y** axis, then ticks for **y** axis become odd.
```
var chart = c3.generate({
data: {
columns: [
['data1', 30, 200, 100, 400, 150, 250],
['data2', 50, 20, 10, 40, 15, 25]
]
},
axis: {
y: {
tick: {
count: 6
}
}
}
});
```
![image](https://user-images.githubusercontent.com/70358925/130612421-4f80260b-319c-492d-aef2-222d9d1ca22c.png)

Can we have proper logical y axis ticks for the given tick count?

**Expected behaviour**
- Proper number rounding. (ex: 160 rather 158.2)
- Equal and logical intervals among ticks (ex: 50, 100, 150 etc)
- No decimal points for ticks

* **C3 version**: 0.7.20 (latest)
* **D3 version**: ^5.8.0

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.