Angular 如何在我的对话框中添加滚动条?
我正在使用以下功能打开一个对话框窗口:Angular 如何在我的对话框中添加滚动条?,angular,angular-material,dialog,scrollview,scrollbar,Angular,Angular Material,Dialog,Scrollview,Scrollbar,我正在使用以下功能打开一个对话框窗口: doOutput(){ this.dialog.open(NgxChartsComponent ) ; } 我的NgxChartsComponent的HTML代码是: <!-- The chart type goes in here --> <div> This is a visual representation of a line chart</div> <div style="disp
doOutput(){
this.dialog.open(NgxChartsComponent ) ;
}
我的NgxChartsComponent
的HTML代码是:
<!-- The chart type goes in here -->
<div> This is a visual representation of a line chart</div>
<div style="display: inline-block">
<ngx-charts-line-chart
[view]="view"
[scheme]="colorScheme"
[results]="multi"
[gradient]="gradient"
[xAxis]="showXAxis"
[yAxis]="showYAxis"
[legend]="showLegend"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[xAxisLabel]="xAxisLabel"
[yAxisLabel]="yAxisLabel"
[autoScale]="autoScale"
[timeline]="timeline"
(select)="onSelect($event)">
</ngx-charts-line-chart>
</div>
<br>
<div> This is a visual representation of a area chart</div>
<div style="display: inline-block">
<ngx-charts-area-chart
[view]="view"
[scheme]="colorScheme"
[results]="multi"
[gradient]="gradient"
[xAxis]="showXAxis"
[yAxis]="showYAxis"
[legend]="showLegend"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[xAxisLabel]="xAxisLabel"
[yAxisLabel]="yAxisLabel"
[autoScale]="autoScale"
(select)="onSelect($event)">
</ngx-charts-area-chart>
</div>
<br>
<div> This is a visual representation of a pie chart</div>
<div style="display: inline-block">
<ngx-charts-pie-chart
[view]="view"
[scheme]="colorScheme"
[results]="single"
[legend]="showLegend"
[explodeSlices]="explodeSlices"
[labels]="showLabels"
[doughnut]="doughnut"
[gradient]="gradient"
(select)="onSelect($event)">
</ngx-charts-pie-chart>
</div>
这是折线图的直观表示
这是面积图的直观表示
这是饼图的直观表示
我使用
MatDialog
和MatDialogRef
来创建我的对话框,它运行良好,但我必须缩小屏幕以查看对话框的全部内容,并且没有滚动功能!请帮助我了解如何将滚动添加到弹出对话框窗口?我想您只需要一个简单的溢出:滚动
在对话框的css中,应该使用MatDialogContent来定义可滚动的内容。就像这样:
<mat-dialog-content>
<!-- put your lage content here -->
</mat-dialog-content>
您可以在这里看到第一个示例如何创建弹出窗口?。确保ngbModal有一个可滚动选项,并且我支持“材质”对话框too@Eliseo:我使用
MatDialog
。也许你应该读一下:@standby954:我不明白我到底应该做什么?我应该把我的html代码放在mat对话框标签中吗?你说的对话框css是什么意思?您是指Ngxcharts.component
的css代码吗?