Created
February 28, 2019 13:22
-
-
Save krizex/0336e725e1e1549ddb15919abc19a342 to your computer and use it in GitHub Desktop.
charts without label
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
<body> | |
<canvas id="myChart" width="200" height="200"></canvas> | |
</body> | |
<script> | |
var ctx = document.getElementById("myChart"); | |
var myChart = new Chart(ctx, { | |
type: 'line', | |
data: { | |
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], | |
datasets: [{ | |
label: '# of Votes', | |
data: [12, 19, 3, 5, 2, 3], | |
}] | |
}, | |
options: { | |
responsive: false, | |
legend: { | |
display: false | |
}, | |
scales: { | |
xAxes: [{ | |
ticks: { | |
display: false //this will remove only the label | |
} | |
}], | |
yAxes: [{ | |
ticks: { | |
display: false //this will remove only the label | |
} | |
}] | |
} | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment