Created
November 6, 2017 09:18
-
-
Save zagriyen/35384cd33bf0f96b10f1b08c38ba9b53 to your computer and use it in GitHub Desktop.
Canvas background color Chartjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chart.plugins.register({ | |
beforeDraw: function(chartInstance) { | |
var ctx = chartInstance.chart.ctx; | |
ctx.fillStyle = "white"; | |
ctx.fillRect(0, 0, chartInstance.chart.width, chartInstance.chart.height); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment