Search code examples
javascriptlaravelamcharts

How to set he height of the container of my pieChart in amcharts?


I have a pie chart and my problem is that my display labels exceed my container. I wanted to adjust the height of my container but it's not working. I am using a pie chart of amcharts. I hope someone could help me. Here are my codes.

Here is my javascript

function regionPie(trigger){
    am4core.useTheme(am4themes_animated);
    var chart = am4core.create("m_chart_industry_composition", am4charts.PieChart);
    chart.innerRadius = am4core.percent(40);}}

Here is my blade

<div class="col-md-12 col-sm-8">
      <div id="m_chart_industry_composition">
       </div>
</div>

Any suggestion will be a good help.


Solution

  • you should use Responsive feature for amcharts

    There are some custom rules to make charts more reliable for all type of screens and setups.

    Hope this might be helpful to you