More flexible charts

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