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

Removing colorAxis #6488

Closed
PaulDalek opened this Issue Mar 20, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@PaulDalek
Contributor

PaulDalek commented Mar 20, 2017

Behaviour

Trying to remove colorAxis results in ‘chart.options[key].splice is not a function’ error.

Live demo

http://jsfiddle.net/d_paul/agj45fas/

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Mar 22, 2017

Collaborator

If we replace the failing code in Axis.remove with the following, we don't get the error message. But there's still a problem with the legend symbol remaining.

		if (H.isArray(chart.options[key])) {
			chart.options[key].splice(this.options.index, 1);
		} else {
			delete chart.options[key];
		}
Collaborator

TorsteinHonsi commented Mar 22, 2017

If we replace the failing code in Axis.remove with the following, we don't get the error message. But there's still a problem with the legend symbol remaining.

		if (H.isArray(chart.options[key])) {
			chart.options[key].splice(this.options.index, 1);
		} else {
			delete chart.options[key];
		}
@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Apr 20, 2017

Collaborator

Thanks @sebastianbochan. FYI, I modified your fix by removing the legend item belonging to the color axis, not the whole legend.

Collaborator

TorsteinHonsi commented Apr 20, 2017

Thanks @sebastianbochan. FYI, I modified your fix by removing the legend item belonging to the color axis, not the whole legend.

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