Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-axis

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-axis - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

build/d3-axis.js

@@ -1,2 +0,2 @@

// https://d3js.org/d3-axis/ Version 1.0.2. Copyright 2016 Mike Bostock.
// https://d3js.org/d3-axis/ Version 1.0.3. 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 1.0.2. Copyright 2016 Mike Bostock.
// https://d3js.org/d3-axis/ Version 1.0.3. 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 t.round()&&(n=Math.round(n)),function(e){return t(e)+n}}function a(){return!this.__axis}function o(t,o){function u(u){var f,_=null==l?o.ticks?o.ticks.apply(o,c):o.domain():l,v=null==s?o.tickFormat?o.tickFormat.apply(o,c):n:s,F=Math.max(g,0)+y,M=t===d||t===m?e:r,b=o.range(),z=b[0]+.5,A=b[b.length-1]+.5,V=(o.bandwidth?i:n)(o.copy()),H=u.selection?u.selection():u,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?"0.71em":"0.32em")),u!==H&&(S=S.transition(u),j=j.transition(u),O=O.transition(u),P=P.transition(u),w=w.transition(u).attr("opacity",x).attr("transform",function(t){return M(V,this.parentNode.__axis||V,t)}),N.attr("opacity",x).attr("transform",function(t){return M(this.parentNode.__axis||V,V,t)})),w.remove(),S.attr("d",t===h||t==p?"M"+B*k+","+z+"H0.5V"+A+"H"+B*k:"M"+z+","+B*k+"V0.5H"+A+"V"+B*k),j.attr("opacity",1).attr("transform",function(t){return M(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 c=[],l=null,s=null,g=6,k=6,y=3;return u.scale=function(t){return arguments.length?(o=t,u):o},u.ticks=function(){return c=f.call(arguments),u},u.tickArguments=function(t){return arguments.length?(c=null==t?[]:f.call(t),u):c.slice()},u.tickValues=function(t){return arguments.length?(l=null==t?null:f.call(t),u):l&&l.slice()},u.tickFormat=function(t){return arguments.length?(s=t,u):s},u.tickSize=function(t){return arguments.length?(g=k=+t,u):g},u.tickSizeInner=function(t){return arguments.length?(g=+t,u):g},u.tickSizeOuter=function(t){return arguments.length?(k=+t,u):k},u.tickPadding=function(t){return arguments.length?(y=+t,u):y},u}function u(t){return o(d,t)}function c(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=u,t.axisRight=c,t.axisBottom=l,t.axisLeft=s,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "d3-axis",
"version": "1.0.2",
"version": "1.0.3",
"description": "Displays automatic reference lines for scales.",

@@ -19,2 +19,3 @@ "keywords": [

"main": "build/d3-axis.js",
"module": "index",
"jsnext:main": "index",

@@ -21,0 +22,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc