c3js / c3js/c3

On Resize issue

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

on resize of window c3.js chart scale from its normal width of div.
on reload of window its looking fine.

![screen shot 2016-07-28 at 2 06 47 pm](https://cloud.githubusercontent.com/assets/3308352/17206280/956fccc0-54cc-11e6-9505-c4ab74970bdd.png)

var splinechart = c3.generate({
size: {
height: 220,
},
bindto: '#fd_chart2',

```
padding: {
top: 10,
right: 15,
bottom: 0,
left: 40,
},
data: {
transition: {
duration: 20000
},
columns: [
['Tx', 300, 350, 300, 0, 0, 0,200],
['Rx', 130, 100, 140, 200, 150, 50,300],

],
types: {
Tx: 'area-spline',
Rx: 'area-spline',

},
colors: {
Tx: '#5cd293',
Rx: '#1a78dd',

},

},
tooltip: {
show: false
},
point: {
show: false
},
axis: {
x: {
type: 'category',
padding: {
left: -0.5,
right: -0.5,
},
categories: ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],

},
y: {
padding: {bottom: 0},
min: 0,
tick: {
format: d3.format("s")
}
},
}

});
```

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.