Hi Koteshwara R, in the current implementation above, system doesn't understand the format of submitted tools options. It should be fed to Assistants API as a list of Python functions and then a dictionary, if you want to use it through Python SDK. When doing RESTful calls, it requires more efforts as the backend has to rely on something to identify required tool to use.
Simple implementation of tools / functions with Python SDK can be found on my GitHun repo here: https://github.com/LazaUK/AOAI-ParallelFunctionCalling-SDKv1.
In your scenario if you require a chart, rather then asking for a JavaScript code generation, you can enable "Code Interpreter" tool. It would use then Python in its sandbox environment to generate an image of chart, that you can feed to your Web page. Sample code of such chart generation can be found in AOAI Assistants doc page here: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/assistant#download-image.