Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import * as Swimlane from '@swimlane/ngx-charts';
/**
* LineSeriesComponent
*
* @param strokeWidth
* The string value of the width of stroke
*/
@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';
/**
* Helper function to sort by direction
*
* @param data
* The data to sort
* @param [property='name']
* The data name
* @param [ascending=true]
* The ascending
*
* @return {number}
*/
sortData(data, property = 'name', ascending = true) {