Disable bar chart darken on hover
See original GitHub issueQuestion: is it possible to disable the bar chart darkening on hover? I actually want the opposite effect, where the bar that’s being hovered over stays the same but the other bars get darker, which I can do with a custom mouseover event. But it seems like the darkening will always happen because it comes after (in the source code):
function handleMouseOver(e, d, chartWidth, chartHeight) {
dispatcher.call('customMouseOver', e, d, d3Selection.mouse(e), [chartWidth, chartHeight]);
d3Selection.select(e).attr('fill', ({name}) => d3Color.color(colorMap(name)).darker());
}
EDIT: I’ve come up with a workaround that mostly works. On the first hover, all bars darken (haven’t figured out why), but on subsequent hovers, it has the effect that I want. https://codepen.io/chinaowl/pen/jYejrd
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to Color Chart Background onHover in Chart JS - YouTube
However, we want to make sure the trigger will only on hover. ... With chart js you can make line chart, bar chart,...
Read more >How to disable CSS:hover ( reset ) dropdown after a ... - Reddit
The only way to do this is with JavaScript, remove or add a class that resets it with css on click.
Read more >Background color for negatives and columns dim on hover
Hello All, chart in the first screen needs to remove the gray background. In the second screen, columns become dimmer when I hover...
Read more >Bar chart | nivo
Also supports both vertical and horizontal layout, with negative values descending below the x axis (or y axis if using horizontal layout). The...
Read more >Formatting the Mouse Over Indicator (mouseOverIndicator)
For other chart types (such as bar, area, pie, tagcloud, treemap, ... This is the default value. false, which disables the mouse over...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chinaowl this weekend or next Monday!
Closing this @chinaowl, the functionality was released in
2.5.0
and the new functionality to apply a custom behavior to highlighted bars is ready https://github.com/eventbrite/britecharts/pull/503 and will be released later. Thanks for opening the issue!