D3 makes this easy using a standard number format. For example, to create a function that zero-fills to four digits, say: var zero = d3.format("04d");.
確定! 回上一頁