Skip to content

Commit a9c4e37

Browse files
TPullen21simonbrunel
authored andcommitted
Add color to financial time series sample (#5661)
1 parent 3010173 commit a9c4e37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

samples/scales/time/financial.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@
5656
var ctx = document.getElementById('chart1').getContext('2d');
5757
ctx.canvas.width = 1000;
5858
ctx.canvas.height = 300;
59+
60+
var color = Chart.helpers.color;
5961
var cfg = {
6062
type: 'bar',
6163
data: {
6264
labels: labels,
6365
datasets: [{
6466
label: 'CHRT - Chart.js Corporation',
67+
backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
68+
borderColor: window.chartColors.red,
6569
data: data,
6670
type: 'line',
6771
pointRadius: 0,

0 commit comments

Comments
 (0)