Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public operate(data?: any[]): IgxSummaryResult[] {
const result = [];
result.push(
{
key: "min",
label: "min",
summaryResult: IgxNumberSummaryOperand.min(data)
}, {
key: "max",
label: "max",
summaryResult: IgxNumberSummaryOperand.max(data)
}, {
key: "average",
label: "average",
summaryResult: data.length ? IgxNumberSummaryOperand.average(data).toFixed(2) : null
});
return result;
}
}
public operate(data?: any[]): IgxSummaryResult[] {
const result = [];
const avg = IgxNumberSummaryOperand.average(data);
result.push({
key: "avg",
label: "Average",
summaryResult: data.length ? "$" + avg.toFixed(2) : ""
});
return result;
}
}
const result = [];
result.push(
{
key: "min",
label: "Min",
summaryResult: IgxNumberSummaryOperand.min(data)
},
{
key: "max",
label: "Max",
summaryResult: IgxNumberSummaryOperand.max(data)
},
{
key: "avg",
label: "Avg",
summaryResult: IgxNumberSummaryOperand.average(data)
});
return result;
}
}
const result = [];
result.push(
{
key: "min",
label: "Min",
summaryResult: IgxNumberSummaryOperand.min(data)
},
{
key: "max",
label: "Max",
summaryResult: IgxNumberSummaryOperand.max(data)
},
{
key: "avg",
label: "Avg",
summaryResult: IgxNumberSummaryOperand.average(data)
});
return result;
}
}
const result = [];
result.push(
{
key: 'min',
label: 'Min',
summaryResult: IgxNumberSummaryOperand.min(data)
},
{
key: 'max',
label: 'Max',
summaryResult: IgxNumberSummaryOperand.max(data)
},
{
key: 'avg',
label: 'Avg',
summaryResult: IgxNumberSummaryOperand.average(data)
});
return result;
}
}
public operate(data?: any[]): IgxSummaryResult[] {
const result = [];
const avg = IgxNumberSummaryOperand.average(data);
result.push({
key: "avg",
label: "Average",
summaryResult: data.length ? "$" + avg.toFixed(2) : ""
});
return result;
}
}
const result = [];
result.push(
{
key: "min",
label: "Min",
summaryResult: IgxNumberSummaryOperand.min(data)
},
{
key: "max",
label: "Max",
summaryResult: IgxNumberSummaryOperand.max(data)
},
{
key: "avg",
label: "Avg",
summaryResult: IgxNumberSummaryOperand.average(data)
});
return result;
}
}