oesmith/morris.js — pull request #118 by chriserin (2012-11-17 00:06:14+00:00)
Title: add hover label format for cases where the date could use more context

In my case, I'm averaging data for the last 10 dates and then graphing that data. In the hover I'd like to have a date range as the label (3/24/2012 - 4/5/2012) as it contextualizes the data more accurately.

In order to achieve this, I added an 'originalData' field to each element in the internal data variable (@data). Having access to the original data point provides a lot of flexibility, as the data point could be defined as {x: '2012-04-05', y: 25, description: 'anything I want', start_date: '2012-03-24' }

Thanks for putting this graph together. In my opinion its a great looking graph and easy to modify/use!