The problem is that you declared the scales outside the scope of the function that is executed when you call the component on a selection. This means that updating them in one place will also affect all the other graphs that use the same component.
To fix, you can either instantiate the component several times or move the declaration of scales/axes inside the function that is called on the selection.