I think that your first bullet-point is the only valid reason to close that question.
I'll explain my reasoning for the following three bullet points are not valid reasons:
The rule reviewers may comment on any part of the code, means we don't have to answer users specific concerns. And so a question shouldn't be off-topic for something we can all just ignore.
Sometimes we upvote questions that are off-topic.
This question is not definitely on or off topic,
and so people may just err on the side of a silent upvote.
Honestly a quick skim to me, I don't know too much JavaScript, looked fine.
If I liked the premise of the question I'd probably upvoted it too.
I too think this, if the 200_success didn't think it was bad, it can't be bad can it?
But look at their edit. It just changes a tag, I know I edit questions tags even if it's possibly off-topic.
Others probably do too.
Also this, and the point above, are both ad hominems, and it'd best if we don't use these to justify any decisions.
As for your first reason, I don't like questions stripped of context.
I don't answer them, ever.
I read the code in the question line by line, and had a lot of WTFs.
Normally this can translate into a good review, like 'WTF, don't do that'.
However mine were more Where The F is this variable.
Maybe I don't know enough JavaScript, and so the variables are clearly there for those well versed in JavaScript and d3.
But if I knew a lot more JavaScript and felt the same way I'd put down a VTC as stub code.
(But I may not know how to correctly use this close reason, as outlined by my above meta post.)