Fill chip media propotationally to confidence value (#156)

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Reviewed-on: #156
This commit is contained in:
2024-03-27 19:20:10 -07:00
parent e8778f3e24
commit ecdf74a483
3 changed files with 5 additions and 3 deletions

View File

@@ -258,7 +258,8 @@
},
methods: {
chipGradient (confVal) {
return `--chip-media-background: hsl(${confVal / 100 * 120}deg 100% 50%)`
let confFactor = confVal / 100
return `--chip-media-gradient: conic-gradient(from ${270 - (confFactor * 360 / 2)}deg, hsl(${confFactor * 120}deg, 100%, 50%) ${confFactor}turn, hsl(${confFactor * 120}deg, 50%, 66%) ${confFactor}turn)`
},
async setData () {
if (this.reloadModel) {