Datafable/epu-index

Show current selection on overview chart on page load

Closed this issue · 1 comments

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

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 c3js/c3#1255