Santosh
Santosh

Reputation: 885

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?

Upvotes: 8

Views: 47051

Answers (1)

Satya
Satya

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

Related Questions