This code
\tikz \graph [layered layout] { "I want newline after comma:" -> "Hello,\\ World."; };
just gets rid of the whitespace between the "," and the "W" of "World" below:
Why doesn't it make a newline?
\mbox{hello\\world}
try this
\tikz [text centered] \graph [layered layout, nodes = {align=center}] { "I want newline after comma:" -> "Hello,\\World."; };
\mbox{hello\\world}which similarly does not break, you need a fixed width mode in tikz (which makes a parbox) – David Carlisle May 23 '14 at 19:00