Scatter Pod
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
653 B

import { CoreSeries } from '@chartwerk/core';
import { ScatterData, PointType, LineType } from '../types';
import * as _ from 'lodash';
const DEFAULT_POINT_SIZE = 4;
const SCATTER_DATA_DEFAULTS = {
pointType: PointType.CIRCLE,
lineType: LineType.NONE,
pointSize: DEFAULT_POINT_SIZE,
colorFormatter: undefined
};
export class ScatterSeries extends CoreSeries<ScatterData> {
constructor(series: ScatterData[]) {
super(series, _.cloneDeep(SCATTER_DATA_DEFAULTS));
}
// move to parent
public getSerieByTarget(target: string): ScatterData | undefined {
return _.find(this.visibleSeries, serie => serie.target === target);
}
}