Renamed the 'canvas' variable to 'surface'.

Renaming the variable gives us room to create a new class called Canvas.
Abstract-out canvas creation into an object.

Moved canvas creation and size management into a new Canvas class.

This is the first step towards a more object-oriented architecture.
Since we create multiple canvases, and have to maintain several
module-global variables to track their properties, they are the ideal
place to start.

This commit also removes sizing code that was duplicated between
makeCanvas and resizeCanvas.
Added a basic frame for the canvas-drawing plugin.
Added methods to draw and measure text.

These methods provide a common way to draw HTML text above a canvas.

The getTextInfo method generates div HTML for text with a given font
style/class and angle, measures the element's dimensions, and saves
everything in a cache.  The drawText method takes the resulting entry,
finishes generating the inline styles necessary to position the div, and
adds the result to a buffer.  The render method dumps the buffer into an
overlay and expires unused cache entries.
Provide a way for plugins to override classes.
Moved canvas tick rendering into a plugin.

The base implementation uses the new drawText and getTextInfo methods to
draw text in HTML.  Canvas rendering has been moved to overrides of
these methods within the canvas-render plugin.
Replace axis.font with options.font.

Instead of giving the axis its own font property, we simply look at its
options, where the font comes from in the first place.  A separate
property is unnecessary and inconsistent with the way other axis options
are handled.
Fixed missing/superfluous semicolons.
Preserve canvas elements on re-plot.

Since the Canvas .text object is jQuery-wrapped, it was not preserved as
expected when clearing the canvas of junk.  I've replaced the selection
with one based on element classes.
Added a 'reverse' sorted option.

This orders the legend entries in reverse order of their series.
Updated the API with the legend 'reverse' option.
Merge pull request #957 from dnschnur/legend-reverse

Added a legend 'reverse' sorting option.
Allow 'false' to be provided as a stack option.

This resolves #18, but without catching zero, which is a valid key.
Add basic Travis CI setup with jshint test.
Fix travis config. YAML forbids tabs.
Add build status to README.
Fix build status.
Fix README.
Merge pull request #961 from brianpeiris/master

Add basic Travis CI setup with test script that runs JSHint.
Cache actual elements instead of buffering HTML.

This significantly improves performance, since we already create the
elements when measuring them, and that effort is now no longer wasted.
We must take care to detach, rather than remove, when clearing the text
layer, so we can add the elements back later if necessary.