c3js / c3js/c3

Reduced height when resizing

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

I am using c3 in order to show some bar charts. Actually I just started using c3 but I noticed a weird habit. Maybe I set it up wrong but I did not change much from the examples.
When I resize my window and my container gets smaller also the chart gets smaller which make sense because everything should be responsive. But when I resize my window to be as big as before only the width scales up and not the height. When I repeat this a few times the chart wont be visible at all.
This is my code to init the chart. Everything is shown correctly. I did not apply any other css.

``` javascript
var chart = c3.generate({
bindto: this.find('.chart1'),
data: {
x: 'x',
columns:newdata,
type: 'bar'
},
bar: {
width: {
ratio: 1
}
}
});

```

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.