Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Chart configuration
window.onload = function () {
var ctx = document.getElementById('chartCanvas').getContext('2d');
window.myChart = new Chart(ctx, {
type: 'line',
data: {
datasets: [{
label: 'Speed',
data: []
}]
},
options: {
scales: {
xAxes: [{
type: 'realtime',
delay: 0,
// 20 seconds of data
duration: 20000
}],
yAxes: [{
ticks: {
suggestedMin: 0,
suggestedMax: 50
}
}]
}
}
});
// The other signalr setup is still here...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.