diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index bb3c958e..1293cbad 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -179,7 +179,7 @@ v-b-tooltip.hover title="Threshold" class="box overlay" - :style="`left:${scaleWidth(prop.tally)}%;`" + :style="`left:${scaleWidth(prop)}%;`" />
@@ -410,9 +411,10 @@ export default { scaleWidth(p) { if (this.tallyParam) { if (p.status === 2) { - return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * 100 + return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100 } - return Number(this.tallyParam.threshold) * 100 + console.log(p.tally, Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100) + return Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100 } return 50 }, diff --git a/src/views/components/governance/ProposalSummaryComponent.vue b/src/views/components/governance/ProposalSummaryComponent.vue index e79e3ed1..1cf46b7e 100644 --- a/src/views/components/governance/ProposalSummaryComponent.vue +++ b/src/views/components/governance/ProposalSummaryComponent.vue @@ -219,9 +219,9 @@ export default { scaleWidth(p) { if (this.tallyParam) { if (p.status === 2) { - return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * 100 + return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100 } - return Number(this.tallyParam.threshold) * 100 + return Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100 } return 50 },