Add chart legend and google analytics