ctx.lineJoin = itemOrDefault(legendItem.lineJoin, lineDefault.borderJoinStyle);
ctx.lineWidth = itemOrDefault(legendItem.lineWidth, lineDefault.borderWidth);
ctx.strokeStyle = itemOrDefault(legendItem.strokeStyle, globalDefault.defaultColor);
+ var isLineWidthZero = (itemOrDefault(legendItem.lineWidth, lineDefault.borderWidth) == 0);
if (ctx.setLineDash) {
// IE 9 and 10 do not support line dash
}
else {
// Draw box as legend symbol
- ctx.strokeRect(x, y, boxWidth, fontSize);
+ if (!isLineWidthZero)
+ {
+ ctx.strokeRect(x, y, boxWidth, fontSize);
+ }
ctx.fillRect(x, y, boxWidth, fontSize);
}