update data-average and data-rate on click

plus exemple page