import { Pipe, PipeTransform } from '@angular/core';
import { ChartAxis } from '../model/ChartAxis.model';

@Pipe({
  name: 'filterTypes'
})
export class ChartTypePipe implements PipeTransform {

  transform(chartDataTypes: ChartAxis[], types: string[]): any {
      return chartDataTypes.filter((dataType: ChartAxis) => types.includes(dataType.type));
  }

}
