删除Angular Chart左侧和右侧的额外空白区域

问题描述 投票:2回答:1

How to remove the white space marked in red?

I wanted the chart to display like this

我正在使用离子框架,请在下面找到我的

<div class = "row responsive-sm">
  <div class = "item col col-50" >
      <canvas id="doughnut" class="chart chart-doughnut" style="padding: 10" 
        chart-data="data" chart-options="options" chart-labels="labels">
      </canvas> 
  </div>
  <div class = "item col" >
            <canvas id="doughnut" class="chart chart-doughnut"
        chart-data="data" chart-options="options" chart-labels="labels">
      </canvas> 
  </div>
</div>
angularjs ionic-framework chart.js angular-chart
1个回答
2
投票

你必须像这样在画布上提供宽度和高度......

<canvas width="100%" height="100%" id="myChart"></canvas>
© www.soinside.com 2019 - 2024. All rights reserved.