以下饼图显示在 Chrome 和 Edge 中,但不在 Firefox(最新版本 88)中。
我正在尝试水平对齐两个 div。左边是表格,右边是图表。
我省略了表单 html 中的所有细节,因为我认为它们不相关。
我也试过用float:left
vsfloat:none;
或float: right
代替display: inline-block
<div style="display: inline-block;vertical-align:top;">
<h2>{{title}}</h2>
<form [formGroup]="rangeFormGroup">
<div>
<mat-form-field appearance="fill">
</mat-form-field>
</div>
<div>
<mat-form-field appearance="fill">
</mat-form-field>
<br>
<mat-form-field appearance="fill">
</mat-form-field>
</div>
</form>
</div>
<div style="display: inline-block;height: 500px;width: 500px;">
<highcharts-chart
[Highcharts]="Highcharts"
[constructorType]="chartConstructor"
[options]="chartOptions[0]"
[(update)]="updateFlag"
[oneToOne]="oneToOneFlag"
[runOutsideAngular]="runOutsideAngular"
></highcharts-chart>
</div>
这是我从 chrome 看到的
从火狐
当我构建时,我收到一条警告说
Warning: F:\myapp\src\app\app.component.ts depends on 'highcharts'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
但也许这也不是原因(或者为什么它只影响Firefox?)