title: SetInterval not working while using with canvas.js also within loop
body: <pre><code>&lt;?php 
   $no1=0;
  foreach($location_data as $last_data){ 
                        
          if($location[0]-&gt;depth_unit==&quot;meter&quot;){
            $depth_drilled=($last_data-&gt;end_depth - $last_data-&gt;start_depth)*3.28;
            $acceptable_loss=((12.25*12.25)/1029.4*($depth_drilled)/6.28);
        }
        else{
            $depth_drilled=($last_data-&gt;end_depth - $last_data-&gt;start_depth);
            $acceptable_loss=(12.25*12.25)/1029.4*($depth_drilled);
        }
        ?&gt;
        setInterval(function(){
    &lt;?php  if($last_data-&gt;shaker_loss_value &lt; $acceptable_loss ){ ?&gt;
      chart.options.data[3].dataPoints[&lt;?php echo $no1; ?&gt;].markerColor = &quot;transparent&quot;;
   &lt;?php } else { ?&gt;
      chart.options.data[3].dataPoints[&lt;?php echo $no1; ?&gt;].markerColor = &quot;red&quot;;
        chart.options.data[3].dataPoints[&lt;?php echo $no1; ?&gt;].markerType = &quot;triangle&quot;;
        &lt;?php  } ?&gt;
   chart.render();
   },&lt;?php echo $no1; ?&gt; * 1000);
   &lt;?php
   $no1++;
  }  ?&gt;
  </code></pre>
  <p>above is my code i am implementing in canvas.js to blink the marker but its only blink once while onload it should be blinking all the time any luck</p>
  <pre><code> setInterval(function(){
            chart.options.data[3].dataPoints[0].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[0].markerType = &quot;triangle&quot;;
             chart.render();
       },0 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[1].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[1].markerType = &quot;triangle&quot;;
             chart.render();
       },1 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[2].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[2].markerType = &quot;triangle&quot;;
             chart.render();
       },2 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[3].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[3].markerType = &quot;triangle&quot;;
             chart.render();
       },3 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[4].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[4].markerType = &quot;triangle&quot;;
             chart.render();
       },4 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[5].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[5].markerType = &quot;triangle&quot;;
             chart.render();
       },5 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[6].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[6].markerType = &quot;triangle&quot;;
             chart.render();
       },6 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[7].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[7].markerType = &quot;triangle&quot;;
             chart.render();
       },7 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[8].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[8].markerType = &quot;triangle&quot;;
             chart.render();
       },8 * 1000);
             setInterval(function(){
            chart.options.data[3].dataPoints[9].markerColor = &quot;red&quot;;
            chart.options.data[3].dataPoints[9].markerType = &quot;triangle&quot;;
             chart.render();
       },9 * 1000);
  </code></pre>
  <p>this is what i am getting at source
  view-source:<a href="http://dssecosystem.com/index.php/account/client_dashboard_new/1" rel="nofollow noreferrer">http://dssecosystem.com/index.php/account/client_dashboard_new/1</a>
  above is the link you can check my code at line 28847</p>