Fix 0 price visualization (#8099)
This commit is contained in:
parent
6c4d9d6fed
commit
ec81ad4d12
2 changed files with 4 additions and 4 deletions
|
|
@ -25,9 +25,9 @@ function createRate(price, hoursFromNow, durationHours = 1) {
|
|||
|
||||
const co2 = {
|
||||
rates: [
|
||||
545, 518, 545, 518, 213, 545, 527, 527, 536, 518, 400, 336, 336, 339, 344, 336, 336, 336,
|
||||
372, 400, 555, 555, 545, 555, 564, 545, 555, 545, 536, 545, 527, 536, 518, 545, 509, 336,
|
||||
336, 336,
|
||||
545, 518, 545, 518, 0, 545, 527, 527, 536, 518, 400, 336, 336, 339, 344, 336, 336, 336, 372,
|
||||
400, 555, 555, 545, 555, 564, 545, 555, 545, 536, 545, 527, 536, 518, 545, 509, 336, 336,
|
||||
336,
|
||||
].map((price, i) => createRate(price, i)),
|
||||
duration: 8695,
|
||||
plan: [createRate(213, 4), createRate(336, 11), createRate(336, 12)],
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ export default {
|
|||
},
|
||||
priceStyle(price) {
|
||||
const value = price === undefined ? this.avgPrice : price;
|
||||
const height = value ? `${(100 / this.maxPrice) * value}%` : "100%";
|
||||
const height = value !== undefined ? `${5 + (95 / this.maxPrice) * value}%` : "100%";
|
||||
return { height };
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue