fix tooltip for line chart

Change length calculation from point to line.