Closed deviashin closed 4 years ago
@deviashin sorry, i got busy didn't have time to take a look, did you work it out?
Hello! No, unfortunately, I still need help. Under normal circumstances, this works, but in relation to your schedules - it just disappears. I can’t understand how to write code correctly Still need your help 😶
@deviashin your code should work, if you change 'color'
to be [color]
in:
datasets: [ { data: [var], backgroundColor: [color], } ]
Oh, those square brackets [ ] Thank you very much, now everything is fine!
Hello!
There is a structure "if else" as a result of which should change the color of the scale.
Please, how to do this?
Should get something like this:
var color;
if (condition) { color = "rgb(30, 148, 249)"; } else { color = "rgb(229, 73, 7)"; }
datasets: [ { data: [var], backgroundColor: 'color', } ]