Comparing version 0.4.1 to 1.0.0
@@ -1,2 +0,2 @@ | ||
// https://d3js.org/d3-axis/ Version 0.4.1. Copyright 2016 Mike Bostock. | ||
// https://d3js.org/d3-axis/ Version 1.0.0. Copyright 2016 Mike Bostock. | ||
(function (global, factory) { | ||
@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
@@ -1,2 +0,2 @@ | ||
// https://d3js.org/d3-axis/ Version 0.4.1. Copyright 2016 Mike Bostock. | ||
// https://d3js.org/d3-axis/ Version 1.0.0. Copyright 2016 Mike Bostock. | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t){return t}function e(t,n,e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}function r(t,n,e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}function i(t){var n=t.bandwidth()/2;return function(e){return t(e)+n}}function a(){return!this.__axis}function o(t,o){function c(c){var f,_=null==l?o.ticks?o.ticks.apply(o,u):o.domain():l,v=null==s?o.tickFormat?o.tickFormat.apply(o,u):n:s,F=Math.max(g,0)+y,b=t===d||t===m?e:r,z=o.range(),A=z[0]+.5,M=z[z.length-1]+.5,V=(o.bandwidth?i:n)(o.copy()),H=c.selection?c.selection():c,S=H.selectAll(".domain").data([null]),j=H.selectAll(".tick").data(_,o).order(),w=j.exit(),N=j.enter().append("g").attr("class","tick"),O=j.select("line"),P=j.select("text"),B=t===d||t===h?-1:1,I=t===h||t===p?(f="x","y"):(f="y","x");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),j=j.merge(N),O=O.merge(N.append("line").attr("stroke","#000").attr(f+"2",B*g).attr(I+"1",.5).attr(I+"2",.5)),P=P.merge(N.append("text").attr("fill","#000").attr(f,B*F).attr(I,.5).attr("dy",t===d?"0em":t===m?".71em":".32em")),c!==H&&(S=S.transition(c),j=j.transition(c),O=O.transition(c),P=P.transition(c),w=w.transition(c).attr("opacity",x).attr("transform",function(t){return b(V,this.parentNode.__axis||V,t)}),N.attr("opacity",x).attr("transform",function(t){return b(this.parentNode.__axis||V,V,t)})),w.remove(),S.attr("d",t===h||t==p?"M"+B*k+","+A+"H0.5V"+M+"H"+B*k:"M"+A+","+B*k+"V0.5H"+M+"V"+B*k),j.attr("opacity",1).attr("transform",function(t){return b(V,V,t)}),O.attr(f+"2",B*g),P.attr(f,B*F).text(v),H.filter(a).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===p?"start":t===h?"end":"middle"),H.each(function(){this.__axis=V})}var u=[],l=null,s=null,g=6,k=6,y=3;return c.scale=function(t){return arguments.length?(o=t,c):o},c.ticks=function(){return u=f.call(arguments),c},c.tickArguments=function(t){return arguments.length?(u=null==t?[]:f.call(t),c):u.slice()},c.tickValues=function(t){return arguments.length?(l=null==t?null:f.call(t),c):l&&l.slice()},c.tickFormat=function(t){return arguments.length?(s=t,c):s},c.tickSize=function(t){return arguments.length?(g=k=+t,c):g},c.tickSizeInner=function(t){return arguments.length?(g=+t,c):g},c.tickSizeOuter=function(t){return arguments.length?(k=+t,c):k},c.tickPadding=function(t){return arguments.length?(y=+t,c):y},c}function c(t){return o(d,t)}function u(t){return o(p,t)}function l(t){return o(m,t)}function s(t){return o(h,t)}var f=Array.prototype.slice,d=1,p=2,m=3,h=4,x=1e-6;t.axisTop=c,t.axisRight=u,t.axisBottom=l,t.axisLeft=s,Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "d3-axis", | ||
"version": "0.4.1", | ||
"version": "1.0.0", | ||
"description": "Displays automatic reference lines for scales.", | ||
"keywords": [ | ||
"d3", | ||
"d3-module", | ||
"axis", | ||
@@ -27,9 +28,9 @@ "scale", | ||
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-axis.js -c -m -o build/d3-axis.min.js", | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-axis.js ../d3.github.com/d3-axis.v0.4.js && cp build/d3-axis.min.js ../d3.github.com/d3-axis.v0.4.min.js && cd ../d3.github.com && git add d3-axis.v0.4.js d3-axis.v0.4.min.js && git commit -m \"d3-axis ${VERSION}\" && git push && cd - && zip -j build/d3-axis.zip -- LICENSE README.md build/d3-axis.js build/d3-axis.min.js" | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-axis.js ../d3.github.com/d3-axis.v1.js && cp build/d3-axis.min.js ../d3.github.com/d3-axis.v1.min.js && cd ../d3.github.com && git add d3-axis.v1.js d3-axis.v1.min.js && git commit -m \"d3-axis ${VERSION}\" && git push && cd - && zip -j build/d3-axis.zip -- LICENSE README.md build/d3-axis.js build/d3-axis.min.js" | ||
}, | ||
"devDependencies": { | ||
"d3-scale": "~0.9.0", | ||
"d3-scale": "1", | ||
"eslint": "2", | ||
"package-preamble": "0.0", | ||
"rollup": "0.27", | ||
"rollup": "0.33", | ||
"tape": "4", | ||
@@ -36,0 +37,0 @@ "uglify-js": "2" |
@@ -7,6 +7,6 @@ # d3-axis | ||
If you use NPM, `npm install d3-axis`. Otherwise, download the [latest release](https://github.com/d3/d3-axis/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-axis.v0.4.min.js) or as part of [D3 4.0](https://github.com/d3/d3). (To be useful, you’ll also want to use [d3-scale](https://github.com/d3/d3-scale) and [d3-selection](https://github.com/d3/d3-selection), but these are soft dependencies.) AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_axis` global is exported: | ||
If you use NPM, `npm install d3-axis`. Otherwise, download the [latest release](https://github.com/d3/d3-axis/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-axis.v1.min.js) or as part of [D3 4.0](https://github.com/d3/d3). (To be useful, you’ll also want to use [d3-scale](https://github.com/d3/d3-scale) and [d3-selection](https://github.com/d3/d3-selection), but these are soft dependencies.) AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_axis` global is exported: | ||
```html | ||
<script src="https://d3js.org/d3-axis.v0.4.min.js"></script> | ||
<script src="https://d3js.org/d3-axis.v1.min.js"></script> | ||
<script> | ||
@@ -13,0 +13,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0