oesmith/morris.js — pull request #38 by tangerilli (2012-03-13 04:20:50+00:00)
Title: Various changes to allow for x-series data that is not complete

Used to create a burndown chart (https://github.com/tangerilli/trelloburndown). Needed to be able to draw one line spanning the entire date range, and another line spanning a single subset of the date range.

Definitely a hack, and my first attempt at writing coffeescript, so it's probably horrible.

Current assumption is that null values will be placed in the data lists such that each list is the same length, then hacked at things until they didn't break when null values were encountered. A possible optimization would be to allow for variable length lists and sort things out automatically based on the dates.

Had to break various nice map one-liners as I wasn't sure how to keep the null values in the lists after passing them through map.