Help with debugging bar chart race needed

Hi,

I recreated a bar chart race by forking Mike Bostocks observable and updated it to work with my data:

Now I wanted to clean up the cells, so I did the following:

  • I created a new observable https://observablehq.com/d/d02e423d3cf9ec7b and (supposedly) copied each (relevant) cell to this notebook and reorganized the cells a little bit.
  • However, the resulting observable has a bug since no bars are shown and the ticker is not changing.

I tried to debug and look for a bug but unfortunately to no avail. I don’t seem to have a good strategy nail this issue down (even when using debugger;)

Any help would be greatly appreciated!

You appear to have forgotten to the cell that updates the chart?

chart.update(keyframe)

Any reason you needed to copy the cells over to a new notebook, rather than just forking again?

1 Like

That was it! Thanks so much!! Any tip how you found it - or was it mainly the inside knowledge being the creator of the original racing bar chart?

Background: It is the first time I try to do some more things with observable mixing different technologies. Overall, I am so impressed by the expressive power of observable, all the details you offer (and just some of which I notice), the sheer volume of examples and the quality and speed of support via the forum or slack in case I can’t solve a problem myself.

I have worked on several “experimental” observable notebooks to create different visualizations which I want to clean up and put together in two or three notebooks. In these expermiantal notebook I felt I have a lot of non essential cells since I was trying out a lot. I decided to start with a notebook off a clean slate instead of forking for two reasons: first, I wanted to include some of my experimantal notebooks into one - so I can’t fork all of them anyway. Second, to remove cell clutter, I wanted to start from scratch thinking by copying the essential cells and the unresolved references will be highlighted and guide me to include just the cells needed.

Obviously, I fall flat on my face since the missing cell was not referenced by the rest - still it was essential…

Thanks so much again - I really enjoy this experience you, your team and the community provides!

Thanks for the additional context. I was just curious! And yep, I guess it was just my familiarity with the notebook that helped me find the missing cell.