Changed functions to arrow functions for only-arrow-functions rule.

This commit is contained in:
Patrick O'Carroll
2018-09-04 14:27:03 +02:00
parent 5c0fbbf7c8
commit 19b7ad61dd
50 changed files with 289 additions and 288 deletions

View File

@@ -464,7 +464,7 @@ class GraphElement {
}
addXSeriesAxis(options) {
const ticks = _.map(this.data, function(series, index) {
const ticks = _.map(this.data, (series, index) => {
return [index + 1, series.alias];
});
@@ -533,8 +533,8 @@ class GraphElement {
}
addXTableAxis(options) {
let ticks = _.map(this.data, function(series, seriesIndex) {
return _.map(series.datapoints, function(point, pointIndex) {
let ticks = _.map(this.data, (series, seriesIndex) => {
return _.map(series.datapoints, (point, pointIndex) => {
const tickIndex = seriesIndex * series.datapoints.length + pointIndex;
return [tickIndex + 1, point[1]];
});
@@ -627,10 +627,10 @@ class GraphElement {
}
}
axis.transform = function(v) {
axis.transform = v => {
return v < Number.MIN_VALUE ? null : Math.log(v) / Math.log(axis.logBase);
};
axis.inverseTransform = function(v) {
axis.inverseTransform = v => {
return Math.pow(axis.logBase, v);
};
@@ -701,7 +701,7 @@ class GraphElement {
}
configureAxisMode(axis, format) {
axis.tickFormatter = function(val, axis) {
axis.tickFormatter = (val, axis) => {
if (!kbn.valueFormats[format]) {
throw new Error(`Unit '${format}' is not supported`);
}