Datafable/epu-index

Word cloud appears more than once

Opened this issue · 3 comments

Sometimes you end up with more than one word cloud on the page. I haven't been able to figure out what triggers it exactly, but it seems to occur more when the word cloud is below the view window and you click several ranges in the chart in succession.

economic policy uncertainty index applied data mining

I can easily create up to 7 images. Probably caused by:

  1. User clicks chart
  2. D3 removes content from word cloud container.
  3. Long response time for word cloud doesn't add image yet
  4. Repeat step 1-3
  5. Response gets back: multiple images are added to word cloud container.

Any ideas how best to solve this?

Clear the svg (again?) when the data is returned?

Should we close this issue?