Assigned fill to selected bar using 'cell' disappears when you move the brush
See original GitHub issueHi,
I’m using the bar chart with brush. The selected bar is assigned a different fill using the <Cell/> method but whenever I move zoom in with the brush, the highlighted attribute is no longer in effect. It is literally only effective when I don’t use the brush… If anyone could give me an insight or any kind of explanation on what is going on, I would greatly appreciate it.
This is the line of my <Cell />:
{data.map((entry, index) => ( <Cell cursor="pointer" key={
cell-${index}} fill={entry.ID === selectedAgglos ? '#c95d47' : 'lightgrey' }/> ))}
Thank you
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Display or hide the fill handle - Microsoft Support
Learn how to enable or disable the fill handle and cell drag-and-drop in Excel.
Read more >How to Format Cells to Appear or Disappear with a Checkbox ...
Free Workbooks: https://www.excelvbaisfun.com/links?utm_source=youtube&utm_medium=desc&utm_content=Y0I68OE5Suk Join Excel Ninja Pro: ...
Read more >ImageJ User Guide
The ImageJ User Guide provides a detailed overview of ImageJ (and inherently Fiji), the standard in scientific image analysis (see XXVI Focus on...
Read more >Adjustment and fill layers in Photoshop - Adobe Support
Link With Layer moves the pattern along with the layer as the layer moves. When selected, you can drag in the image to...
Read more >Excel hints and tips - STL Training
Use Control + D to fill a cell with the data from an adjacent cell. ... Go to the sheet where you want...
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
I was having the same issue. Here’s how I solved it, using a custom shape.
Usage:
I stumbled across this problem myself, in my case I wanted to have one particular bar in a different color.
I managed to solve this by keeping track of the
startIndex
and then calculating the correct index when the brush changes.index === activeIndex - startIndex
This might be trivial but could save some time for anyone who also comes across this issue.
https://codesandbox.io/s/recharts-brush-with-custom-cell-fix-4ck18?file=/src/App.tsx