using phantomJS to render graphs