ankane/chartkick — pull request #126 by snocorp (2014-09-15 17:12:29+00:00)
Title: Improved support for hAxis ticks in Google Line Chart

This request includes two fixes to allow dates to be included as hAxis.ticks values for the Google Line Chart visualization.

Part 1. When ticks are passed as Date objects (e.g. `ticks:[new Date(2014,8,15), ...]` the implementation of extend used from zepto replaces the dates with empty Objects (`{}`). I pulled the latest implementation from Zepto and this fixes the issue.

Part 2. When ticks are serialized as JSON from Rails, the dates are simple strings (e.g. "2014-09-15") which the Google API doesn't like. It renders a small red box containing the string "undefined is not a function". In order to avoid this I've added a function to automatically convert the ticks to Date objects using the existing toDate function only if the chart is a continuous data set.