Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getXDomain(): any[] {
let values = getUniqueXDomainValues(this.results);
this.scaleType = getScaleType(values);
let domain = [];
if (this.scaleType === 'linear') {
values = values.map(v => Number(v));
}
let min;
let max;
if (this.scaleType === 'time' || this.scaleType === 'linear') {
min = this.xScaleMin
? this.xScaleMin
: Math.min(...values);
max = this.xScaleMax
? this.xScaleMax
: Math.max(...values);