Curran Kelleher
Curran Kelleher
Perhaps @vasturiano would have some ideas on how to approach integration with other forces. I'm not familiar enough with the work to advise as to whether that's possible or how...
There's also the API considerations. Have you tried implementing it in d3-force? Any PR in the works?
Also related: [d3fc-label-layout](https://github.com/d3fc/d3fc/tree/master/packages/d3fc-label-layout)
I have no say as to whether it gets merged or not. Looks good to me at a high level, but I have not considered all the details and rammifications...
For example, English locale: ``` test.equal(f(0), "zero"); test.equal(f(1), "one"); test.equal(f(2), "two"); test.equal(f(3), "three"); test.equal(f(4), "four"); test.equal(f(5), "five"); test.equal(f(6), "six"); test.equal(f(7), "seven"); test.equal(f(8), "eight"); test.equal(f(9), "nine"); test.equal(f(10), "ten"); test.equal(f(11), "eleven"); ......
For example, Indian locale (from [StackOverflow: Indian Numbering System. How to Convert into the Official and Common-Use Numbering Systems Words/Strings](https://stackoverflow.com/questions/62795243/indian-numbering-system-how-to-convert-into-the-official-and-common-use-numberi)): ``` test.equal(f(50), "fifty"); test.equal(f(12000), "twelve thousand"); test.equal(f(777000), "seven lakh seventy...
FWIW replacing "G" with "B" in formatters is something I end up doing _frequently_. It would be great to have somthing with that baked in.
What might a solution look like? Perhaps a new thing that is similar to `s`, but a different letter? Perhaps ```js const formatter = number => format('.1s')(number).replace('G', 'B'); ``` could...
Strawman proposal: exactly the same behavior as `s`, with the only difference being G switching to B.
Digging into this a bit, found some interesting things: * [english.stackexchange.com: what is the correct abbreviation for millions, billions and trillions in a financial context?](https://english.stackexchange.com/questions/149190/what-is-the-correct-abbreviation-for-millions-billions-and-trillions-in-a-finan) >I have seen million, billion,...