diff --git a/CHANGELOG.md b/CHANGELOG.md index 72d87f03a4..f886c8a5e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ### Bug Fixes 1. [#2652](https://github.com/influxdata/chronograf/pull/2652): Make page render successfully when attempting to edit a source 1. [#2664](https://github.com/influxdata/chronograf/pull/2664): Fix CustomTimeIndicator positioning +1. [#2687](https://github.com/influxdata/chronograf/pull/2687): Remove series with "no value" from legend ## v1.4.0.0-rc2 [2017-12-21] ### UI Improvements diff --git a/ui/src/shared/components/DygraphLegend.js b/ui/src/shared/components/DygraphLegend.js index f19a3bebc3..2366aad5e3 100644 --- a/ui/src/shared/components/DygraphLegend.js +++ b/ui/src/shared/components/DygraphLegend.js @@ -29,8 +29,9 @@ const DygraphLegend = ({ isFilterVisible, onToggleFilter, }) => { + const withValues = series.filter(s => s.y) const sorted = _.sortBy( - series, + withValues, ({y, label}) => (sortType === 'numeric' ? y : label) )