So much negative logic.

```js
if (scope.graphSettings.legendSetting === "never" || 
  (scope.graphSettings.legendSetting === "sometimes" && series.length > 5))
```