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