Datafable / epu-index

EPU index
http://www.applieddatamining.com/cms/?q=content/economic-policy-uncertainty-index
1 stars 0 forks source link

Show current selection on overview chart on page load #41

Closed peterdesmet closed 9 years ago

peterdesmet commented 9 years ago

Instead of calling populateDetailedChart(), call selectYear() on page load.

peterdesmet commented 9 years ago

This now works, but I had to call loadYear() (previously selectYear()) after I c3.generate(). See here. If I use oninit(), the overviewChart is still undefined. Don't know why.

There is still a possibility that loadYear() will try to populate detailedChart() (here) before that chart has been created (here), but I think that is rare... can someone verify?

Also, the indicated selection on the overviewChart will almost never have an end line. Say that the selection ends today at July 13: the last data point on the overviewChart however will be July 1, since the data are aggregated by month.

screen shot 2015-07-13 at 17 46 34

A region with a background would be a better indication of the selection, but that API is broken. See https://github.com/masayuki0812/c3/issues/1255