title: I want to set level with in time interval in array form
body: <p>I am using angular js and moment.js. Right now I am generating levels for line graph. So I need to set some levels for x axis values. I want to set hours interval in x'axis. Right now I am using these(x'aix) values statically, But now I want to set dynamically with javascript function.   </p>
  
  <pre><code>var lineData = { labels: ["0hr", "1hr", "2hr", "3hr", "4hr", "5hr", "6hr"],
                  datasets: [                   
                      {
                          label: "My Second dataset",
                          fillColor: "rgba(151,187,205,0.2)",                      
                          pointHighlightFill: "#fff",
                          pointHighlightStroke: "rgba(151,187,205,1)",
                          data: [28, 48, 40, 19, 86, 27, 80]
                      }
                  ]
              }; 
   var startFromTime=11;
   var endToTime=15;
  </code></pre>
  
  <p>I want to set time interval from 11 to 15 in labels.</p>
  
  <blockquote>
    <p>labels: ["0hr", "1hr", "2hr", "3hr", "4hr", "5hr", "6hr"]</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/cGJAM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cGJAM.png" alt="enter image description here"></a></p>
  
  <p>can I set assign these value in array form to variable and this variable assign into labels:[1,2,3,4]</p>