Angular Grid Summaries
The Angular UI grid in Ignite UI for Angular has a summaries feature that functions on a per-column level as group footer. Angular grid summaries is powerful feature which enables the user to see column information in a separate container with a predefined set of default summary items, depending on the type of data within the column or by implementing a custom angular template in the Grid.
Angular Grid Summaries Overview Example
import { Component, ViewChild } from '@angular/core' ;
import { ColumnType, IgxGridComponent, IgxNumberSummaryOperand, IgxSummaryResult, IgxPaginatorComponent, IgxColumnComponent, IgxCellTemplateDirective, IgxCellHeaderTemplateDirective, IgxIconComponent } from 'igniteui-angular' ;
import { DATA } from '../../data/nwindData' ;
import { IgxPreventDocumentScrollDirective } from '../../directives/prevent-scroll.directive' ;
import { DatePipe } from '@angular/common' ;
class MySummary {
public operate(data?: any []): IgxSummaryResult[] {
const result = new IgxNumberSummaryOperand().operate(data);
result.push({
key : 'test' ,
label : 'Test' ,
summaryResult : data.filter((rec ) => rec > 10 && rec < 30 ).length
});
return result;
}
}
@Component ({
selector : 'app-grid-sample-3' ,
styleUrls : ['./grid-sample-3.component.scss' ],
templateUrl : './grid-sample-3.component.html' ,
imports : [IgxGridComponent, IgxPreventDocumentScrollDirective, IgxPaginatorComponent, IgxColumnComponent, IgxCellTemplateDirective, IgxCellHeaderTemplateDirective, IgxIconComponent, DatePipe]
})
export class GridSample3Component {
@ViewChild ('grid1' , { read : IgxGridComponent, static : true })
public grid1: IgxGridComponent;
public mySummary = MySummary;
public data;
public productId = 0 ;
constructor ( ) {
this .data = DATA;
this .productId = DATA.length;
}
public toggleSummary (column: ColumnType ) {
column.hasSummary = !column.hasSummary;
}
}
ts コピー <div class ="grid__wrapper" >
<igx-grid [igxPreventDocumentScroll ]="true" #grid1 [data ]="data" [autoGenerate ]="false" height ="600px" width ="100%" >
<igx-paginator > </igx-paginator >
<igx-column #col field ="ProductID" header ="Product ID" width ="17%" [headerClasses ]="'prodId'" >
</igx-column >
<igx-column #col field ="ProductName" header ="Product Name" width ="17%" [headerClasses ]="'prodId'" [hasSummary ]="true" >
<ng-template igxCell let-cell ="cell" let-val >
{{val}}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
<igx-column #col field ="UnitPrice" header ="Price" [filterable ]="false" width ="17%" [editable ]="true" dataType ="number"
[hasSummary ]="true" >
<ng-template igxCell let-cell ="cell" let-val let-row >
${{val}}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
<igx-column #col field ="UnitsInStock" header ="Units In Stock" width ="17%" dataType ="number" [editable ]="true"
[hasSummary ]="false" [summaries ]="mySummary" >
<ng-template igxCell let-cell ="cell" let-val let-row >
{{val}}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
<igx-column #col field ="Discontinued" header ="Discontinued" width ="17%" [hasSummary ]="true" [dataType ]="'boolean'" >
<ng-template igxCell let-cell ="cell" let-val >
@if (val) {
<img src ="https://www.infragistics.com/angular-demos-lob/assets/images/grid/active.png" title ="Continued" alt ="Continued" />
}
@if (!val) {
<img src ="https://www.infragistics.com/angular-demos-lob/assets/images/grid/expired.png" title ="Discontinued" alt ="Discontinued" />
}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
<igx-column #col field ="OrderDate" width ="15%" [dataType ]="'date'" [hasSummary ]="true" >
<ng-template igxCell let-cell ="cell" let-val let-row >
{{ val | date: 'MMM d, yyyy' }}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
</igx-grid >
</div >
html コピー .grid-controls {
display : flex;
flex-flow : column nowrap;
justify-content : space-between;
margin : 0 16px 24px ;
igx-switch {
margin-top : 24px ;
}
}
.grid__wrapper {
margin : 0 auto;
padding : 16px ;
}
.header {
height : 100% ;
}
:host ::ng-deep{
.igx-grid__th .title{
width: 100% ;
cursor : auto;
}
@media screen and (max-width : 677px ){
.header-icon {
padding-bottom : 17px ;
padding-top : 17px ;
font-size : 1.4em ;
width : 1.1em ;
height : 1.1em ;
float : right;
}
.header-text {
float :left ;
white-space : nowrap;
overflow : hidden;
text-overflow : ellipsis;
width : 50% ;
}
}
@media screen and (min-width : 677px ){
.header-icon {
padding-top : 17px ;
font-size : 1.4em ;
width : 1.1em ;
height : 1.1em ;
float : right;
}
.header-text {
float :left ;
white-space : nowrap;
overflow : hidden;
text-overflow : ellipsis;
width : 50% ;
}
}
@media screen and (min-width : 992px ){
.header-icon {
padding-top : 17px ;
font-size : 1.4em ;
width : 1.1em ;
height : 1.1em ;
float : right;
margin-right : 10px ;
cursor : pointer;
}
.header-text {
float :left ;
white-space : nowrap;
width : 50% ;
cursor : auto;
}
}
}
scss コピー
Like this sample? Get access to our complete Ignite UI for Angular toolkit and start building your own apps in minutes. Download it for free.
The summary of the column is a function of all column values , unless filtering is applied, then the summary of the column will be function of the filtered result values
Grid summaries can also be enabled on a per-column level in Ignite UI for Angular, which means that you can activate it only for columns that you need. Grid summaries gives you a predefined set of default summaries, depending on the type of data in the column, so that you can save some time:
For string
and boolean
data types
, the following function is available:
For number
, currency
and percent
data types, the following functions are available:
count
min
max
average
sum
For date
data type, the following functions are available:
All available column data types could be found in the official Column types topic .
Grid summaries are enabled per-column by setting hasSummary
property to true
. It is also important to keep in mind that the summaries for each column are resolved according to the column data type. In the igx-grid
the default column data type is string
, so if you want number
or date
specific summaries you should specify the dataType
property as number
or date
. Note that the summary values will be displayed localized, according to the grid locale
and column pipeArgs
.
<igx-grid #grid1 [data ]="data" [autoGenerate ]="false" height ="800px" width ="800px" (columnInit )="initColumn($event)" >
<igx-column field ="ProductID" header ="Product ID" width ="200px" [sortable ]="true" > </igx-column >
<igx-column field ="ProductName" header ="Product Name" width ="200px" [sortable ]="true" [hasSummary ]="true" > </igx-column >
<igx-column field ="ReorderLevel" width ="200px" [editable ]="true" [dataType ]="'number'" [hasSummary ]="true" > </igx-column >
</igx-grid >
html
The other way to enable/disable summaries for a specific column or a list of columns is to use the public method enableSummaries
/disableSummaries
of the igx-grid .
<igx-grid #grid1 [data ]="data" [autoGenerate ]="false" height ="800px" width ="800px" (columnInit )="initColumn($event)" >
<igx-column field ="ProductID" header ="Product ID" width ="200px" [sortable ]="true" > </igx-column >
<igx-column field ="ProductName" header ="Product Name" width ="200px" [sortable ]="true" [hasSummary ]="true" > </igx-column >
<igx-column field ="ReorderLevel" width ="200px" [editable ]="true" [dataType ]="'number'" [hasSummary ]="false" > </igx-column >
</igx-grid >
<button (click )="enableSummary()" > Enable Summary</button >
<button (click )="disableSummary()" > Disable Summary </button >
html
public enableSummary ( ) {
this .grid1.enableSummaries([
{fieldName : 'ReorderLevel' , customSummary : this .mySummary},
{fieldName : 'ProductID' }
]);
}
public disableSummary ( ) {
this .grid1.disableSummaries('ProductName' );
}
typescript
Custom Grid Summaries
If these functions do not fulfill your requirements you can provide a custom summary for the specific columns. In order to achieve this you have to override one of the base classes IgxSummaryOperand
, IgxNumberSummaryOperand
or IgxDateSummaryOperand
according to the column data type and your needs. This way you can redefine the existing function or you can add new functions. IgxSummaryOperand
class provides the default implementation only for the count
method. IgxNumberSummaryOperand
extends IgxSummaryOperand
and provides implementation for the min
, max
, sum
and average
. IgxDateSummaryOperand
extends IgxSummaryOperand
and additionally gives you earliest
and latest
.
import { IgxSummaryResult, IgxSummaryOperand, IgxNumberSummaryOperand, IgxDateSummaryOperand } from 'igniteui-angular' ;
class MySummary extends IgxNumberSummaryOperand {
constructor ( ) {
super ();
}
operate(data?: any []): IgxSummaryResult[] {
const result = super .operate(data);
result.push({
key : 'test' ,
label : 'Test' ,
summaryResult : data.filter(rec => rec > 10 && rec < 30 ).length
});
return result;
}
}
typescript
As seen in the examples, the base classes expose the operate
method, so you can choose to get all default summaries and modify the result, or calculate entirely new summary results.
The method returns a list of IgxSummaryResult
.
interface IgxSummaryResult {
key : string ;
label: string ;
summaryResult: any ;
}
typescript
and take optional parameters for calculating the summaries.
See Custom summaries, which access all data section below.
In order to calculate the summary row height properly, the Grid needs the operate
method to always return an array of IgxSummaryResult
with the proper length even when the data is empty.
And now let's add our custom summary to the column UnitsInStock
. We will achieve that by setting the summaries
property to the class we create below.
<igx-grid #grid1 [data ]="data" [autoGenerate ]="false" height ="800px" width ="800px" (columnInit )="initColumn($event)" >
<igx-column field ="ProductID" width ="200px" [sortable ]="true" >
</igx-column >
<igx-column field ="ProductName" width ="200px" [sortable ]="true" [hasSummary ]="true" >
</igx-column >
<igx-column field ="UnitsInStock" width ="200px" [dataType ]="'number'" [hasSummary ]="true" [summaries ]="mySummary" [sortable ]="true" >
</igx-column >
<igx-column field ="ReorderLevel" width ="200px" [editable ]="true" [dataType ]="'number'" [hasSummary ]="true" >
</igx-column >
</igx-grid >
html
...
export class GridComponent implements OnInit {
mySummary = MySummary;
....
}
typescript
Custom summaries, which access all data
Now you can access all Grid data inside the custom column summary. Two additional optional parameters are introduced in the IgxSummaryOperand operate
method.
As you can see in the code snippet below the operate method has the following three parameters:
columnData - gives you an array that contains the values only for the current column
allGridData - gives you the whole grid data source
fieldName - current column field
class MySummary extends IgxNumberSummaryOperand {
constructor ( ) {
super ();
}
operate(columnData: any [], allGridData = [], fieldName?): IgxSummaryResult[] {
const result = super .operate(allData.map(r => r[fieldName]));
result.push({ key : 'test' , label : 'Total Discontinued' , summaryResult : allData.filter((rec ) => rec.Discontinued).length });
return result;
}
}
typescript
import { Component, ViewChild } from '@angular/core' ;
import { IgxGridComponent, IgxNumberSummaryOperand, IgxSummaryResult, IgxPaginatorComponent, IgxColumnComponent } from 'igniteui-angular' ;
import { DATA } from '../../data/nwindData' ;
import { IgxPreventDocumentScrollDirective } from '../../directives/prevent-scroll.directive' ;
class DiscontinuedSummary {
public operate(data?: any [], allData = [], fieldName = '' ): IgxSummaryResult[] {
const result = [];
result.push({
key : 'products' ,
label : 'Products' ,
summaryResult : data.length
});
result.push({
key : 'total' ,
label : 'Total Items' ,
summaryResult : IgxNumberSummaryOperand.sum(data)
});
result.push({
key : 'discontinued' ,
label : 'Discontinued Products' ,
summaryResult : allData.map(r => r['Discontinued' ]).filter((rec ) => rec).length
});
result.push({
key : 'totalDiscontinued' ,
label : 'Total Discontinued Items' ,
summaryResult : IgxNumberSummaryOperand.sum(allData.filter((rec ) => rec['Discontinued' ]).map(r => r[fieldName]))
});
return result;
}
}
@Component ({
selector : 'app-grid-all-data-summary' ,
styleUrls : ['./grid-allData-summary.component.scss' ],
templateUrl : './grid-allData-summary.component.html' ,
imports : [IgxGridComponent, IgxPreventDocumentScrollDirective, IgxPaginatorComponent, IgxColumnComponent]
})
export class GridAllDataSummaryComponent {
@ViewChild ('grid1' , { read : IgxGridComponent, static : true })
public grid1: IgxGridComponent;
public discontinuedSummary = DiscontinuedSummary;
public data;
constructor ( ) {
this .data = DATA;
}
}
ts コピー <div class ="grid__wrapper" >
<igx-grid [igxPreventDocumentScroll ]="true" #grid1 [data ]="data" [autoGenerate ]="false" height ="600px" width ="100%" >
@if (false) {
<igx-paginator > </igx-paginator >
}
<igx-column field ="ProductID" header ="Product ID" width ="17%" [headerClasses ]="'prodId'" >
</igx-column >
<igx-column field ="ProductName" header ="Product Name" width ="17%" [headerClasses ]="'prodId'" >
</igx-column >
<igx-column field ="UnitPrice" header ="Price" [filterable ]="false" width ="17%" [editable ]="true" dataType ="number" >
</igx-column >
<igx-column field ="UnitsInStock" header ="Units In Stock" width ="17%" dataType ="number" [editable ]="true"
[hasSummary ]="true" [summaries ]="discontinuedSummary" >
</igx-column >
<igx-column field ="Discontinued" header ="Discontinued" [editable ]="true" width ="17%" [dataType ]="'boolean'" >
</igx-column >
<igx-column field ="OrderDate" width ="15%" [dataType ]="'date'" [hasSummary ]="true" >
</igx-column >
</igx-grid >
</div >
html コピー .grid__wrapper {
margin : 0 auto;
padding : 16px ;
}
scss コピー
Summary Template
igxSummary
targets the column summary providing as a context the column summary results.
<igx-column ... [hasSummary ]="true" >
<ng-template igxSummary let-summaryResults >
<span > My custom summary template</span >
<span > {{ summaryResults[0].label }} - {{ summaryResults[0].summaryResult }}</span >
</ng-template >
</igx-column >
html
When a default summary is defined, the height of the summary area is calculated by design depending on the column with the largest number of summaries and the size of the grid. Use the summaryRowHeight input property to override the default value. As an argument it expects a number value, and setting a false value will trigger the default sizing behavior of the grid footer.
Column summary template could be defined through API by setting the column summaryTemplate property to the required TemplateRef.
import { Component, HostBinding, OnInit } from '@angular/core' ;
import { IgxNumberSummaryOperand, IgxSummaryResult, IgxInputGroupComponent, IgxLabelDirective, IgxInputDirective, IgxSwitchComponent, IgxButtonGroupComponent, IgxGridComponent, IgxColumnComponent, IgxSummaryTemplateDirective } from 'igniteui-angular' ;
import { DATA } from '../../data/nwindData' ;
import { FormsModule } from '@angular/forms' ;
import { IgxPreventDocumentScrollDirective } from '../../directives/prevent-scroll.directive' ;
class DiscontinuedSummary {
public operate(data?: any [], allData = [], fieldName = '' ): IgxSummaryResult[] {
const result = [];
result.push({
key : 'products' ,
label : 'Products' ,
summaryResult : data.length
});
result.push({
key : 'total' ,
label : 'Total Items' ,
summaryResult : IgxNumberSummaryOperand.sum(data)
});
result.push({
key : 'discontinued' ,
label : 'Discontinued Products' ,
summaryResult : allData.map(r => r['Discontinued' ]).filter((rec ) => rec).length
});
result.push({
key : 'totalDiscontinued' ,
label : 'Total Discontinued Items' ,
summaryResult : IgxNumberSummaryOperand.sum(allData.filter((rec ) => rec['Discontinued' ]).map(r => r[fieldName]))
});
return result;
}
}
@Component ({
selector : 'app-grid-summary-template' ,
styleUrls : ['./grid-summary-template.component.scss' ],
templateUrl : './grid-summary-template.component.html' ,
imports : [IgxInputGroupComponent, IgxLabelDirective, FormsModule, IgxInputDirective, IgxSwitchComponent, IgxButtonGroupComponent, IgxGridComponent, IgxPreventDocumentScrollDirective, IgxColumnComponent, IgxSummaryTemplateDirective]
})
export class GridSummaryTemplateComponent implements OnInit {
public discontinuedSummary = DiscontinuedSummary;
public data;
public summaryHeight = 135 ;
public size = 'medium' ;
public sizes;
public hasSummary = true ;
constructor ( ) {
this .data = DATA;
}
public ngOnInit(): void {
this .sizes = [
{ label : 'small' , selected : this .size === 'small' , togglable : true },
{ label : 'medium' , selected : this .size === 'medium' , togglable : true },
{ label : 'large' , selected : this .size === 'large' , togglable : true }
];
}
public selectSize(event): void {
this .size = this .sizes[event.index].label;
}
@HostBinding ('style.--ig-size' )
protected get sizeStyle () {
return `var(--ig-size-${this .size} )` ;
}
}
ts コピー <div class ="sample__wrapper" >
<div class ="controls-wrapper" >
<igx-input-group >
<label igxLabel for ="height" > Summary Row Height</label >
<input igxInput name ="height" type ="number" [(ngModel )]="summaryHeight" >
</igx-input-group >
<igx-switch [(ngModel )]="hasSummary" > Toggle Summaries</igx-switch >
<igx-buttongroup [values ]="sizes" (selected )="selectSize($event)" >
</igx-buttongroup >
</div >
<igx-grid [igxPreventDocumentScroll ]="true" #grid1 [data ]="data"
[summaryRowHeight ]="summaryHeight" [autoGenerate ]="false" height ="550px" width ="100%" >
<igx-column field ="ProductID" header ="Product ID" width ="10%" [headerClasses ]="'prodId'" [groupable ]="true" >
</igx-column >
<igx-column field ="ProductName" header ="Product Name" width ="17%" [headerClasses ]="'prodId'" [groupable ]="true" >
</igx-column >
<igx-column field ="UnitPrice" header ="Price" [filterable ]="false" width ="17%" [editable ]="true" dataType ="number" [groupable ]="true" >
</igx-column >
<igx-column field ="UnitsInStock" header ="Units In Stock" width ="21%" dataType ="number" [editable ]="true"
[hasSummary ]="hasSummary" [summaries ]="discontinuedSummary" [groupable ]="true" >
</igx-column >
<igx-column field ="Discontinued" header ="Discontinued" [editable ]="true" width ="17%" [dataType ]="'boolean'" [groupable ]="true" >
</igx-column >
<igx-column field ="OrderDate" width ="18%" [dataType ]="'date'" [hasSummary ]="hasSummary" [groupable ]="true" >
<ng-template igxSummary let-summaryResults >
<div class ="summary-temp" >
<span > <strong > {{ summaryResults[0].label }}</strong > <span > {{ summaryResults[0].summaryResult }}</span > </span >
<span > <strong > {{ summaryResults[1].label }}</strong > <span > {{ summaryResults[1].summaryResult }}</span > </span >
</div >
</ng-template >
</igx-column >
</igx-grid >
</div >
html コピー .sample__wrapper {
display : flex;
flex-direction : column;
gap: 16px ;
padding : 16px ;
height : 100% ;
overflow-y : auto;
}
igx-buttongroup {
max-width : 450px ;
flex : 1 ;
}
.summary-temp {
display : flex;
flex-direction : column;
margin : 0 1px ;
font-size : 14px ;
line-height : 24px ;
height : 100% ;
overflow-y : auto;
overflow-x : hidden;
span {
display : flex;
flex-wrap : wrap;
align-items : center;
gap: 4px ;
justify-content : space-between;
color : hsla(var(--igx-gray-900 ));
span {
user-select: all;
max-width : 300px ;
padding-right : 8px ;
}
strong {
font-size : 12px ;
text-transform : uppercase;
min-width : 70px ;
justify-self: flex-start;
text-align : left;
color : var(--ig-secondary-600 );
user-select: none;
}
}
> * {
padding : 8px 0 ;
line-height : 18px ;
border-bottom : 1px dashed hsla(var(--igx-gray-400 ));
&:last-child {
border-bottom : none;
}
}
}
::-webkit-scrollbar {
width: 5px !important ;
height : 5px !important ;
}
.controls-wrapper {
display : flex;
align-items : center;
flex-direction : row;
gap: 16px ;
}
scss コピー
Disable Summaries
The disabledSummaries
property provides precise per-column control over the Ignite UI for Angular grid summary feature. This property enables users to customize the summaries displayed for each column in the grid, ensuring that only the most relevant and meaningful data is shown. For example, you can exclude specific summary types, such as ['count', 'min', 'max']
, by specifying their summary keys in an array.
This property can also be modified dynamically at runtime through code, providing flexibility to adapt the grid's summaries to changing application states or user actions.
The following examples illustrate how to use the disabledSummaries
property to manage summaries for different columns and exclude specific default and custom summary types in the Ignite UI for Angular grid:
<igx-column
field ="UnitPrice"
header ="Unit Price"
dataType ="number"
[hasSummary ]="true"
[disabledSummaries ]="['count', 'sum', 'average']"
>
</igx-column >
<igx-column
field ="UnitsInStock"
header ="Units In Stock"
dataType ="number"
[hasSummary ]="true"
[summaries ]="discontinuedSummary"
[disabledSummaries ]="['discontinued', 'totalDiscontinued']"
>
</igx-column >
html
For UnitPrice
, default summaries like count
, sum
, and average
are disabled, leaving others like min
and max
active.
For UnitsInStock
, custom summaries such as total
and totalDiscontinued
are excluded using the disabledSummaries
property.
At runtime, summaries can also be dynamically disabled using the disabledSummaries
property. For example, you can set or update the property on specific columns programmatically to adapt the displayed summaries based on user actions or application state changes.
By default, summary results, produced by the built-in summary operands, are localized and formatted according to the grid locale
and column pipeArgs
. When using custom operands, the locale
and pipeArgs
are not applied. If you want to change the default appearance of the summary results, you may format them using the summaryFormatter
property.
public dateSummaryFormat(summary: IgxSummaryResult, summaryOperand : IgxSummaryOperand): string {
const result = summary.summaryResult;
if (summaryOperand instanceof IgxDateSummaryOperand && summary.key !== 'count'
&& result !== null && result !== undefined ) {
const pipe = new DatePipe('en-US' );
return pipe.transform(result,'MMM YYYY' );
}
return result;
}
typescript
<igx-column ... [summaryFormatter ]="dateSummaryFormat" > </igx-column >
html
import { DatePipe } from '@angular/common' ;
import { Component, OnInit, ViewChild } from '@angular/core' ;
import { IgxDateSummaryOperand, IgxGridComponent, IgxSummaryOperand, IgxSummaryResult, IgxColumnComponent, IgxCellTemplateDirective } from 'igniteui-angular' ;
import { DATA } from '../../data/nwindData' ;
import { IgxPreventDocumentScrollDirective } from '../../directives/prevent-scroll.directive' ;
@Component ({
selector : 'app-grid-summary-formatter' ,
styleUrls : ['./grid-summary-formatter.component.scss' ],
templateUrl : './grid-summary-formatter.component.html' ,
imports : [IgxGridComponent, IgxPreventDocumentScrollDirective, IgxColumnComponent, IgxCellTemplateDirective]
})
export class GridSummaryFormatterComponent implements OnInit {
@ViewChild ('grid1' , { read : IgxGridComponent, static : true })
public grid1: IgxGridComponent;
public data: any [];
public ngOnInit(): void {
this .data = DATA;
}
public dateSummaryFormat(summary: IgxSummaryResult, summaryOperand : IgxSummaryOperand): string {
const result = summary.summaryResult;
if (summaryOperand instanceof IgxDateSummaryOperand && summary.key !== 'count'
&& result !== null && result !== undefined ) {
const pipe = new DatePipe('en-US' );
return pipe.transform(result, 'MMM YYYY' );
}
return result;
}
}
ts コピー <div class ="grid__wrapper" >
<igx-grid [igxPreventDocumentScroll ]="true" #grid1 [data ]="data" [autoGenerate ]="false" height ="600px" width ="100%"
[allowFiltering ]='true' filterMode ="excelStyleFilter" >
<igx-column field ="ProductName" header ="Product Name" [sortable ]="true" [disableHiding ]="true" [dataType ]="'string'" >
</igx-column >
<igx-column field ="QuantityPerUnit" header ="Quantity Per Unit" [sortable ]="true" [disableHiding ]="true" [dataType ]="'string'" >
</igx-column >
<igx-column field ="UnitPrice" header ="Unit Price Category" [sortable ]="true" [disableHiding ]="true" dataType ="string" >
</igx-column >
<igx-column field ="OrderDate" header ="Order Date" [sortable ]="true" [disableHiding ]="true" [dataType ]="'date'" [hasSummary ]="true"
[summaryFormatter ]="dateSummaryFormat" >
</igx-column >
<igx-column field ="Discontinued" header ="Discontinued" [sortable ]="true" [disableHiding ]="true" [dataType ]="'boolean'" >
<ng-template igxCell let-cell ="cell" let-val >
@if (val) {
<img src ="https://www.infragistics.com/angular-demos-lob/assets/images/grid/active.png" title ="Continued" alt ="Continued" />
}
@if (!val) {
<img src ="https://www.infragistics.com/angular-demos-lob/assets/images/grid/expired.png" title ="Discontinued" alt ="Discontinued" />
}
</ng-template >
</igx-column >
</igx-grid >
</div >
html コピー .grid__wrapper {
margin : 16px ;
}
scss コピー
Summaries with Group By
When you have grouped by columns, the Grid allows you to change the summary position and calculation mode using the summaryCalculationMode
and summaryPosition
properties. Along with these two properties the IgxGrid exposes and showSummaryOnCollapse
property which allows you to determine whether the summary row stays visible when the group row that refers to is collapsed.
The available values of the summaryCalculationMode
property are:
rootLevelOnly - Summaries are calculated only for the root level.
childLevelsOnly - Summaries are calculated only for the child levels.
rootAndChildLevels - Summaries are calculated for both root and child levels. This is the default value.
The available values of the summaryPosition
property are:
top - The summary row appears before the group by row children.
bottom - The summary row appears after the group by row children. This is the default value.
The showSummaryOnCollapse
property is boolean. Its default value is set to false , which means that the summary row would be hidden when the group row is collapsed. If the property is set to true the summary row stays visible when group row is collapsed.
The summaryPosition
property applies only for the child level summaries. The root level summaries appear always fixed at the bottom of the Grid.
Demo
import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core' ;
import { DefaultSortingStrategy, GridSelectionMode, GridSummaryCalculationMode, GridSummaryPosition, IgxGridComponent, IgxNumberSummaryOperand, IgxSummaryOperand, IgxSummaryResult, ISortingExpression, SortingDirection, IgxButtonGroupComponent, IgxSwitchComponent, IgxColumnComponent } from 'igniteui-angular' ;
import { INVOICE_DATA } from '../../data/invoiceData' ;
import { IgxPreventDocumentScrollDirective } from '../../directives/prevent-scroll.directive' ;
class AvgSummary {
public operate(data?: any []): IgxSummaryResult[] {
const result = [];
const avg = IgxNumberSummaryOperand.average(data);
result.push({
key : 'avg' ,
label : 'Average' ,
summaryResult : data.length ? '$' + avg.toFixed(2 ) : ''
});
return result;
}
}
class SumSummary {
public operate(data?: any []): IgxSummaryResult[] {
const result = [];
result.push({
key : 'sum' ,
label : 'Sum' ,
summaryResult : IgxNumberSummaryOperand.sum(data)
});
return result;
}
}
@Component ({
selector : 'app-grid-groupby-summary-sample' ,
styleUrls : ['./grid-groupby-summary-sample.component.scss' ],
templateUrl : './grid-groupby-summary-sample.component.html' ,
imports : [IgxButtonGroupComponent, IgxSwitchComponent, IgxGridComponent, IgxPreventDocumentScrollDirective, IgxColumnComponent]
})
export class GridGroupBySummarySampleComponent {
@ViewChild ('grid1' , { read : IgxGridComponent, static : true })
public grid1: IgxGridComponent;
public data;
public expr: ISortingExpression[];
public avgSummary = AvgSummary;
public sumSummary = SumSummary;
public summaryPositions;
public summaryPosition: GridSummaryPosition = GridSummaryPosition.bottom;
public summaryCalcModes;
public summaryCalculationMode: GridSummaryCalculationMode = GridSummaryCalculationMode.rootAndChildLevels;
public selectionMode: GridSelectionMode = 'multiple' ;
constructor ( ) {
this .data = INVOICE_DATA;
this .expr = [
{ dir : SortingDirection.Asc, fieldName : 'ShipCountry' , ignoreCase : false ,
strategy : DefaultSortingStrategy.instance() }
];
this .summaryPositions = [
{
label : GridSummaryPosition.top,
selected : this .summaryPosition === GridSummaryPosition.top,
togglable : true
},
{
label : GridSummaryPosition.bottom,
selected : this .summaryPosition === GridSummaryPosition.bottom,
togglable : true
}
];
this .summaryCalcModes = [
{
label : 'Root Level Only' ,
selected : this .summaryCalculationMode === GridSummaryCalculationMode.rootLevelOnly,
togglable : true ,
value : GridSummaryCalculationMode.rootLevelOnly
},
{
label : 'Child Levels Only' ,
selected : this .summaryCalculationMode === GridSummaryCalculationMode.childLevelsOnly,
togglable : true ,
value : GridSummaryCalculationMode.childLevelsOnly
},
{
label : 'Root And Child Levels' ,
selected : this .summaryCalculationMode === GridSummaryCalculationMode.rootAndChildLevels,
togglable : true ,
value : GridSummaryCalculationMode.rootAndChildLevels
}
];
}
public selectSummaryPosition (event ) {
this .summaryPosition = this .summaryPositions[event.index].label;
this .grid1.summaryPosition = this .summaryPosition;
}
public selectSummaryCalcMode (event ) {
this .summaryCalculationMode = this .summaryCalcModes[event.index].value;
this .grid1.summaryCalculationMode = this .summaryCalculationMode;
}
public toggle (event ) {
this .grid1.showSummaryOnCollapse = !this .grid1.showSummaryOnCollapse;
}
public formatDate (val: Date ) {
return new Intl .DateTimeFormat('en-US' ).format(val);
}
public formatCurrency (value: number ) {
return '$' + value.toFixed(2 );
}
public isDate (value: any ) {
if (value instanceof Date ) {
return true ;
} else {
return false ;
}
}
}
ts コピー
<div class ="summary-chooser" >
<igx-buttongroup [values ]="summaryCalcModes" (selected )="selectSummaryCalcMode($event)" > </igx-buttongroup >
</div >
<div class ="summary-chooser" >
<igx-buttongroup [values ]="summaryPositions" (selected )="selectSummaryPosition($event)" > </igx-buttongroup >
</div >
<div class ="summary-chooser" >
<igx-switch labelPosition ="before" [checked ]='grid1.showSummaryOnCollapse' (change )='toggle($event)' > Show summary row when group row is collapsed:</igx-switch >
</div >
<igx-grid [igxPreventDocumentScroll ]="true" #grid1 [data ]="data" [width ]="'100%'" [height ]="'540px'" [rowSelection ]="selectionMode" [groupingExpressions ]="expr" >
<igx-column field ="ShipCountry" header ="Ship Country" width ="200px" [groupable ]="true" >
</igx-column >
<igx-column field ="ShipCity" header ="Ship City" width ="250px" [groupable ]="true" >
</igx-column >
<igx-column field ="UnitPrice" header ="Unit Price" width ="150px" [formatter ]="formatCurrency" dataType ="number" [groupable ]="true" [hasSummary ]="true" [summaries ]="avgSummary" >
</igx-column >
<igx-column field ="Quantity" header ="Quantity" width ="150px" dataType ="number" [groupable ]="true" [hasSummary ]="true" [summaries ]="sumSummary" >
</igx-column >
</igx-grid >
html コピー :host {
display : block;
padding : 16px ;
}
.summary-chooser {
margin-bottom : 16px ;
}
igx-buttongroup{
display : block;
width : 600px ;
}
scss コピー
Exporting Summaries
There is an exportSummaries
option in IgxExcelExporterOptions
that specifies whether the exported data should include the grid's summaries. Default exportSummaries
value is false .
The IgxExcelExporterService
will export the default summaries for all column types as their equivalent excel functions so they will continue working properly when the sheet is modified. Try it for yourself in the example below:
import { Component, ViewChild } from '@angular/core' ;
import { ColumnType, IgxExcelExporterOptions, IgxExcelExporterService, IgxGridComponent, IgxNumberSummaryOperand, IgxSummaryResult, IgxButtonDirective, IgxColumnComponent, IgxCellTemplateDirective, IgxCellHeaderTemplateDirective, IgxIconComponent } from 'igniteui-angular' ;
import { DATA } from '../../data/nwindData' ;
import { IgxPreventDocumentScrollDirective } from '../../directives/prevent-scroll.directive' ;
import { DatePipe } from '@angular/common' ;
class MySummary {
public operate(data?: any []): IgxSummaryResult[] {
const result = new IgxNumberSummaryOperand().operate(data);
result.push({
key : 'test' ,
label : 'Test' ,
summaryResult : data.filter((rec ) => rec > 10 && rec < 30 ).length
});
return result;
}
}
@Component ({
selector : 'app-grid-summary-export' ,
styleUrls : ['./grid-summary-export.component.scss' ],
templateUrl : './grid-summary-export.component.html' ,
imports : [IgxButtonDirective, IgxGridComponent, IgxPreventDocumentScrollDirective, IgxColumnComponent, IgxCellTemplateDirective, IgxCellHeaderTemplateDirective, IgxIconComponent, DatePipe]
})
export class GridSummaryExportComponent {
@ViewChild ('grid' , { read : IgxGridComponent, static : true })
public grid: IgxGridComponent;
public mySummary = MySummary;
public data;
public productId = 0 ;
constructor (private excelExportService: IgxExcelExporterService ) {
this .data = DATA;
this .productId = DATA.length;
}
public toggleSummary (column: ColumnType ) {
column.hasSummary = !column.hasSummary;
}
public exportButtonHandler ( ) {
this .excelExportService.export(this .grid, new IgxExcelExporterOptions('ExportedFile' ));
}
}
ts コピー <div class ="grid__wrapper" >
<div class ="button-container" >
<button igxButton ="contained" (click )="exportButtonHandler()" > Export To Excel</button >
Press the button to export the Grid as a .xlsx file.
</div >
<igx-grid [igxPreventDocumentScroll ]="true" #grid [data ]="data" [autoGenerate ]="false" height ="650px" width ="100%" >
<igx-column #col field ="ProductID" header ="Product ID" [headerClasses ]="'prodId'" >
</igx-column >
<igx-column #col field ="ProductName" header ="Product Name" [headerClasses ]="'prodId'" [hasSummary ]="true" >
<ng-template igxCell let-cell ="cell" let-val >
{{val}}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
<igx-column #col field ="UnitPrice" header ="Price" [filterable ]="false" [editable ]="true" dataType ="number"
[hasSummary ]="true" >
<ng-template igxCell let-cell ="cell" let-val let-row >
${{val}}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
<igx-column #col field ="UnitsInStock" header ="Units In Stock" dataType ="number" [editable ]="true"
[hasSummary ]="false" [summaries ]="mySummary" >
<ng-template igxCell let-cell ="cell" let-val let-row >
{{val}}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
<igx-column #col field ="Discontinued" header ="Discontinued" [hasSummary ]="true" [dataType ]="'boolean'" >
<ng-template igxCell let-cell ="cell" let-val >
@if (val) {
<img src ="https://www.infragistics.com/angular-demos-lob/assets/images/grid/active.png" title ="Continued" alt ="Continued" />
}
@if (!val) {
<img src ="https://www.infragistics.com/angular-demos-lob/assets/images/grid/expired.png" title ="Discontinued" alt ="Discontinued" />
}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
<igx-column #col field ="OrderDate" [dataType ]="'date'" [hasSummary ]="true" >
<ng-template igxCell let-cell ="cell" let-val let-row >
{{ val | date: 'MMM d, yyyy' }}
</ng-template >
<ng-template igxHeader let-col >
<div class ="header-text" > {{col.field}}</div >
<igx-icon class ="header-icon" style.color ="{{ col.hasSummary ? '#e41c77' : '' }}" (click )="toggleSummary(col)" > functions</igx-icon >
</ng-template >
</igx-column >
</igx-grid >
</div >
html コピー .grid-controls {
display : flex;
flex-flow : column nowrap;
justify-content : space-between;
margin : 0 16px 24px ;
igx-switch {
margin-top : 24px ;
}
}
.grid__wrapper {
margin : 0 auto;
padding : 16px ;
}
.header {
height : 100% ;
}
:host ::ng-deep{
.igx-grid__th .title{
width: 100% ;
cursor : auto;
}
@media screen and (max-width : 677px ){
.header-icon {
padding-bottom : 17px ;
padding-top : 17px ;
font-size : 1.4em ;
width : 1.1em ;
height : 1.1em ;
float : right;
}
.header-text {
float :left ;
white-space : nowrap;
overflow : hidden;
text-overflow : ellipsis;
width : 50% ;
}
}
@media screen and (min-width : 677px ){
.header-icon {
padding-top : 17px ;
font-size : 1.4em ;
width : 1.1em ;
height : 1.1em ;
float : right;
}
.header-text {
float :left ;
white-space : nowrap;
overflow : hidden;
text-overflow : ellipsis;
width : 50% ;
}
}
@media screen and (min-width : 992px ){
.header-icon {
padding-top : 17px ;
font-size : 1.4em ;
width : 1.1em ;
height : 1.1em ;
float : right;
margin-right : 10px ;
cursor : pointer;
}
.header-text {
float :left ;
white-space : nowrap;
width : 50% ;
cursor : auto;
}
}
}
.button-container {
margin : 25px auto;
}
scss コピー
The exported file includes a hidden column that holds the level of each DataRecord
in the sheet. This level is used in the summaries to filter out the cells that need to be included in the summary function.
In the table below, you can find the corresponding Excel formula for each of the default summaries.
Data Type
Function
Excel Function
string
, boolean
count
="Count: "&COUNTIF(start:end, recordLevel)
number
, currency
, percent
count
="Count: "&COUNTIF(start:end, recordLevel)
min
="Min: "&MIN(IF(start:end=recordLevel, rangeStart:rangeEnd))
max
="Max: "&MAX(IF(start:end=recordLevel, rangeStart:rangeEnd))
average
="Avg: "&AVERAGEIF(start:end, recordLevel, rangeStart:rangeEnd)
sum
="Sum: "&SUMIF(start:end, recordLevel, rangeStart:rangeEnd)
date
count
="Count: "&COUNTIF(start:end, recordLevel)
earliest
="Earliest: "& TEXT(MIN(IF(start:end=recordLevel, rangeStart:rangeEnd)), format)
latest
="Latest: "&TEXT(MAX(IF(start:end=recordLevel, rangeStart:rangeEnd)), format)
Known Limitations
Limitation
Description
Exporting custom summaries
Custom summaries will be exported as strings instead of Excel functions.
Exporting templated summaries
Templated summaries are not supported and will be exported as the default ones.
Keyboard Navigation
The summary rows can be navigated with the following keyboard interactions:
UP - navigates one cell up
DOWN - navigates one cell down
LEFT - navigates one cell left
RIGHT - navigates one cell right
CTRL + LEFT or HOME - navigates to the leftmost cell
CTRL + RIGHT or END - navigates to the rightmost cell
Styling
To get started with styling the sorting behavior, we need to import the index
file, where all the theme functions and component mixins live:
@use "igniteui-angular/theming" as *;
scss
Following the simplest approach, we create a new theme that extends the grid-summary-theme
and accepts the $background-color
, $focus-background-color
, $label-color
, $result-color
, $pinned-border-width
, $pinned-border-style
and $pinned-border-color
parameters.
$custom-theme : grid-summary-theme(
$background-color : #e0f3ff ,
$focus-background-color : rgba(#94d1f7 , .3 ),
$label-color : #e41c77 ,
$result-color : black,
$pinned-border-width : 2px ,
$pinned-border-style : dotted,
$pinned-border-color : #e41c77
);
scss
Instead of hardcoding the color values like we just did, we can achieve greater flexibility in terms of colors by using the palette
and color
functions. Please refer to Palettes
topic for detailed guidance on how to use them.
The last step is to include the component custom theme:
@include css-vars($custom-theme );
scss
If the component is using an Emulated
ViewEncapsulation, it is necessary to penetrate
this encapsulation using ::ng-deep
:
:host {
::ng-deep {
@include css-vars($custom-theme );
}
}
scss
Demo
import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core' ;
import { DefaultSortingStrategy, GridSelectionMode, GridSummaryCalculationMode, GridSummaryPosition, IgxGridComponent, IgxNumberSummaryOperand, IgxSummaryOperand, IgxSummaryResult, ISortingExpression, SortingDirection, IgxButtonGroupComponent, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarPinningComponent, IgxColumnComponent } from 'igniteui-angular' ;
import { INVOICE_DATA } from '../../data/invoiceData' ;
import { IgxPreventDocumentScrollDirective } from '../../directives/prevent-scroll.directive' ;
class CustomSummary {
public operate(data?: any []): IgxSummaryResult[] {
const result = [];
result.push({
key : 'sum' ,
label : 'Sum' ,
summaryResult : IgxNumberSummaryOperand.sum(data)
}, {
key : 'count' ,
label : 'Count' ,
summaryResult : data.length ? data.length : 0
});
return result;
}
}
@Component ({
selector : 'app-grid-groupby-summary-sample' ,
styleUrls : ['./grid-groupby-summary-styling-sample.component.scss' ],
templateUrl : './grid-groupby-summary-styling-sample.component.html' ,
imports : [IgxButtonGroupComponent, IgxGridComponent, IgxPreventDocumentScrollDirective, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarPinningComponent, IgxColumnComponent]
})
export class GridGroupBySummaryStylingSampleComponent {
@ViewChild ('grid1' , { read : IgxGridComponent, static : true })
public grid1: IgxGridComponent;
public data;
public expr: ISortingExpression[];
public customSummary = CustomSummary;
public summaryPositions;
public summaryPosition: GridSummaryPosition = GridSummaryPosition.bottom;
public summaryCalcModes;
public summaryCalculationMode: GridSummaryCalculationMode = GridSummaryCalculationMode.rootAndChildLevels;
public selectionMode: GridSelectionMode = 'multiple' ;
constructor ( ) {
this .data = INVOICE_DATA;
this .expr = [
{ dir : SortingDirection.Asc, fieldName : 'ShipCountry' , ignoreCase : false ,
strategy : DefaultSortingStrategy.instance() }
];
this .summaryPositions = [
{
label : GridSummaryPosition.top,
selected : this .summaryPosition === GridSummaryPosition.top,
togglable : true
},
{
label : GridSummaryPosition.bottom,
selected : this .summaryPosition === GridSummaryPosition.bottom,
togglable : true
}
];
this .summaryCalcModes = [
{
label : 'Root Level Only' ,
selected : this .summaryCalculationMode === GridSummaryCalculationMode.rootLevelOnly,
togglable : true ,
value : GridSummaryCalculationMode.rootLevelOnly
},
{
label : 'Child Levels Only' ,
selected : this .summaryCalculationMode === GridSummaryCalculationMode.childLevelsOnly,
togglable : true ,
value : GridSummaryCalculationMode.childLevelsOnly
},
{
label : 'Root And Child Levels' ,
selected : this .summaryCalculationMode === GridSummaryCalculationMode.rootAndChildLevels,
togglable : true ,
value : GridSummaryCalculationMode.rootAndChildLevels
}
];
}
public selectSummaryPosition (event ) {
this .summaryPosition = this .summaryPositions[event.index].label;
this .grid1.summaryPosition = this .summaryPosition;
}
public selectSummaryCalcMode (event ) {
this .summaryCalculationMode = this .summaryCalcModes[event.index].value;
this .grid1.summaryCalculationMode = this .summaryCalculationMode;
}
public formatDate (val: Date ) {
return new Intl .DateTimeFormat('en-US' ).format(val);
}
public formatCurrency (value: number ) {
return '$' + value.toFixed(2 );
}
public isDate (value: any ) {
if (value instanceof Date ) {
return true ;
} else {
return false ;
}
}
}
ts コピー <div class ="grid-wrapper" >
<div class ="summary-chooser" >
<igx-buttongroup [values ]="summaryCalcModes" (selected )="selectSummaryCalcMode($event)" > </igx-buttongroup >
</div >
<div class ="summary-chooser" >
<igx-buttongroup [values ]="summaryPositions" (selected )="selectSummaryPosition($event)" > </igx-buttongroup >
</div >
<igx-grid [igxPreventDocumentScroll ]="true" #grid1 [data ]="data" [width ]="'100%'" [height ]="'570px'" [rowSelection ]='selectionMode' [groupingExpressions ]='expr' >
<igx-grid-toolbar >
<igx-grid-toolbar-actions >
<igx-grid-toolbar-pinning > </igx-grid-toolbar-pinning >
</igx-grid-toolbar-actions >
</igx-grid-toolbar >
<igx-column field ="ShipCountry" header ="Ship Country" width ="200px" [groupable ]="true" [pinned ]="true" >
</igx-column >
<igx-column field ="ShipCity" header ="Ship City" width ="250px" [groupable ]="true" >
</igx-column >
<igx-column field ="UnitPrice" header ="Unit Price" width ="150px" [formatter ]="formatCurrency" dataType ="number" [groupable ]="true" [hasSummary ]="true" >
</igx-column >
<igx-column field ="Quantity" header ="Quantity" width ="150px" dataType ="number" [groupable ]="true" [hasSummary ]="true" [summaries ]="customSummary" >
</igx-column >
</igx-grid >
</div >
html コピー @use "layout.scss" ;
@use "igniteui-angular/theming" as *;
$summaries-background : #e0f3ff ;
$custom-theme : grid-summary-theme(
$background-color : $summaries-background ,
$focus-background-color : rgba(#94d1f7 , 0.3 ),
$label-color : #e41c77 ,
$result-color : black,
$pinned-border-width : 2px ,
$pinned-border-style : dotted,
$pinned-border-color : #e41c77 ,
);
:host {
::ng-deep {
igx-grid-summary-row {
--summaries-patch-background: #{$summaries-background };
}
@include css-vars($custom-theme );
}
}
scss コピー
API References
Additional Resources
Our community is active and always welcoming to new ideas.