Binding to click Events for time series graph

Hello I found this sample here:

The plot part Looks so:

But I dont know how to customized it for time series graph?


        Plotly.newPlot(self.ctx.div, self.ctx.plotData,
            layout, {
                displaylogo: false
            });