const quadrants = {
id: 'quadrants',
beforeDraw(chart, args, options) {
const {ctx, chartArea: {left, top, right, bottom}, scales: {x, y}} = chart;
const midX = x.getPixelForValue(0);
const midY = y.getPixelForValue(0);
ctx.save();
ctx.fillStyle = options.topLeft;
ctx.fillRect(left, top, midX - left, midY - top);
ctx.fillStyle = options.topRight;
ctx.fillRect(midX, top, right - midX, midY - top);
ctx.fillStyle = options.bottomRight;
ctx.fillRect(midX, midY, right - midX, bottom - midY);
ctx.fillStyle = options.bottomLeft;
ctx.fillRect(left, midY, midX - left, bottom - midY);
ctx.restore();
}
};