Angular ngx图表图例位置错误

Angular ngx图表图例位置错误,angular,ngx-charts,Angular,Ngx Charts,各位开发者好, 我一直在使用ngx图表制作我的图表,到目前为止,一切都很好,但当我尝试将图例的位置移动到下方时,它就像超出了图表的边界,无论我做什么,我都无法正确地看到它,并且在侧面保留了一个空间,好像它将被放置在那里 我分享了一些我正在使用的代码和一个小图片 <div class="widget-body"> <div class="clearfix" style="height: 450px; padding: 0px"> <i class="

各位开发者好,

我一直在使用ngx图表制作我的图表,到目前为止,一切都很好,但当我尝试将图例的位置移动到下方时,它就像超出了图表的边界,无论我做什么,我都无法正确地看到它,并且在侧面保留了一个空间,好像它将被放置在那里

我分享了一些我正在使用的代码和一个小图片

<div class="widget-body">
   <div class="clearfix" style="height: 450px; padding: 0px">
      <i class="fa fa-spin fa-spinner fa-5x center-spinner" *ngIf="salesSpinner == true"></i>
      <ngx-charts-line-chart *ngIf="salesSpinner == false"
         [scheme]="colorScheme"
         [results]="salesData"
         [legend]="legend"
         legendPosition="below"
         [xAxis]="showXAxis"
         [yAxis]="showYAxis"
         [showXAxisLabel]="showXAxisLabel"
         [showYAxisLabel]="showYAxisLabel"
         [xAxisLabel]="xAxisLabel1"
         [yAxisLabel]="yAxisLabel1">
         </ngx-charts-line-chart>
   </div>
</div>

如果您看到下面的链接,您会注意到图例超出了边界,没有显示


将其添加到styles.css或任何全局css文件中

ngx-charts-legend {
  display: block !important;
}
您好,legend Position=“below”功能对我不起作用。你能告诉我你是怎么做到的吗?