diff --git a/ui/src/shared/components/Dygraph.js b/ui/src/shared/components/Dygraph.js index f30d88826..74cf594f2 100644 --- a/ui/src/shared/components/Dygraph.js +++ b/ui/src/shared/components/Dygraph.js @@ -339,6 +339,7 @@ class Dygraph extends Component { /> {staticLegend && dygraph.attributes_.series_[l].options.color) - : [] + const labels = _.keys(dygraphSeries) + const colors = _.map(labels, l => dygraphSeries[l].color) const hoverEnabled = labels.length > 1 @@ -105,7 +102,7 @@ class StaticLegend extends Component { const {shape, func} = PropTypes StaticLegend.propTypes = { - sharedLegend: shape({}), + dygraphSeries: shape({}), dygraph: shape({}), handleReceiveStaticLegendHeight: func.isRequired, }