Support generating chart Javascript without <script> tag. This allows JS to be used inside a callback function.