Skip to content

Commit

Permalink
Fix - VueUiSparkbar - Fix bar overflow when >100 in percentage mode
Browse files Browse the repository at this point in the history
  • Loading branch information
graphieros committed Oct 5, 2024
1 parent e324189 commit 252eed0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/vue-ui-sparkbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,14 @@ function ratioToMax(val) {
}
function ratioTo(bar) {
if (FINAL_CONFIG.value.style.layout.independant) {
if (bar.target) {
return bar.value / bar.target;
}
if (FINAL_CONFIG.value.style.layout.percentage) {
if (bar.value > 100) {
return 1;
}
return bar.value / 100;
} else if(FINAL_CONFIG.value.style.layout.target === 0) {
return 1;
Expand Down

0 comments on commit 252eed0

Please sign in to comment.