Use script to add plot to time series chart perspective

I am currently working on use onEditCellCommit in table.event to create plot into time series chart (with message handler in time series chart). but the code is not working without any errors. I am wondering if i can use message handler or I have to directly bind to the plot? thanks