UI-Research / college-affordability.urban.org

0 stars 0 forks source link

"k" not appearing for all labels in thousands #173

Closed vivhou closed 7 years ago

vivhou commented 7 years ago

For multiples, or any graphs with thousands, it would be nice to consistently have thousands represented in "k", however this doesn't seem to be the case. How would we specify this? Any example would be in cost-of-educating/endowments for graphs 02_0051.json-02_0055:

screen shot 2016-12-15 at 1 45 45 pm

vivhou commented 7 years ago

Another reason why it would be good to do this is due to spacing issues, example is 04_0091.json through 04_0093.json in Financial aid/Federal: screen shot 2016-12-16 at 9 34 44 am

bchartoff commented 7 years ago

Sure, you can specify any d3 format string for the ticks, see 9854b73e05e2c863567efefd6928969e816c7754 for an example.

More info on format strings here https://github.com/d3/d3/blob/master/API.md#number-formats-d3-format

And nice example/tester here http://bl.ocks.org/zanarmstrong/05c1e95bf7aa16c4768e

Please make these changes in the ed-data scripts, as you deem appropriate