Infograph ported to javascript

Additionally this is also a fix for #577 which is now closed
Signed-off-by: Sheik Hassan <solergiga@yahoo.com>