<canvas id="oilChart" width="1000" height="400"></canvas>
body {
height: 450px;
}
canvas {
max-height: 100%;
}
xxxxxxxxxx
var oilCanvas = document.getElementById("oilChart");
Chart.defaults.font.family = "Lato";
Chart.defaults.font.size = 18;
Chart.defaults.color = "black";
var oilData = {
labels: [
"Saudi Arabia",
"Russia",
"Iraq",
"United Arab Emirates",
"Canada"
],
datasets: [
{
data: [133.3, 86.2, 52.2, 51.2, 50.2],
backgroundColor: [
"#FF6384",
"#63FF84",
"#84FF63",
"#8463FF",
"#6384FF"
]
}]
};
var pieChart = new Chart(oilCanvas, {
type: 'pie',
data: oilData
});