rebasing on master and fixing linting issues

This commit is contained in:
ppisljar 2016-12-14 09:34:50 +01:00
parent 5b1951fa2d
commit 3399de000c
4 changed files with 9 additions and 9 deletions

View file

@ -96,4 +96,4 @@ export default function HeatmapVisType(Private) {
}
])
});
};
}

View file

@ -74,7 +74,7 @@ export default function VisFactory(Private) {
getLegendLabels() {
return this.visConfig ? this.visConfig.get('legend.labels', null) : null;
};
}
getLegendColors() {
return this.visConfig ? this.visConfig.get('legend.colors', null) : null;

View file

@ -74,7 +74,7 @@ export default function HeatmapChartFactory(Private) {
labels.push(label);
}
return labels;
};
}
getHeatmapColors(cfg) {
const colorsNumber = cfg.get('colorsNumber');
@ -82,14 +82,14 @@ export default function HeatmapChartFactory(Private) {
const colorSchema = cfg.get('colorSchema');
const labels = this.getHeatmapLabels(cfg);
const colors = {};
for (let i in labels) {
for (const i in labels) {
if (labels[i]) {
const val = invertColors ? 1 - i / colorsNumber : i / colorsNumber;
colors[labels[i]] = getColor(val, colorSchema);
}
}
return colors;
};
}
addSquares(svg, data) {
const xScale = this.getCategoryAxis().getScale();
@ -235,7 +235,7 @@ export default function HeatmapChartFactory(Private) {
}
return squares.selectAll('rect');
};
}
/**
* Renders d3 visualization
@ -261,8 +261,8 @@ export default function HeatmapChartFactory(Private) {
return svg;
});
};
};
}
}
return HeatmapChart;
};
}

View file

@ -6,7 +6,7 @@ import uiModules from 'ui/modules';
uiModules.get('kibana')
.directive('visualizeLegend', function (Private, getAppState) {
.directive('visualizeLegend', function (Private, getAppState, $timeout) {
const Data = Private(VislibLibDataProvider);
const filterBarClickHandler = Private(FilterBarFilterBarClickHandlerProvider);