Fix for legends on graphs with custom titles