Answer the question
In order to leave comments, you need to log in
How to create a canvas plot of type line?
Good evening! I'm having trouble using Chart.js to create a small line chart. With large ones, of a different type, there are no problems! My code is below:
<canvas style="width: 100%; height: 30px; display: block;" id="Atlantis-Financiers" width="153" height="30"></canvas>
var ctx = document.getElementById('Atlantis-Financiers').getContext('2d');
var chart = new Chart(ctx, {
type: 'line',
data: {
datasets: [{
backgroundColor: 'rgb(255, 99, 132)',
borderColor: 'rgb(255, 99, 132)',
data: [0, 10, 5]
}]
},
options: {}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question