Enhanced x-axis scaling and label drawing for line chart, and overall cleanup.