fit ledgend to graph size