Update JavascriptFactory.php

fixes multiple charts