-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Heatmap cell borders disappear on hover (inconsistent with documentation) #17856
Comments
Hi @neillrobson, thank you for reporting the issue!
Workaround: if no marker states options are found, use |
Ah, that makes a lot of sense! It looks like, based on your demo JSFiddle, the relevant line of code in the library that needs to be updated is here. Does that look correct to you? If so, I may have the bandwidth in the next few days to create a pull request with this fix (alongside unit test updates & whatever else may be necessary). Let me know if that would be helpful and I can try to make time for contributing. |
…ained unset in state config. Previously, when the `lineColor` for a given heatmap marker state was left undefined, the stroke got reset entirely rather than retaining the default value. For example, if `lineColor` was not specified in the heatmap's hover state (when other fields for that state were defined), then the cell borders would disappear upon hovering on a given data point. This patch adds a null check on the state option object's `lineColor` field, and only assigns it to the point's stroke attribute if it is defined. Consequently, when undefined, the stroke retains its default (normal state) value, in accordance with the documented behavior.
Expected behaviour
When a heatmap chart's
series.heatmap.marker.states.hover.lineColor
is left unset/unspecified, the hover state of a given cell should have the same line (border) color as the normal/default state.I assume this behavior is expected based on the documentation:
series.heatmap.marker.states.hover.lineColor
: "Whenundefined
, the series' or point's lineColor for normal state is used."series.heatmap.marker.lineColor
: "Whenundefined
, the series' or point's color is used."Actual behaviour
When
lineColor
for the heatmap chart's hover state is left unspecified, the hovered cells on a heatmap lose their border altogether.Live demo with steps to reproduce
https://jsfiddle.net/jm7huncp/
lineColor
explicitly to the hover state (uncomment that line in the code)borderColor
, the color inheritance across states worked in a manner consistent with the documentationProduct version
Highcharts v10.2.1 (current as of writing)
Affected browser(s)
The text was updated successfully, but these errors were encountered: