Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set width of chart, highcharts

Is it possible to set width of highcharts using percentage? Whenever the page is resized the charts should be responsive enough to fit the page size?

One Solution

Question here is I have 3 charts which i need to display side by side and every-time the page is re-sized the 3 charts should scale up and use the screen size accordingly. Is it possible to doing using highcharts?

Solution of this problem?

like image 571
Santosh Avatar asked Feb 25 '13 06:02

Santosh


1 Answers

Wrap your charts in a container and this will give you the flexibility to adjust the chart size when your screen changes.

Also provide a width to your wrapper and make it float to the left so that charts are placed side by side.

Here's an example: http://jsfiddle.net/ZrTux/9/

.chart-wrapper {
    float: left;
    padding-bottom: 40%;
    position: relative;
    width: 45%;
}
like image 123
Satya Avatar answered Sep 18 '22 13:09

Satya