mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
Fix CI & JShint issues
This commit is contained in:
parent
da1c51f149
commit
6667832392
@ -282,10 +282,10 @@ module.exports = function(Chart) {
|
||||
model.opacity = 1;
|
||||
|
||||
var labelColors = [],
|
||||
tooltipPosition = tooltipPosition = getAveragePosition(active);
|
||||
tooltipPosition = getAveragePosition(active);
|
||||
|
||||
var tooltipItems = [];
|
||||
for (var i = 0, len = active.length; i < len; ++i) {
|
||||
for (i = 0, len = active.length; i < len; ++i) {
|
||||
tooltipItems.push(createTooltipItem(active[i]));
|
||||
}
|
||||
|
||||
@ -601,7 +601,7 @@ module.exports = function(Chart) {
|
||||
|
||||
var bodyColor = helpers.color(vm.bodyColor);
|
||||
var textColor = bodyColor.alpha(opacity * bodyColor.alpha()).rgbString();
|
||||
ctx.fillStyle = textColor
|
||||
ctx.fillStyle = textColor;
|
||||
ctx.font = helpers.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);
|
||||
|
||||
// Before Body
|
||||
@ -615,7 +615,7 @@ module.exports = function(Chart) {
|
||||
helpers.each(vm.beforeBody, fillLineOfText);
|
||||
|
||||
var drawColorBoxes = body.length > 1;
|
||||
xLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0
|
||||
xLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0;
|
||||
|
||||
// Draw body lines now
|
||||
helpers.each(body, function(bodyItem, i) {
|
||||
|
@ -119,8 +119,8 @@ describe('tooltip tests', function() {
|
||||
}]
|
||||
}));
|
||||
|
||||
expect(tooltip._view.x).toBeCloseTo(269, 1);
|
||||
expect(tooltip._view.y).toBeCloseTo(155, 1);
|
||||
expect(tooltip._view.x).toBeCloseTo(269, 0);
|
||||
expect(tooltip._view.y).toBeCloseTo(155, 0);
|
||||
});
|
||||
|
||||
it('Should display in single mode', function() {
|
||||
@ -223,8 +223,8 @@ describe('tooltip tests', function() {
|
||||
labelColors: []
|
||||
}));
|
||||
|
||||
expect(tooltip._view.x).toBeCloseTo(269, 1);
|
||||
expect(tooltip._view.y).toBeCloseTo(312, 1);
|
||||
expect(tooltip._view.x).toBeCloseTo(269, 0);
|
||||
expect(tooltip._view.y).toBeCloseTo(312, 0);
|
||||
});
|
||||
|
||||
it('Should display information from user callbacks', function() {
|
||||
@ -372,8 +372,8 @@ describe('tooltip tests', function() {
|
||||
}]
|
||||
}));
|
||||
|
||||
expect(tooltip._view.x).toBeCloseTo(216, 1);
|
||||
expect(tooltip._view.y).toBeCloseTo(190, 1);
|
||||
expect(tooltip._view.x).toBeCloseTo(216, 0);
|
||||
expect(tooltip._view.y).toBeCloseTo(190, 0);
|
||||
});
|
||||
|
||||
it('Should display information from user callbacks', function() {
|
||||
@ -455,7 +455,7 @@ describe('tooltip tests', function() {
|
||||
}]
|
||||
}));
|
||||
|
||||
expect(tooltip._view.x).toBeCloseTo(269, 1);
|
||||
expect(tooltip._view.y).toBeCloseTo(155, 1);
|
||||
expect(tooltip._view.x).toBeCloseTo(269, 0);
|
||||
expect(tooltip._view.y).toBeCloseTo(155, 0);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user