#### Layout
* `ILayoutItem.update` no longer has a return value
+
+#### Helpers
+
+##### Canvas Helper
+
+* The second parameter to `drawPoint` is now the full options object, so `style`, `rotation`, and `radius` are no longer passed explicitly
+
draw(ctx, chartArea) {
const me = this;
const options = me.options;
- const radius = options.radius;
- if (me.skip || radius <= 0) {
+ if (me.skip || options.radius <= 0) {
return;
}
ctx.strokeStyle = options.borderColor;
ctx.lineWidth = options.borderWidth;
ctx.fillStyle = options.backgroundColor;
- helpers.canvas.drawPoint(ctx, options.pointStyle, radius, me.x, me.y, options.rotation);
+ helpers.canvas.drawPoint(ctx, options, me.x, me.y);
}
}
}
chart.ctx.clearRect(0, 0, chart.width, chart.height);
}
-export function drawPoint(ctx, style, radius, x, y, rotation) {
+export function drawPoint(ctx, options, x, y) {
var type, xOffset, yOffset, size, cornerRadius;
+ var style = options.pointStyle;
+ var rotation = options.rotation;
+ var radius = options.radius;
var rad = (rotation || 0) * RAD_PER_DEG;
if (style && typeof style === 'object') {
}
ctx.fill();
- ctx.stroke();
+ if (options.borderWidth > 0) {
+ ctx.stroke();
+ }
}
/**
],
"backgroundColor": "transparent",
"borderColor": "#0000ff",
- "borderWidth": 0,
+ "borderWidth": 1,
"pointStyle": [
"circle",
"cross",
],
"backgroundColor": "#00ff00",
"borderColor": "#0000ff",
- "borderWidth": 0,
+ "borderWidth": 1,
"pointStyle": [
"circle",
"cross",
"elements": {
"line": {
"borderColor": "transparent",
- "borderWidth": 0,
+ "borderWidth": 1,
"fill": false
},
"point": {