More flexible charts

Two patches allowing to set aggregate and number of displayed values for BaseChart and view by year.