New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drillUp throws an error when a chart is not drilled into #7602

Closed
Munksgaard opened this Issue Jan 2, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@Munksgaard
Contributor

Munksgaard commented Jan 2, 2018

Expected behaviour

Calling chart.drillUp should do nothing when the chart hasn't been drilled into. The documentation at https://api.highcharts.com/class-reference/Highcharts.Chart.html#.drillUp doesn't require that the chart has been drilled down in.

Actual behaviour

The following error is thrown (in Chrome):

Uncaught TypeError: Cannot read property 'length' of undefined
    at a.Chart.q.drillUp (VM440 drilldown.js:15)
    at HTMLButtonElement.<anonymous> ((index):139)
    at HTMLButtonElement.dispatch (VM437 jquery-3.1.1.min.js:3)
    at HTMLButtonElement.q.handle (VM437 jquery-3.1.1.min.js:3)

Live demo with steps to reproduce

http://jsfiddle.net/f6fydL8p/3/

Affected browser(s)

Firefox and Chrome

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Jan 3, 2018

Contributor

Hi @Munksgaard

Thank you for reporting this issue.

Internal note:
@jon-a-nygaard - should we fix this in the core or add an explanation to the docs?

Contributor

pawelfus commented Jan 3, 2018

Hi @Munksgaard

Thank you for reporting this issue.

Internal note:
@jon-a-nygaard - should we fix this in the core or add an explanation to the docs?

@pawelfus pawelfus added the Undecided label Jan 3, 2018

@TorsteinHonsi TorsteinHonsi added Bug and removed Undecided labels Jan 3, 2018

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Jan 3, 2018

Collaborator

It's a bug, we should fix this in the drilldown module. It should be easy to check if we're already on the top level.

Collaborator

TorsteinHonsi commented Jan 3, 2018

It's a bug, we should fix this in the drilldown module. It should be easy to check if we're already on the top level.

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