Adjust margins for titles

If the title is visible on a chart, an extra top margin is added for it
to fit into