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

Box Plot: Whiskers/Median appear on hover if their width is set to 0 #7607

Closed
sagargurtu opened this Issue Jan 3, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@sagargurtu

sagargurtu commented Jan 3, 2018

Expected behaviour

For box plot charts, whiskers and median should not appear on hover when their widths are already set to 0.

Actual behaviour

In the below fiddle, hover on any box plot. Whiskers and Median appear.

Live demo with steps to reproduce

http://jsfiddle.net/h09psvn0/

Affected browser(s)

Chrome

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Jan 4, 2018

Contributor

Hi @sagargurtu

Thank you for reporting this bug. It looks like lineWidth is applied on hover states, not stemWidth/whiskerWidth.

Workaround:
Set line width in CSS:

.highcharts-boxplot-median {
  stroke-width: 0;
}

.highcharts-boxplot-whisker {
  stroke-width: 0;
}

Demo: http://jsfiddle.net/h09psvn0/2/

Contributor

pawelfus commented Jan 4, 2018

Hi @sagargurtu

Thank you for reporting this bug. It looks like lineWidth is applied on hover states, not stemWidth/whiskerWidth.

Workaround:
Set line width in CSS:

.highcharts-boxplot-median {
  stroke-width: 0;
}

.highcharts-boxplot-whisker {
  stroke-width: 0;
}

Demo: http://jsfiddle.net/h09psvn0/2/

@pawelfus pawelfus added the Bug label Jan 4, 2018

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Jan 5, 2018

Collaborator

The explanation can be found here:

https://github.com/highcharts/highcharts/blob/v6.0.4/js/parts/SvgRenderer.js#L1903-L1904

The box plot series correctly sets with stroke with to zero, but the SVGRenderer translates it to nothing in order to work around a WebKit bug. On hover, the stroke is set on the parent group, and then inherited by the whisker.

An alternative workaround is to set the line width to something marginally greater than 0: http://jsfiddle.net/highcharts/h09psvn0/3/

Collaborator

TorsteinHonsi commented Jan 5, 2018

The explanation can be found here:

https://github.com/highcharts/highcharts/blob/v6.0.4/js/parts/SvgRenderer.js#L1903-L1904

The box plot series correctly sets with stroke with to zero, but the SVGRenderer translates it to nothing in order to work around a WebKit bug. On hover, the stroke is set on the parent group, and then inherited by the whisker.

An alternative workaround is to set the line width to something marginally greater than 0: http://jsfiddle.net/highcharts/h09psvn0/3/

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