title: How i can refresh chart without refresh page?
body: <p>I want to refresh chart without refresh.
  I use setTimeout function, but when i apply to chart, dataset refresh only when reloading pages..</p>
  
  <p>This function chart...</p>
  
  <pre><code>$(function () {
          var areaChartData = {
              labels  : ['Goods', 'Qty'],
              datasets: [
              {
                  label               : '&gt;30 Days',
                  backgroundColor     : 'red',
                  borderColor         : 'red',
                  pointRadius          : false,
                  pointColor          : 'red',
                  pointStrokeColor    : 'red',
                  pointHighlightFill  : 'red',
                  pointHighlightStroke: 'red',
                  data                : [setTimeout(reload(), 5000), 21] 
              },
              {
                  label               : '15-30 Days',
                  backgroundColor     : 'orange',
                  borderColor         : 'orange',
                  pointRadius         : false,
                  pointColor          : 'orange',
                  pointStrokeColor    : 'orange',
                  pointHighlightFill  : 'orange',
                  pointHighlightStroke: 'orange',
                  data                : [setTimeout(reload(), 5000), 22]
              }
              ]
          }
  })
  </code></pre>
  
  <p>this jquery function...</p>
  
  <pre><code>function reload() {
          var temp;
  
          $.ajax({
              type  : 'ajax',
              url   : '&lt;?= base_url()?&gt;Dashboard/test',
              async : false,
              dataType : 'json',
              success : function(data) {
                  temp = data;
              }
          })
  
          return temp;
          setTimeout(reload, 5000);
      }
  </code></pre>