Reputation: 885
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?
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?
Upvotes: 8
Views: 47051
Reputation: 2114
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%;
}
Upvotes: 19