Page 1 of 1

Responsive pie is possible?

Posted: Tue Nov 27, 2018 12:20 am
by orochimaster
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.

Re: Responsive pie is possible?

Posted: Tue Nov 27, 2018 12:38 pm
by bastss
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!

Re: Responsive pie is possible?

Posted: Thu Nov 29, 2018 12:10 am
by orochimaster
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?

Re: Responsive pie is possible?

Posted: Thu Nov 29, 2018 10:34 am
by bastss
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!