you can simply use `item.style.width = (this._items[i].value * 100) / this._total + '%'`