UI-Research / college-affordability.urban.org

0 stars 0 forks source link

Highlighting single data point (bar) #161

Closed vivhou closed 7 years ago

vivhou commented 7 years ago

Unable to highlight a single bar or data point in graph. In this case (04_0130.json), I'd like to highlight the U.S.:

screen shot 2016-12-02 at 3 37 50 pm

bchartoff commented 7 years ago

@vivhou Please include the full path to the json, not just the json file name. Thanks!

bchartoff commented 7 years ago

Also, these graphs (with single highlighted bar) will eventually need an update to the json to specify which bar to highlight, but I'm not sure what the format will be until I tackle this ticket

bchartoff commented 7 years ago

@vivhou ok, I added a field to highlight a single bar. At the top level of the JSONS, add a highlightIndex field, like in https://github.com/UI-Research/college-affordability.urban.org/commit/f5abad33ce75cc18c2a831e81a502945aecb500c#diff-120f66341311a290aa8b05194eaec24f

Note that the bars are zero indexed, so in this example the US bar has the index 18, not 19

vivhou commented 7 years ago

thanks ben for your help on this! and oh yes the index makes sense 👍