Fix legend crash when rendering new time series
Fix legend crash when rendering new time series

We use dygraphs to populate the value for each time series in the hover
legend. These values are stored as state, but can go stale if the
`Dygraph` component is rerendered with new time series. This breaks
assumptions we have about the data passed to the `Legend` component.

This commit adds a guard to the `Legend` component to bail out of
rendering if it encounters invalid data. This prevents the `Dygraph`
component from crashing.

nooproblem/influxdb,nooproblem/influxdb,li-ang/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdata/influxdb,influxdata/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb