c3js / c3js/c3

How can I change multiline for c3js bar chart x axis tick text

Open
#2,848 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

How can I change the multiline for c3js bar chart x axis tick text in normal horizontal mode?

****in normal horizontal mode, multiline is not working and how can I fix?**
As I noticed if included > rotate: 90, multiline is not working. but not okay to show without rotate because most of the tick values are long.**
`data: {
x: 'x',
columns: columns,
type: 'bar',
labels: true
},
axis: {
x: {
type: 'category',
tick: {
rotate: 90,
multiline: true
}
,
height: heightForX
},`
![image](https://user-images.githubusercontent.com/6792810/129001916-3f6a5596-2032-4fdb-91e4-04fd5da0f17e.png)

**multiline is correctly displayed in vertical mode.**
`axis: {
rotated: true,
x: {
type: 'category',
label: {
text: labelY,
position: 'outer-middle'
}
,
tick: {
multiline: true,
}
}
},`
![image](https://user-images.githubusercontent.com/6792810/129001456-bb5c28dc-3822-4091-befa-6d6128cb2441.png)

but cs3j sample, multiline is working with rotate mode
https://c3js.org/samples/axes_x_tick_rotate.html

![image](https://user-images.githubusercontent.com/6792810/129004396-ad6ca71b-1ad7-46c9-a992-ab4c803693b3.png)

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.