codeforamerica / jail-dashboard

A tool to help jail administrators, judges, and other stakeholders understand the conditions in metro jails, and use this data to visualize how their decisions–at both the individual and policy level–affect program, facility, and inmate outcomes.
3 stars 4 forks source link

[Refactor] Use `crossfilter#group` to simplify historical trends chart #102

Open c-lliope opened 7 years ago

c-lliope commented 7 years ago
let bookingDateTime = bookings.dimension(d => d.booking_date_time);
let group = bookingDateTime.group(d => {
  let time = new Date(d);
  let date = new Date(
      time.getYear(),
      time.getMonth(),
      time.getDate(),
      );

  return date;
});