mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 18:44:01 +02:00
Add v5.2.0-beta1 docs (#36338)
This commit is contained in:
53
docs/5.2/examples/dashboard/dashboard.js
Normal file
53
docs/5.2/examples/dashboard/dashboard.js
Normal file
@@ -0,0 +1,53 @@
|
||||
/* globals Chart:false, feather:false */
|
||||
|
||||
(() => {
|
||||
'use strict'
|
||||
|
||||
feather.replace({ 'aria-hidden': 'true' })
|
||||
|
||||
// Graphs
|
||||
const ctx = document.getElementById('myChart')
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const myChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [
|
||||
'Sunday',
|
||||
'Monday',
|
||||
'Tuesday',
|
||||
'Wednesday',
|
||||
'Thursday',
|
||||
'Friday',
|
||||
'Saturday'
|
||||
],
|
||||
datasets: [{
|
||||
data: [
|
||||
15339,
|
||||
21345,
|
||||
18483,
|
||||
24003,
|
||||
23489,
|
||||
24092,
|
||||
12034
|
||||
],
|
||||
lineTension: 0,
|
||||
backgroundColor: 'transparent',
|
||||
borderColor: '#007bff',
|
||||
borderWidth: 4,
|
||||
pointBackgroundColor: '#007bff'
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: false
|
||||
}
|
||||
}]
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
})
|
||||
})()
|
Reference in New Issue
Block a user