title: Given array of tasks with open and closed dates, how do calculate a count series to plot in highcharts?
body: <p>My use case stems from a problem similar to <a href="https://stackoverflow.com/questions/64135343/generating-counts-of-open-tickets-over-time-given-opened-and-closed-dates">Generating counts of open tickets over time, given opened and closed dates</a></p>
  <p>I am given a JSON of objects with one or two properties: open date and closed date (if closed). If the task is still open it won't have the property.</p>
  <p>My goal is to plot a line chart in Highcharts that shows the count of open tasks over time.</p>
  <p>If I were to use a brute force algorithm, I would create a data point for each time interval within the span of time covered by my chart and then determine the count of open tasks for that point, but that sounds really inefficient.</p>
  <p>Instead, I could use Highcharts to define the time intervals for the time axis and simply have data points for start, finish and each point where there's a variation in the value (or could I?).</p>
  <p>What would be an efficient vanilla javascript code to determine this series and the Highcharts options to plot it? I've seen some sql code arount (including the mentioned article) doing similar calculations, but I find it hard to relate it to my use case.</p>