Viv*_*vek 10 javascript typescript smartcontracts angular
伙计们,我正在从智能合约中获取数据,它给出了一个很大的数字作为响应,我想将其转换为正常数字,以便我可以使用它来创建条形图。如何才能做到这一点?
这是我编写的代码片段,以便我可以将值存储在数组中:
//Creating candidatevoterarray for graph
for (var i =0; i<= 4; i++){
const temparray = this.candidatearray[i]
const count = temparray.voteCount
// this.candidatevotearray.push(count)
console.log(count)
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
31339 次 |
最近记录: |