mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 20:59:08 +02:00
The bar `backgroundColor`, `borderColor`, `borderWidth` and `borderSkipped` options are now scriptable (unit tests, docs and a basic sample). Also fix the gulp task that generates the documentation on Windows.
56 lines
832 B
JavaScript
56 lines
832 B
JavaScript
module.exports = {
|
|
config: {
|
|
type: 'bar',
|
|
data: {
|
|
labels: [0, 1, 2, 3, 4, 5],
|
|
datasets: [
|
|
{
|
|
// option in dataset
|
|
data: [0, 5, 10, null, -10, -5],
|
|
borderSkipped: [
|
|
'top',
|
|
'top',
|
|
'right',
|
|
'right',
|
|
'bottom',
|
|
'left'
|
|
]
|
|
},
|
|
{
|
|
// option in element (fallback)
|
|
data: [0, 5, 10, null, -10, -5],
|
|
}
|
|
]
|
|
},
|
|
options: {
|
|
legend: false,
|
|
title: false,
|
|
elements: {
|
|
rectangle: {
|
|
backgroundColor: 'transparent',
|
|
borderColor: '#888',
|
|
borderWidth: 8,
|
|
borderSkipped: [
|
|
'bottom',
|
|
'bottom',
|
|
'left',
|
|
'left',
|
|
'top',
|
|
'right'
|
|
]
|
|
}
|
|
},
|
|
scales: {
|
|
xAxes: [{display: false}],
|
|
yAxes: [{display: false}]
|
|
}
|
|
}
|
|
},
|
|
options: {
|
|
canvas: {
|
|
height: 256,
|
|
width: 512
|
|
}
|
|
}
|
|
};
|