Datahandler and Unified Data Format

This commit unifies the various data formats used by dygraphs (error
bars, custom bars, fractions, simple numbers) into a single, canonical
format. It also allows users to create their own data formats.

Original proposal:
https://docs.google.com/document/d/1IWmX4oDbQbVtUoRNzSRG3yMpoBQ7LseVCQhGnuOZz_A/edit?pli=1#

This commit corresponds to pull request 249.
(https://github.com/danvk/dygraphs/pull/249)

Squashed commit of the following:

commit acf2bc1dcdede4a52a5a9530476fbaf031009244
Author: Dan Vanderkam <danvdk@gmail.com>
Date:   Tue Aug 27 22:50:46 2013 -0400

    update closure TODO with new files

commit 13116fcf57a47b878f5cae2348718d61eebdc2e4
Merge: 0668281 625324f
Author: Dan Vanderkam <danvdk@gmail.com>
Date:   Tue Aug 27 22:43:50 2013 -0400

    Merge branch 'sauter-custom-datahandler' of https://github.com/sauter-hq/dygraphs into 249-datahandler

commit 625324fb1ce5d172537e484408497aab8bb1fcf0
Author: eberldav <eberldav@ch.sauter-bc.com>
Date:   Mon Aug 5 14:44:06 2013 +0200

    BUGFIX: Readded callback.js to the tests which was mistakenly removed.

commit d18669c853b3e906a614fd3e251b06ab60be5ae7
Author: eberldav <eberldav@ch.sauter-bc.com>
Date:   Mon Aug 5 14:28:41 2013 +0200

    DOC: Refactored JSDoc to fit the closure complier standard.

commit a5bb18294faca0c411507b74bd9ee25ac364ccda
Author: eberldav <eberldav@ch.sauter-bc.com>
Date:   Mon Jul 22 18:04:37 2013 +0200

    BUGFIX: Fixed lint errors for static usage of Dygraph and DygraphLayout

commit a7b2e9493011710b2cb602200be6c2e839ffd6c0
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon Jul 22 16:53:36 2013 +0200

    REFACTORING: Changed some method parameters based on suggestions of Dan and Robert and added some documentation.

commit 1d65e4effe51a00166a346cc06117d4613476231
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon Jul 22 15:16:07 2013 +0200

    REFACTORING: Renamed datahandler files

commit edb9bdfac79a810f5e0ae1758062e63bb21e8b5d
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon Jul 22 15:12:55 2013 +0200

    DOC: Added documentation for data handlers and fixed wrong method visibilities.

commit 9ed5d88e2bfe2518293565cc97ee06bf56040c72
Merge: af5decb 22bc1f1
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Jul 19 10:09:28 2013 +0200

    Merge branch 'official-master' into sauter-custom-datahandler

    Conflicts:
    	dygraph.js

commit af5decb0e678e57eb9a50bfc7b141b5d647be1a1
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Wed Jul 10 10:21:25 2013 +0200

    REFACTORING: Extracted getHandlerId_ method and refactored some variable names for better readability

commit 84be5b402420a10013ebf2e49943e8faabf54b01
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Tue Jul 9 18:02:45 2013 +0200

    Fixed formatting issues.

commit b2085b50a3f16d4067b02a1a2069f44835476d3d
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Tue Jun 25 08:49:54 2013 +0200

    REFACTORING: Romoved old extract series method which is now moved into the data handlers.

commit 7d851638386c9e94bbd593a2bee7bfdec8486753
Merge: c8f5edb 464538e
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Thu Jun 20 15:13:22 2013 +0200

    Merge branch 'official-master' into sauter-custom-datahandler

    Conflicts:
    	dygraph.js

commit c8f5edbb690ffdc3bc88393f26f8d3fd8f717533
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Jun 14 12:20:41 2013 +0200

    FEATURE: Integreated the new creation of points into the data handlers. This proposal is now fully functional again.

commit 5c1ce9c76243c430f9f5d50864b9cb909f611f6f
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Jun 14 12:19:33 2013 +0200

    Reverted file EOL back to unix

commit 2684ae56b8e2881680771f783449b3fd77903626
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Jun 14 12:18:02 2013 +0200

    BUGFIX: Fixed incorrect handling of logscale case in the datahandlers extractSeries methods.

commit bcb28c102b91e902a881abdec6cf29b327610235
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Jun 14 11:06:34 2013 +0200

    CLEAN: Removed old imports of sauter js files.

commit 565afa87132d521a18dc7286bd4f79c6a1b743f8
Merge: 40f9f50 95a9512
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Thu Jun 13 18:07:16 2013 +0200

    Merge branch 'official-master' into sauter-custom-datahandler: This is not yet functional, Dygraphs.seriesToPoints, and DygraphsLayout.evaluteLineCharts must still be refactored.

    Conflicts:
    	dygraph-layout.js
    	dygraph.js

commit 40f9f50c2d2f1af65bb2ece54311d424d54a3afa
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon Jun 3 09:44:29 2013 +0200

    REFACTORING: Removed benchmark tests since they are now integrated into the dygraphs-perf project.

commit 12940792fa7999da6910947cb7d0f407dd8ad81f
Merge: c24f3f3 8cf57f1
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon Jun 3 09:41:16 2013 +0200

    Merge remote-tracking branch 'official/master' into sauter-custom-datahandler

commit c24f3f3832a906d9c0c5a61173a94e26150b188b
Author: eberldav <eberldav@ch.sauter-bc.com>
Date:   Thu May 30 17:10:57 2013 +0200

    REFACTORING: Fixed lint issues and broken test as well as some code style for the pull.

commit ea03a641f42d42d54842111e5f337c39ea3156ef
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Thu May 30 16:51:42 2013 +0200

    CLEANUP: Removed sauter specific data handlers and the not 100% finished Bugfix for the y extremes date window issue so that this can be pulled.

commit 3782b55d0f66a600fe863ba3cb2a6c1588839525
Author: eberldav <eberldav@ch.sauter-bc.com>
Date:   Thu May 16 13:51:09 2013 +0200

    BUGFIX: Deleted falsely added comma

commit 803715042a4ba225097411be78f89f0c46df9236
Author: eberldav <eberldav@ch.sauter-bc.com>
Date:   Thu May 16 13:47:58 2013 +0200

    OPTIMIZATION: Replaced DataHandler onPointCreated callback with
    onLineEvaluted passing all created points for one series instead of
    calling the other method for each created point. Also added some bug
    fixes to the yextemes method.

commit 97efdf6a4d01c8e888c614025a55252c0a55fa8d
Author: eberldav <eberldav@ch.sauter-bc.com>
Date:   Wed May 15 11:26:17 2013 +0200

    FEATURE: Made the onPointCreated callback optional for better
    performance

commit 0b7892c335ab4309325efecaff95f7d6d8368848
Merge: c15adff 1bffeb9
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Wed May 15 11:02:46 2013 +0200

    Merge branch 'sauter-custom-datahandler' of https://github.com/sauter-hq/dygraphs into sauter-custom-datahandler

commit 1bffeb9e60da0d1123cca874ca00cd86d53dfb2d
Author: eberldav <eberldav@ch.sauter-bc.com>
Date:   Wed May 15 11:01:00 2013 +0200

    REFACTORING: Removed unneseccary fractions check in default data
    handler.

commit c15adff4d2f857b84dfc231e0c19c5616c48d95f
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Wed May 15 10:58:05 2013 +0200

    FEATURE: Removed copying the rolled series in the gather data method since the previous bug is fixed with the new data handler concept

commit 7c9d9f243a6b3149c495e1194baeaee1c6e1f479
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon May 13 14:56:22 2013 +0200

    BUGFIX: Fixed wrong call of DataHandlers

commit 88f7311197bc5896a693a37aa52997c4be700454
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon May 13 13:48:24 2013 +0200

    Added data handler to the generate combined and jsTestDriver imports.

commit 4eb44304546ae705e41cc90f7f6f027846d33968
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon May 13 11:18:36 2013 +0200

    BUGFIX: fixed wrong value comparison for data pruning.

commit c21c7f09bd545f6ad2a99e87d9f1584ceafd4c3e
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon May 13 11:06:04 2013 +0200

    BUGFIX: Fixed not complete adaption of pruning.

commit f5fcd68c8fad65ac7008972dfe8ed1b92868b5d2
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon May 13 10:51:32 2013 +0200

    REFACTORING: Adapted samples pruning to the unified data format.

commit 34bf8984e75437f4e0f59f5f1f18cd041308d4b4
Merge: 925e74a b839102
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Mon May 13 10:42:55 2013 +0200

    Merge branch 'official-master' into sauter-custom-datahandler

    Conflicts:
    	auto_tests/misc/local.html

commit 925e74a6116c988060f83a78d34a4a60853a01e4
Merge: f9c4250 9f890c2
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri May 3 16:07:07 2013 +0200

    Merge commit '9f890c23ad80924d0a30f3a14f8680b7c2d6318e' into sauter-custom-datahandler

commit f9c4250752b8a1d71aa8a37b69ca8a2bef42cd98
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Thu Apr 25 16:42:34 2013 +0200

    TEST: Added benchmark test allowing for different dygaphs benchmarks. They are currently deactivated because they take quite a while to run.

commit e6de1648346eaec0f253ef73836bf5c0e24a347f
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Thu Apr 25 14:29:59 2013 +0200

    TEST: Adapted tests to conform to the new format and wrote new tests for the rolling options.

commit 8e8161efa9d79ef237a067f52f346dd1e36254ac
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Thu Apr 25 14:29:03 2013 +0200

    FEATURE: Adapted DataHandler proposal to implement a unified data format.

commit 5667ec0d745ec446f29a444246a9c0c4555cbc53
Merge: 1049bc4 de25451
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Thu Apr 25 09:19:40 2013 +0200

    Merge commit 'de2545148870a1bdb0957c4c42e80bdb8ce1656d' into sauter-custom-datahandler

commit 1049bc479f0245f35453110f74eb03fd5919a642
Merge: 531fd88 d88dec8
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Tue Apr 23 18:17:37 2013 +0200

    Merge commit 'd88dec82afd6b902ffa56339d4afbf3277ad5ba3' into sauter-custom-datahandler

commit 531fd88e2fcae671f59e62b771df54310db1085d
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Apr 19 16:15:59 2013 +0200

    FEATURE: removed dygraphs-layout.evaluteWithErrors and added its content to the datahandler-bars.

commit 5235abea1f1f77668c15e6f1c44be185f00fe5e2
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Apr 19 16:06:36 2013 +0200

    REFACTORING: Reordered the datahandler methods to fit the calling order

commit e8c157be072cb3b1bc58e105311e3354555b5ea0
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Apr 19 15:47:19 2013 +0200

    DOC: Added documentation and minor fixes to the datahandler

commit 58c69c1e5defe57d92b19cfbbf8ab49b8acba163
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Apr 19 15:36:32 2013 +0200

    REFACTORING: Minor enhancments in extremes computation

commit 3ab152656a0f46239b13bac5aa854381965c907f
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Apr 19 13:42:31 2013 +0200

    BUGFIX: Fixed bug still using the customData option in dygraph-layout.

commit 4bea6089553269046e80c18b6bd9a77beff3ed92
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Apr 19 12:24:29 2013 +0200

    BUGFIX: Removed wrong code in bars datahandler callback

commit 442151876269da341a3932750a7e11a52e594d0f
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Apr 19 11:43:57 2013 +0200

    TESTS: Adapted tests to fit the new dataHandler integration

commit ce7550aaf00a2cafbdc1be3abc4f12dc7ea3a687
Author: David Eberlein <david.eberlein@ch.sauter-bc.com>
Date:   Fri Apr 19 11:42:52 2013 +0200

    FEATURE: Integrated the dataHandler model into dygraphs.

commit e13eb4e4ea0514e62cba89975ed6b8aadebfad0e
Author: eichsjul <julian.eichstaedt@ch.sauter-bc.com>
Date:   Thu Apr 18 15:38:36 2013 +0200

    BUGFIX: Moved extremeValues method to the correct place and added the needed arguments to the call.

commit 05afa764addc217e87cf1a29ff350517207f7f65
Author: eichsjul <julian.eichstaedt@ch.sauter-bc.com>
Date:   Thu Apr 18 14:51:47 2013 +0200

    FEATURE: Added initial implementation of custom data support.
Cleanup from DataHandler change.

Highlights:
- Move from the string-based DataHandler registration system to plain
  old JS symbols. This gets us some extra sanity checking from the
  JS interpretor and linter.
- Standardize module pattern and indentation across datahandler/*.js.
- Document dataHandler option.
Merge branch 'release-1.0.1'
remove the (very) old DateGraph symbol
Merge branch 'release-1.0.1'
Merge branch 'release-1.0.1'
Merge branch 'release-1.0.1'
small updates to release.sh script
suggest merge command in release.sh
Add per-series 'color' option.
Whoops, bad documentation for the new color option.
Whoops, remove now-invalid code in setColors_.
Merge pull request #268 from danvk/color-option

Add per-series 'color' option. Fixes issue 263
Add drawAxis option, deprecating drawXAxis and drawYAxis. Added tests for that and drawGrid.
Add jsdoc to setVisibility.
Make it easier to set breakpoints while testing CanvasAssertions.numLinesDrawn.
Add method to auto tests' proxy to clear the call list for better testing.
Make connectSeparatedPoints a per-series option. Add automated test and visual test.
Add tests for labelsKMB, labelsKMG2, sigFigs, digitsAfterDecimal and maxNumberWidth
Merge pull request #270 from danvk/issue-126

Add drawAxis option, deprecating drawXAxis and drawYAxis. Added tests for that that and drawGrid.