Chart not updating properly when brush updates

Hi,
I’m trying to make a focus-context chart. I got the brush working such that it updates the x-axis in the focus part but not the bar chart. I’m at a loss as to why the bars are not updating with the brush.

Here is a link to the notebook.

Any advice to get the bars to update with the brush? Thank you for your time.

Alex

Alright, I figured out my own problem. I was using the the original x-scale function x instead of the x-scale copy focusX, I was passing into the function to set the bar attributes. I guess I was thinking in terms of stand-alone d3 where I would normally update the x-scale’s domain when the brush is updated.

1 Like