import { Component , Input , ChangeDetectionStrategy } from '@angular/core' ; import * as Swimlane from '@swimlane/ngx-charts' ; param strokeWidth @ Component ( { changeDetection : ChangeDetectionStrategy . OnPush , selector : 'g[ngx-charts-line-series]' , templateUrl : './line-series.component.html' } ) export class LineSeriesComponent extends Swimlane . LineSeriesComponent { @ Input ( ) strokeWidth = '1.5px' ; param data param property param ascending return { number } sortData ( data , property = 'name' , ascending = true ) { return data . sort ( ( a , b ) => { if ( ascending === true ) { return a [ property ] - b [ property ] ; } else { return b [ property ] - a [ property ] ; } } ) ; } }