aggregate rollovers with multiline data, of single points, cause error #695

Closed
jweir opened this Issue Aug 18, 2016 · 1 comment

Projects

None yet

2 participants

@jweir
jweir commented Aug 18, 2016

The below graph will raise an error Cannot read property '0' of undefined

    MG.data_graphic({
      data : [{x: 1, y1: 10, y2: 10}],
      target: '#graph-prices',
      x_accessor: 'x',
      y_accessor: ["y1","y2"],
      aggregate_rollover: true,
    });

at https://github.com/mozilla/metrics-graphics/blob/master/src/js/charts/line.js#L536

Using only 1 y_accessor, or adding another item to the data does not cause the error.

@almossawi almossawi added this to the v2.11 milestone Aug 18, 2016
@almossawi almossawi self-assigned this Aug 18, 2016
@almossawi almossawi added a commit that closed this issue Aug 18, 2016
@almossawi almossawi Merge remote-tracking branch 'origin/master' (fixes #695)
# Conflicts:
#	dist/metricsgraphics.min.js
8a73ca2
@almossawi almossawi closed this in 8a73ca2 Aug 18, 2016
@almossawi
Member

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment