How to use the @swimlane/ngx-charts.LineSeriesComponent function in @swimlane/ngx-charts

To help you get started, we’ve selected a few @swimlane/ngx-charts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github usgs / earthquake-eventpages / src / app / shared / ngx-charts / line-chart / line-series / line-series.component.ts View on Github external
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) {