Bonjour
J’ai trouvé ce widget sympa et je voulais l’utiliser pour mes contrôle de qualité de l’air
Mais je trouvais que les changements de couleur étaient « peu sympathique »
Ne connaissant rien en dev, j’ai demandé à chatgpt pour mettre des dégradés
Voici ce que j’ai obtenus :
Ce ne change pas grand chose, mais je trouve ça plus sympa
Voici le code modifié
plotBands: [{
from: 0,
to: 10,
color: {
linearGradient: { x1: 0, x2: 1, y1: 0, y2: 0 },
stops: [
[0.6, '#73F1E6'], // Start color
[1, '#63CCAB'] // End color
]
}
}, {
from: 11,
to: 20,
color: {
linearGradient: { x1: 0, x2: 1, y1: 0, y2: 0 },
stops: [
[0.6, '#63CCAB'], // Start color
[1, '#EFE641'] // End color
]
}
}, {
from: 21,
to: 25,
color: {
linearGradient: { x1: 0, x2: 1, y1: 0, y2: 0 },
stops: [
[0.6, '#EFE641'], // Start color
[1, '#EA4A4C'] // End color
]
}
},{
from: 26,
to: 50,
color: {
linearGradient: { x1: 0, x2: 1, y1: 0, y2: 0 },
stops: [
[0.6, '#EA4A4C'], // Start color
[1, '#972733'] // End color
]
}
},{
from: 51,
to: 75,
color: {
linearGradient: { x1: 0, x2: 1, y1: 0, y2: 0 },
stops: [
[0.6, '#972733'], // Start color
[1, '#802E82'] // End color
]
}
},{
from: 76,
to: 125,
color: {
linearGradient: { x1: 0, x2: 1, y1: 0, y2: 0 },
stops: [
[0.6, '#802E82'], // Start color
[1, '#802E82'] // End color
]
}
}],
tickPositions: [0,10,20,25,50,75,125]
},