0
votes

how can I set the size of this chartjs ? all screen ( height - width )

Test chart - jsfiddle.net

I try with

width:100% and height:100%

in div canvas , but don't work.

sorry my bad english :(

Thanks!

1
Seems to work for me: jsfiddle.net/swtakxo0/2 I'll add that height: 100% gets ignored as the chart will attempt to keep the aspect ratio. So you can set height to a px value to have it ignore the aspect ratio. - Tony
yes !! that work! thanks! - Sergio Corral Orellana

1 Answers

0
votes

As per the comments:

Seems to work for me. I'll add that height: 100% gets ignored as the chart will attempt to keep the aspect ratio. So you can set height to a px value to have it ignore the aspect ratio.

The styling was done via css:

#chart {
    width: 100%;
    height: 600px;
}

http://jsfiddle.net/swtakxo0/2