From 8cab446747ba45fdff44a489679262045b4a8a6f Mon Sep 17 00:00:00 2001 From: Gajus Kuizinas Date: Sun, 30 Sep 2012 11:06:00 +0000 Subject: [PATCH] Added description, license, and readme. --- LICENSE | 24 ++++++++++++++++++++++++ README.md | 0 d3.crossfilter.ay-histogram.js | 25 +++++++++++++++++++++---- 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..95f679e --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2012, Anuary (http://anuary.com/) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Anuary (http://anuary.com/) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/d3.crossfilter.ay-histogram.js b/d3.crossfilter.ay-histogram.js index cc96adc..7cf67a3 100644 --- a/d3.crossfilter.ay-histogram.js +++ b/d3.crossfilter.ay-histogram.js @@ -1,7 +1,24 @@ -/** - * param string name Unique (per-DOM) name for the graph. - * param object data {group: (crossfilter group), dimension: (crossfilter dimension)} - * param object options { (required) margin: [(int), (int)], (required for d3.linear.scale; defauls to day-length otherwise) bin_width: (int), (optional) x_axis_format: (function)} +/** + * Histogram v0.0.1 + * https://github.com/anuary/ay-histogram + * + * This function utilises d3.js (http://d3js.org/) and Crossfilter (http://square.github.com/crossfilter/) + * to create interdependent, interactive histograms. The beauty of the code comes from the flexibility of + * the input data. The crossfilter can have an arbitrary number of groups, or any size. + * + * Licensed under the BSD. + * https://github.com/anuary/ay-histogram/blob/master/LICENSE + * + * Author: Gajus Kuizinas + * + * param string name Unique name of the SVG. + * param object data {group: [crossfilter group], dimension: [crossfilter dimension]} + * param object options { + * margin: [(int) vertical, (int) horizontal], // required + * bin_width: (int), // required for d3.linear.scale; defauls to day-length otherwise. + * x_axis_format: (function) // optional. The horizontal axis tick format + * tick_width: (int) // optional. The distance between each label on the horizontal axis. + * } */ var ay_histogram = function(name, data, options) {