Dynamically set font size based on graph size