Accepted answer

Based on some editing of your fiddle, it seems that they ARE actually being displayed... but they're out of range of the canvas. If you look at the outcome here, you can see that the newly added point near the top is displayed, on all of the graphs.

I'll see if I can work on a proper fix, because obviously this is not the desired behaviour.


It looks like the problem is that you aren't updating your domain when you display your dots, so they are using the last domain which was set (hence why only last show normally). In addition, you are displaying dots for the entire data set on each graph (although most of them are outside the domain).

I would actually recommend trying to parse your data into an array for each unique symbol, it make things much more straightforward for you. For example, you could simply set the domain using d3.extent.


A couple of solutions spring to mind:

  1. Setting up separate axes/domains per graph.

  2. Putting your dots into a g element per symbol, then adding data to them via a nested selection.

This works, but you really should read up a bit more on (nested) selections. Ideally, you would probably want to separately generate each graph, out of scope of the others. This solution is badly designed, but hopefully it should help to give you an idea of how your code is working.

Related Query

More Query from same tag