D3 库所提供的所有 API 都在 d3 命名空间下。d3 库使用语义版本命名法(semantic versioning)。 你可以用 d3.version 查看当前的版本信息。
			d3 (核心部分)
			选择集
				过渡效果
			- 			d3.transition - 开始一个动画过渡。简单教程
 		- 			transition.delay - 指定每个元素过渡的延迟时间(单位:毫秒ms)。
 		- 			transition.duration - 指定每个元素过渡的持续时间(单位:毫秒ms)。
 		- 			transition.ease - 指定过渡的缓冲函数。
 		- 			transition.attr - 平滑过渡到新的attr属性值(起始属性值为当前属性)。
 		- 			transition.attrTween - 在不同attr属性值之间平滑过渡(起始属性值可在过渡函数中设置,甚至整个过渡函数都可以自定义)。
 		- 			transition.style - 平滑过渡到新的style属性值。
 		- 			transition.styleTween - 在不同style属性值之间平滑过渡。
 		- 			transition.text - 在过渡开始时设置文本内容。
 		- 			transition.tween - 使某个属性过渡到一个新的属性值,该属性可以是非attr或非style属性,比如text。
 		- 			transition.select - 选择每个当前元素的某个子元素进行过渡。
 		- 			transition.selectAll - 选择每个当前元素的多个子元素进行过渡。
 		- 			transition.filter - 通过数据筛选出当前元素中的部分元素进行过渡。
 		- 			transition.transition - 当前过渡结束后开始新的过渡。
 		- 			transition.remove - 过渡结束后移除当前元素。
 		- 			transition.empty - 如果过渡为空就返回true。如果当前元素中没有非null元素,则此过渡为空。
 		- 			transition.node - 返回过渡中的第一个元素。
 		- 			transition.size - 返回过渡中当前元素的数量。
 		- 			transition.each - 遍历每个元素执行操作。不指定触发类型时,立即执行操作。当指定触发类型为'start'或'end'时,会在过渡开始或结束时执行操作。
 		- 			transition.call - 以当前过渡为this执行某个函数。
 		- 			d3.ease - 定制过渡的缓冲函数。
 		- 			ease - 缓冲函数。缓冲函数可让动画效果更自然,比如elastic缓冲函数可用以模拟弹性物体的运动。是一种插值函数的特例。
 		- 			d3.timer - 开始一个定制的动画计时。功能类似于setTimeout,但内部用requestAnimationFrame实现,更高效。
 		- 			d3.timer.flush - 立刻执行当前没有延迟的计时。可用于处理闪屏问题。
 		- 			d3.interpolate - 生成一个插值函数,在两个参数间插值。差值函数的类型会根据输入参数的类型(数字、字符串、颜色等)而自动选择。
 		- 			interpolate - 插值函数。输入参数在[0, 1]之间。
 		- 			d3.interpolateNumber - 在两个数字间插值。
 		- 			d3.interpolateRound - 在两个数字间插值,返回值会四舍五入取整。
 		- 			d3.interpolateString - 在两个字符串间插值。解析字符串中的数字,对应的数字会插值。
 		- 			d3.interpolateRgb - 在两个RGB颜色间插值。
 		- 			d3.interpolateHsl - 在两个HSL颜色间插值。
 		- 			d3.interpolateLab - 在两个L*a*b*颜色间插值。
 		- 			d3.interpolateHcl - 在两个HCL颜色间插值。
 		- 			d3.interpolateArray - 在两个数列间插值。d3.interpolateArray( [0, 1], [1, 10, 100] )(0.5); // returns [0.5, 5.5, 100]
 		- 			d3.interpolateObject - 在两个object间插值。d3.interpolateArray( {x: 0, y: 1}, {x: 1, y: 10, z: 100} )(0.5); // returns {x: 0.5, y: 5.5, z: 100}
 		- 			d3.interpolateTransform - 在两个2D仿射变换间插值。
 		- 			d3.interpolateZoom - 在两个点之间平滑地缩放平移。示例
 		- 			d3.interpolators - 添加一个自定义的插值函数.
 	
			数据操作(Working with Arrays)
			- 			d3.ascending - 升序排序函数.
 		- 			d3.descending - 降序排序函数.
 		- 			d3.min - 获取数组中的最小值.
 		- 			d3.max - 获取数组中的最大值.
 		- 			d3.extent - 获取数组的范围(最小值和最大值).
 		- 			d3.sum - 获取数组中数字之和.
 		- 			d3.mean -获取数组中数字的算术平均值.
 		- 			d3.median - 获取数组中数字的中位数 (相当于 0.5-quantile的值).
 		- 			d3.quantile - 获取排好序的数组的一个分位数(quantile).
 		- 			d3.bisect - 通过二分法获取某个数在排好序的数组中的插入位置(同d3.bisectRight).
 		- 			d3.bisectRight - 获取某个数在排好序的数组中的插入位置(相等的值归入右边).
 		- 			d3.bisectLeft - 获取某个数在排好序的数组中的插入位置(相等的值归入左边).
 		- 			d3.bisector - 自定义一个二分函数.
 		- 			d3.shuffle - 洗牌,随机排列数组中的元素.
 		- 			d3.permute - 以指定顺序排列数组中的元素.
 		- 			d3.zip - 将多个数组合并成一个数组的数组,新数组的的第i个元素是原来各个数组中第i个元素组成的数组.
 		- 			d3.transpose - 矩阵转置,通过d3.zip实现.
 		- 			d3.pairs - 返回临近元素对的数组,d3.pairs([1, 2, 3, 4]); // returns [ [1, 2], [2, 3], [3, 4] ].
 		- 			d3.keys - 返回关联数组(哈希表、json、object对象)的key组成的数组.
 		- 			d3.values - 返回关联数组的value组成的数组.
 		- 			d3.entries - 返回关联数组的key-value实体组成的数组, d3.entries({ foo: 42 }); // returns [{key: "foo", value: 42}].
 		- 			d3.merge - 将多个数组连成一个,类似于原生方法concat. d3.merge([ [1], [2, 3] ]); // returns [1, 2, 3].
 		- 			d3.range - 获得一个数列. d3.range([start, ]stop[, step])
 		- 			d3.nest - 获得一个nest对象,将数组组织成层级结构. 示例:http://bl.ocks.org/phoebebright/raw/3176159/
 		- 			nest.key - 为nest层级结构增加一个层级.
 		- 			nest.sortKeys - 将当前的nest层级结构按key排序.
 		- 			nest.sortValues - 将叶nest层级按value排序.
 		- 			nest.rollup - 设置修改叶节点值的函数.
 		- 			nest.map - 执行nest操作, 返回一个关联数组(json).
 		- 			nest.entries - 执行nest操作, 返回一个key-value数组. 如果nest.map返回的结果类似于{ foo: 42 }, 则nest.entries返回的结果类似于[{key: "foo", value: 42}].
 		- 			d3.map - 将javascript的object转化为hash,屏蔽了object的原型链功能导致的与hash不一致的问题。
 		- 			map.has - map有某个key就返回true.
 		- 			map.get - 返回map中某个key对应的value.
 		- 			map.set - 设置map中某个key对应的value.
 		- 			map.remove - 删除map中的某个key.
 		- 			map.keys - 返回map中所有key组成的数组.
 		- 			map.values - 返回map中所有value组成的数组.
 		- 			map.entries - 返回map中所有entry(key-value键值对)组成的数组.类似于{ foo: 42 }转化成[{key: "foo", value: 42}]
 		- 			map.forEach - 对map中每一个entry执行某个函数.
 		- 			d3.set - 将javascript的array转化为set,屏蔽了array的object原型链功能导致的与set不一致的问题。set中的value是array中每个值转换成字符串的结果。set中的value是去重过的。
 		- 			set.has - 返回set中是否含有某个value.
 		- 			set.add - 添加某个value.
 		- 			set.remove - 删除某个value.
 		- 			set.values - 返回set中的值组成的数组.set中的value是去重过的.
 		- 			set.forEach - 对set中每一个value执行某个函数.
 	
			Math
				载入外部资源(Loading External Resources)
				字符串格式化(String Formatting)
			- 			d3.format - 将数字转化成指定格式的字符串。转化的格式非常丰富,且非常智能。
 		- 			d3.formatPrefix - 以指定的值和精度获得一个[SI prefix]对象。这个函数可用来自动判断数据的量级, 如K(千),M(百万)等等。示例: var prefix = d3.formatPrefix(1.21e9); console.log(prefix.symbol); // “G”; console.log(prefix.scale(1.21e9)); // 1.21
 		- 			d3.requote - 将字符串转义成可在正则表达式中使用的格式。如 d3.requote(‘$'); // return “/$”
 		- 			d3.round - 设置某个数按小数点后多少位取整。与toFixed()类似,但返回格式为number。 如 d3.round(1.23); // return 1; d3.round(1.23, 1); // return 1.2; d3.round(1.25, 1); // return 1.3
 	
			CSV 格式化 (d3.csv)
			- 			d3.csv - 获取一个CSV (comma-separated values, 冒号分隔值)文件。
 		- 			d3.csv.parse - 将CSV文件字符串转化成object的数组,object的key由第一行决定。如: [{"Year": "1997", "Length": "2.34"}, {"Year": "2000", "Length": "2.38"}]
 		- 			d3.csv.parseRows - 将CSV文件字符串转化成数组的数组。如: [ ["Year", "Length"],["1997", "2.34"],["2000", "2.38"] ]
 		- 			d3.csv.format - 将object的数组转化成CSV文件字符串,是d3.csv.parse的逆操作。
 		- 			d3.csv.formatRows - 将数组的数组转化成CSV文件字符串,是d3.csv.parseRows的逆操作。
 		- 			d3.tsv - 获取一个TSV (tab-separated values, tab分隔值)文件。
 		- 			d3.tsv.parse - 类似于d3.csv.parse。
 		- 			d3.tsv.parseRows - 类似于d3.csv.parseRows。
 		- 			d3.tsv.format - 类似于d3.csv.format。
 		- 			d3.tsv.formatRows - 类似于d3.csv.formatRows。
 		- 			d3.dsv - 创建一个类似于d3.csv的文件处理对象,可以自定义分隔符和mime type。如:var dsv = d3.dsv(“|”, “text/plain”);
 	
			颜色
				命名空间
				内部方法(Internals)
				d3.scale(Scales)
			定量变换(Quantitative)
			- 			d3.scale.linear - 创建一个线性定量变换。(建议参考源码以深入理解各种变换。)
 		- 			linear - 输入一个定义域的值,返回一个值域的值。
 		- 			linear.invert - 反变换,输入值域值返回定义域值。
 		- 			linear.domain - get或set定义域。
 		- 			linear.range - get或set值域。
 		- 			linear.rangeRound - 设置值域,并对结果取整。
 		- 			linear.interpolate - get或set变换的插值函数,如将默认的线性插值函数替换成取整的线性插值函数d3_interpolateRound。
 		- 			linear.clamp - 设置值域是否闭合,默认不闭合。当值域闭合时,如果插值结果在值域之外,会取值域的边界值。如值域为[1, 2],插值函数的计算结果为3,如果不闭合,最终结果为3;如果闭合,最终结果为2。
 		- 			linear.nice - 扩展定义域范围使定义域更规整。如[0.20147987687960267, 0.996679553296417] 变成 [0.2, 1]。
 		- 			linear.ticks - 从定义域中取出有代表性的值。通常用于坐标轴刻度的选取。
 		- 			linear.tickFormat - 获取格式转化函数,通常用于坐标轴刻度的格式转化。如:var x = d3.scale.linear().domain([-1, 1]); console.log(x.ticks(5).map(x.tickFormat(5, “+%”))); // ["-100%", "-50%", "+0%", "+50%", "+100%"]
 		- 			linear.copy - 从已有的变换中复制出一个变换。
 		- 			d3.scale.sqrt - 创建一个求平方根的定量转换。
 		- 			d3.scale.pow - 创建一个指数变换。(可参考linear对应函数的注释)
 		- 			pow - 输入一个定义域的值,返回一个值域的值。
 		- 			pow.invert - 反变换,输入值域值返回定义域值。
 		- 			pow.domain - get或set定义域。
 		- 			pow.range - get或set值域。
 		- 			pow.rangeRound - 设置值域,并对结果取整。
 		- 			pow.interpolate - get或set变换的插值函数。
 		- 			pow.clamp - 设置值域是否闭合,默认不闭合。
 		- 			pow.nice - 扩展定义域范围使定义域更规整。
 		- 			pow.ticks - 从定义域中取出有代表性的值。通常用于坐标轴刻度的选取。
 		- 			pow.tickFormat - 获取格式转化函数,通常用于坐标轴刻度的格式转化。
 		- 			pow.exponent - get或set指数的幂次。默认为1次幂。
 		- 			pow.copy - 从已有的变换中复制出一个变换。
 		- 			d3.scale.log - 创建一个对数变换。(可参考linear对应函数的注释)
 		- 			log - 输入一个定义域的值,返回一个值域的值。
 		- 			log.invert - 反变换,输入值域值返回定义域值。
 		- 			log.domain - get或set定义域。
 		- 			log.range - get或set值域。
 		- 			log.rangeRound - 设置值域,并对结果取整。
 		- 			log.interpolate - get或set变换的插值函数。
 		- 			log.clamp - 设置值域是否闭合,默认不闭合。
 		- 			log.nice - 扩展定义域范围使定义域更规整。
 		- 			log.ticks - 从定义域中取出有代表性的值。通常用于坐标轴刻度的选取。
 		- 			log.tickFormat - 获取格式转化函数,通常用于坐标轴刻度的格式转化。
 		- 			log.copy - 从已有的变换中复制出一个变换。
 		- 			d3.scale.quantize - 创建一个quantize线性变换,定义域为一个数值区间,值域为几个离散值。
 		- 			quantize - 输入数值,返回离散值。如: var q = d3.scale.quantize().domain([0, 1]).range(['a', 'b', 'c']); //q(0.3) === ‘a', q(0.4) === ‘b', q(0.6) === ‘b', q(0.7) ==='c;
 		- 			quantize.invertExtent - 返回得到某个离散值的值域范围。 // q.invertExtent(‘a') 的结果为 [0, 0.3333333333333333]
 		- 			quantize.domain - get或set变换的定义域。
 		- 			quantize.range - get或set变换的值域。
 		- 			quantize.copy - 从已有的变换中复制出一个变换。
 		- 			d3.scale.threshold - 构建一个threshold(阈值)线性变换。定义域为分隔值数值序列,值域为离散值。它与quantize的区别是quantize指定的值域为一个区间,然后均分这个区间为多个小区间,以对应各离散值。threshold则指定各小区间的边界分隔值。示例: var t = d3.scale.threshold().domain([0, 1]).range(['a', 'b', 'c']); t(-1) === ‘a'; t(0) === ‘b'; t(0.5) === ‘b'; t(1) === ‘c'; t(1000) === ‘c'; t.invertExtent(‘a'); //returns [undefined, 0] t.invertExtent(‘b'); //returns [0, 1] t.invertExtent(‘c'); //returns [1, undefined]
 		- 			threshold - 输入数值,返回离散值。
 		- 			threshold.invertExtent - 输入离散值,返回数值。
 		- 			threshold.domain - get或set变换的定义域。
 		- 			threshold.range - get或set变换的值域。
 		- 			threshold.copy - 从已有的变换中复制出一个变换。
 		- 			d3.scale.quantile - 构建一个quantile线性变换。使用方法与quantize完全类似,区别是quantile根据中位数来分隔区间,quantize根据算数平均值来分隔区间。example
 		- 			quantile - 输入数值,返回离散值。
 		- 			quantile.invertExtent - 输入离散值,返回数值。
 		- 			quantile.domain - get或set变换的定义域。
 		- 			quantile.range - get或set变换的值域。
 		- 			quantile.quantiles - 获得quantile变换的分隔值。示例: var q = d3.scale.quantile().domain([0, 1]).range(['a', 'b', 'c']); q.quantiles() returns [0.33333333333333326, 0.6666666666666665]
 		- 			quantile.copy - 从已有的变换中复制出一个变换。
 		- 			d3.scale.identity - 构建一个identity线性变换。特殊的linear线性变换,此变换定义域和值域相同,只在一些d3内部的axis或brush模块中用到。
 		- 			identity - identity线性变换函数。返回输入值。
 		- 			identity.invert - 和identity函数相同,返回输入值。
 		- 			identity.domain - get或set变换的定义域。
 		- 			identity.range - get或set变换的值域。
 		- 			identity.ticks - 从定义域中取出有代表性的值。通常用于坐标轴刻度的选取。
 		- 			identity.tickFormat - 获取格式转化函数,通常用于坐标轴刻度的格式转化。
 		- 			identity.copy - 从已有的变换中复制出一个变换。
 	
			序数变换(Ordinal)
				d3.svg (SVG)
			Shapes
				坐标轴(Axes)
				Controls
				d3.time (Time)
			时间格式转换(Time Formatting)
				时间变换(Time Scales)
				Time Intervals
			- 			d3.time.interval - 返回一个对于本地时间时间间隔器.
 		- 			interval - 效果同interval.floor方法.
 		- 			interval.range - 返回指定区间内日期.
 		- 			interval.floor - 下舍入到最近的间隔值.
 		- 			interval.round - 上舍入或下舍入到最近的间隔值.
 		- 			interval.ceil - 上舍入到最近的间隔值.
 		- 			interval.offset - 返回指定时间间隔的日期偏移量.
 		- 			interval.utc - 返回对应的UTC时间间隔.
 		- 			d3.time.day - 返回指定时间基于天起始的时间(默认起始是12:00am).
 		- 			d3.time.days - 返回指定时间区间和间隔条件的基于天的所有时间,效果同day.range.
 		- 			d3.time.dayOfYear - 计算指定时间在年中的天数.
 		- 			d3.time.hour - 返回指定时间基于小时起始的时间(e.g., 1:00 AM).
 		- 			d3.time.hours - 返回指定时间区间和间隔条件的基于小时的所有时间, 效果同hour.range.
 		- 			d3.time.minute - 返回指定时间基于分钟起始的时间 (e.g., 1:02 AM).
 		- 			d3.time.minutes - 返回指定时间区间和间隔条件的基于分钟的所有时间,效果同minute.range.
 		- 			d3.time.month - 返回指定时间基于月起始的时间(e.g., February 1, 12:00 AM).
 		- 			d3.time.months - 返回指定时间区间和间隔条件的基于月的所有时间,效果同month.range.
 		- 			d3.time.second - 返回指定时间基于秒起始的时间(e.g., 1:02:03 AM).
 		- 			d3.time.seconds - 返回指定时间区间和间隔条件的基于秒的所有时间,效果同second.range.
 		- 			d3.time.sunday - 返回指定时间基于Sunday起始的时间(e.g., February 5, 12:00 AM).
 		- 			d3.time.sundays - 返回指定时间区间和间隔条件的基于sunday的所有时间, 效果同sunday.range.
 		- 			d3.time.sundayOfYear - 计算以sunday为基点的指定时间在一年中的周数.
 		- 			d3.time.monday - every Monday (e.g., February 5, 12:00 AM).
 		- 			d3.time.mondays - alias for monday.range.
 		- 			d3.time.mondayOfYear - computes the monday-based week number.
 		- 			d3.time.tuesday - every Tuesday (e.g., February 5, 12:00 AM).
 		- 			d3.time.tuesdays - alias for tuesday.range.
 		- 			d3.time.tuesdayOfYear - computes the tuesday-based week number.
 		- 			d3.time.wednesday - every Wednesday (e.g., February 5, 12:00 AM).
 		- 			d3.time.wednesdays - alias for wednesday.range.
 		- 			d3.time.wednesdayOfYear - computes the wednesday-based week number.
 		- 			d3.time.thursday - every Thursday (e.g., February 5, 12:00 AM).
 		- 			d3.time.thursdays - alias for thursday.range.
 		- 			d3.time.thursdayOfYear - computes the thursday-based week number.
 		- 			d3.time.friday - every Friday (e.g., February 5, 12:00 AM).
 		- 			d3.time.fridays - alias for friday.range.
 		- 			d3.time.fridayOfYear - computes the friday-based week number.
 		- 			d3.time.saturday - every Saturday (e.g., February 5, 12:00 AM).
 		- 			d3.time.saturdays - alias for saturday.range.
 		- 			d3.time.saturdayOfYear - computes the saturday-based week number.
 		- 			d3.time.week - alias for sunday.
 		- 			d3.time.weeks - alias for sunday.range.
 		- 			d3.time.weekOfYear - alias for sundayOfYear.
 		- 			d3.time.year - 返回指定时间基于年起始的时间(e.g., January 1, 12:00 AM).
 		- 			d3.time.years - 返回指定时间区间和间隔条件的所有时间,效果同year.range.
 	
			构图(d3.layout)
			Bundle
			- 			d3.layout.bundle - construct a new default bundle layout.
 		- 			bundle - apply Holten's hierarchical bundling algorithm to edges.
 	
			弦图(Chord)
				集群(Cluster)
				力学(Force)
				层级布局(Hierarchy)
				直方图(Histogram)
				层包(Pack)
				分区(Partition)
				饼图(Pie)
				堆叠图(Stack)
				树(Tree)
				矩阵树(Treemap)
				d3.geo (Geography)
			Paths
				Projections
				Streams
				d3.geom (Geometry)
			Voronoi
			- 			d3.geom.voronoi - create a Voronoi layout with default accessors.
 		- 			voronoi - compute the Voronoi tessellation for the specified points.
 		- 			voronoi.x - get or set the x-coordinate accessor for each point.
 		- 			voronoi.y - get or set the y-coordinate accessor for each point.
 		- 			voronoi.clipExent - get or set the clip extent for the tesselation.
 		- 			voronoi.links - compute the Delaunay mesh as a network of links.
 		- 			voronoi.triangles - compute the Delaunay mesh as a triangular tessellation.
 	
			Quadtree
				Polygon
				Hull
			- 			d3.geom.hull - create a convex hull layout with default accessors.
 		- 			hull - compute the convex hull for the given array of points.
 		- 			hull.x - get or set the x-coordinate accessor.
 		- 			hull.y - get or set the y-coordinate accessor.
 	
			d3.behavior (Behaviors)
			Drag
				缩放 Zoom
			- 			d3.behavior.zoom - 创建一个缩放行为.
 		- 			zoom - 对指定元素应用缩放.
 		- 			zoom.scale - the current scale factor.
 		- 			zoom.translate - the current translate offset.
 		- 			zoom.scaleExtent - optional limits on the scale factor.
 		- 			zoom.center - an optional focal point for mousewheel zooming.
 		- 			zoom.size - the dimensions of the viewport.
 		- 			zoom.x - an optional scale whose domain is bound to the x extent of the viewport.
 		- 			zoom.y - an optional scale whose domain is bound to the y extent of the viewport.
 		- 			zoom.on - listeners for when the scale or translate changes.
 		- 			zoom.event - dispatch zoom events after setting the scale or translate.