# Chart not updating properly when brush updates

**URL:** <https://talk.observablehq.com/t/chart-not-updating-properly-when-brush-updates/4112>\
**Category:** Help\
**Created:** [November 7, 2020, 2:45am UTC](https://talk.observablehq.com/t/chart-not-updating-properly-when-brush-updates/4112 "2020-11-07T02:45:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caocscar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/caocscar/32/3830_2.png) [@caocscar](https://talk.observablehq.com/u/caocscar)\
**Post date:** [November 7, 2020, 2:45am UTC](https://talk.observablehq.com/t/chart-not-updating-properly-when-brush-updates/4112/1 "2020-11-07T02:45:13Z")

</div>

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.

> **[Untitled](https://observablehq.com/@caocscar/focus-context)**
>
> Focus-Context Chart

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

Alex

---

<div class="post-metadata">

**Author:** ![caocscar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/caocscar/32/3830_2.png) [@caocscar](https://talk.observablehq.com/u/caocscar)\
**Post date:** [November 8, 2020, 1:26am UTC](https://talk.observablehq.com/t/chart-not-updating-properly-when-brush-updates/4112/2 "2020-11-08T01:26:45Z")

</div>

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.
