在角形图的左边和右边删除额外的空白

时间:2022-11-20 07:55:14

How to remove the white space marked in red?

如何去除红色的空格?

I wanted the chart to display like this

我希望图表像这样显示

I am using ionic framework, please find my below

我正在使用ionic framework,请在下面找到我的

<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>

1 个解决方案

#1


2  

you have to provide width & height in canvas like this...

你必须在画布上提供这样的宽度和高度……

<canvas width="100%" height="100%" id="myChart"></canvas>

#1


2  

you have to provide width & height in canvas like this...

你必须在画布上提供这样的宽度和高度……

<canvas width="100%" height="100%" id="myChart"></canvas>