orochimaster
Posts: 16
Joined: Sun Jun 07, 2015 7:49 pm

Responsive pie is possible?

I made this jsfiddle:

http://jsfiddle.net/q5keu9p0/1/

1- What I want is the pie graphs to be responsive. You can see when you change the window screen the pie doesn't return to the original size when the screen was opened.

2- Is there a way to the height of the chart to be the sabe as the weight of the pie itself? In this exemple you can see the height of the graph to be very high compared to the weight of the graph.
bastss
Site Admin
Posts: 1192
Joined: Wed Oct 17, 2018 10:59 am

Re: Responsive pie is possible?

Hello orochimaster!

The pie chart, as any chart, is fully responsive, but using it inside the table is a common problem. Here you can find similar issues and explanations: viewtopic.php?t=32424
https://stackoverflow.com/questions/259 ... en-smaller
https://github.com/highcharts/highcharts/issues/1157
In your case problem was with style in HTML. Check this example: https://jsfiddle.net/BlackLabel/mvguzqh5/

Best regards!
Sebastian Wędzel,
Highcharts Developer
orochimaster
Posts: 16
Joined: Sun Jun 07, 2015 7:49 pm

Re: Responsive pie is possible?

There were something it couId be responsive is the height.

You can see the graph height is always 400px.

Is there a way this graph to height be reduced when the width of the graph/table/div is reduced?
bastss
Site Admin
Posts: 1192
Joined: Wed Oct 17, 2018 10:59 am

Re: Responsive pie is possible?

orochimaster,

As is written in the documentation: "By default (when null) the height is calculated from the offset height of the containing element, or 400 pixels if the containing element's height is 0." More information, explanations, and examples you can find here - API:https://api.highcharts.com/highcharts/chart.height .

Kind regards!
Sebastian Wędzel,
Highcharts Developer

Return to “Highcharts Usage”