Merge pull request #2687 from influxdata/bugfix/legend-no-value

Remove no-value from list
pull/10616/head
Andrew Watkins 2018-01-10 13:46:13 -08:00 committed by GitHub
commit 743105b22f
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@
### Bug Fixes ### Bug Fixes
1. [#2652](https://github.com/influxdata/chronograf/pull/2652): Make page render successfully when attempting to edit a source 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. [#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] ## v1.4.0.0-rc2 [2017-12-21]
### UI Improvements ### UI Improvements

View File

@ -29,8 +29,9 @@ const DygraphLegend = ({
isFilterVisible, isFilterVisible,
onToggleFilter, onToggleFilter,
}) => { }) => {
const withValues = series.filter(s => s.y)
const sorted = _.sortBy( const sorted = _.sortBy(
series, withValues,
({y, label}) => (sortType === 'numeric' ? y : label) ({y, label}) => (sortType === 'numeric' ? y : label)
) )