fix to update function in distancechart