1👍
var ctx = document.getElementById("myChart");
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: dates,
datasets: [
{
backgroundColor: ["#0000FF"],
data: values
}
]
}
});
- Chartjs-Chart.js: scrollable/swipable time-based x-axis
- Chartjs-How to manipulate data in react-chartjs-2
Source:stackexchange.com