forked from chartjs/Chart.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement scriptable options for points in line charts (chartjs#5973)
- Loading branch information
1 parent
3aeaee1
commit f8f608d
Showing
40 changed files
with
1,210 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
test/fixtures/controller.line/backgroundColor/indexable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
module.exports = { | ||
config: { | ||
type: 'line', | ||
data: { | ||
labels: [0, 1, 2, 3, 4, 5], | ||
datasets: [ | ||
{ | ||
// option in dataset | ||
data: [0, 5, 10, null, -10, -5], | ||
pointBackgroundColor: [ | ||
'#ff0000', | ||
'#00ff00', | ||
'#0000ff', | ||
'#ffff00', | ||
'#ff00ff', | ||
'#000000' | ||
] | ||
}, | ||
{ | ||
// option in element (fallback) | ||
data: [4, -5, -10, null, 10, 5], | ||
} | ||
] | ||
}, | ||
options: { | ||
legend: false, | ||
title: false, | ||
elements: { | ||
line: { | ||
fill: false, | ||
}, | ||
point: { | ||
backgroundColor: [ | ||
'#ff88ff', | ||
'#888888', | ||
'#ff8800', | ||
'#00ff88', | ||
'#8800ff', | ||
'#ffff88' | ||
], | ||
radius: 10 | ||
} | ||
}, | ||
scales: { | ||
xAxes: [{display: false}], | ||
yAxes: [{display: false}] | ||
} | ||
} | ||
}, | ||
options: { | ||
canvas: { | ||
height: 256, | ||
width: 512 | ||
} | ||
} | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.