@Stella,
Please take a look at this tutorial on rendering chart on user input.
Kindly share a sample project showcasing your requirements along with sample database over Google-Drive or Onedrive so that we can understand your requirement better and help you out.
__
Priyanka M S
Team CanvasJS