Chart.js Playground
Enjoy charting
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
<canvas id="myChart" width="400" height="400"></canvas>
CSS
canvas{
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-o-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
JavaScript
var ctx = document.getElementById("myChart");
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ['Ambition', 'Systematic', 'Adjustment', 'Communication', 'Creativity', 'Innovation', 'Integrity', 'Cooperation'],
datasets: [{
data: [2, 6, 7, 4, 8, 5, 9, 3],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(153, 102, 28, 0.2)',
'rgba(255, 59, 20, 0.2)'
]
}, {
data: [8, 4, 3, 6, 2, 5, 1, 7],
backgroundColor: [
'rgba(255, 99, 132, 0.8)',
'rgba(54, 162, 235, 0.8)',
'rgba(255, 206, 86, 0.8)',
'rgba(75, 192, 192, 0.8)',
'rgba(153, 102, 255, 0.8)',
'rgba(255, 159, 64, 0.8)',
'rgba(153, 102, 28, 0.8)',
'rgba(255, 59, 20, 0.8)'
]
}]
},
options: {
legend: {
display: false
},
tooltips: {
enabled: false
},
scales: {
yAxes: [{
display: false,
stacked: true,
ticks: {
beginAtZero:true
}
}],
xAxes: [{
position: 'bottom',
stacked: true,
ticks: {
fontSize: 32,
autoSkip: false,
minRotation: -90,
maxRotation: -90,
padding: -20,
}
}]
}
}
});