You need a textarea-field in your panel for the page which should display the graph. If you want to style this field as a little code editor, this is not possible via plain-kirby but you can paste the javascript into the field and save it in the page.
In your template or snippet you can then access this field and do this: <script><?= $page->your_field()->html() ?></script>
I think this would be a better solution then letting him upload a javascript file tbh because there would be much more to think about.