Unable to Create Live Realtime charts using Plot JS

I tried all different ways to use trigger the refresh automatically after one second. But unable to do so, if any expert of Plot.ly JS please help. Retrieving data on Y axis from MySql through linking a Php

Chart is plotted successfully but unable to refresh on its own when mySQL data is updated the plot unless to refresh the browser.

Thanks in advance.

<script src="js/plotly-latest.min.js"></script>
<script>
$(document).ready(function zk (){
                            var trace1 = 
                                        {
                                        type: 'bar',
                                        x: ['T001','T002','T003','T004','T005'],
                                        y: [<?php include 'retrieve.php'; ?>],
                                        marker: {
                                                color: '#C8A2C8',
                                                line: { width: 1.5 }
                                                }
                                        };                                 
                                        var data = [ trace1 ];
                                        var layout = {
                                                      //title: 'Responsive',
                                                      font: {size: 18}  
                                                    };
                                        Plotly.newPlot('myDiv', data, layout, {
                                                                                displaylogo: false,
                                                                                responsive: true,
                                                                                displayModeBar: false
                                                                            });       
                                    });

</script>

check this video

three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online