d3 Number Formats

1. d3.format( ) ⇒ 轉換數字格式

程式碼

            
              //JS
              const numberFormat = d3.format("b"); // 參數 b 指二進位制
              const binaryNumber = numberFormat(10)
              console.log("format", binaryNumber); // '1010'