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.9 to 1.0.10

4

.eslintrc.json

@@ -8,3 +8,5 @@ {

"env": {
"es6": true
"es6": true,
"node": true,
"browser": true
},

@@ -11,0 +13,0 @@ "rules": {

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

// https://d3js.org/d3-axis/ Version 1.0.9 Copyright 2018 Mike Bostock.
// https://d3js.org/d3-axis/ Version 1.0.10 Copyright 2018 Mike Bostock.
(function (global, factory) {

@@ -107,4 +107,4 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

.attr("d", orient === left || orient == right
? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter
: "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter);
? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1)
: (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1));

@@ -111,0 +111,0 @@ tick

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

// https://d3js.org/d3-axis/ Version 1.0.9 Copyright 2018 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";var n=Array.prototype.slice;function r(t){return t}var e=1,i=2,a=3,o=4,u=1e-6;function c(t){return"translate("+(t+.5)+",0)"}function l(t){return"translate(0,"+(t+.5)+")"}function s(){return!this.__axis}function f(t,f){var d=[],m=null,p=null,h=6,g=6,x=3,k=t===e||t===o?-1:1,y=t===o||t===i?"x":"y",v=t===e||t===a?c:l;function _(n){var c=null==m?f.ticks?f.ticks.apply(f,d):f.domain():m,l=null==p?f.tickFormat?f.tickFormat.apply(f,d):r:p,_=Math.max(h,0)+x,M=f.range(),b=+M[0]+.5,A=+M[M.length-1]+.5,F=(f.bandwidth?function(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(r){return+t(r)+n}}:function(t){return function(n){return+t(n)}})(f.copy()),z=n.selection?n.selection():n,V=z.selectAll(".domain").data([null]),C=z.selectAll(".tick").data(c,f).order(),H=C.exit(),S=C.enter().append("g").attr("class","tick"),j=C.select("line"),w=C.select("text");V=V.merge(V.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(S),j=j.merge(S.append("line").attr("stroke","currentColor").attr(y+"2",k*h)),w=w.merge(S.append("text").attr("fill","currentColor").attr(y,k*_).attr("dy",t===e?"0em":t===a?"0.71em":"0.32em")),n!==z&&(V=V.transition(n),C=C.transition(n),j=j.transition(n),w=w.transition(n),H=H.transition(n).attr("opacity",u).attr("transform",function(t){return isFinite(t=F(t))?v(t):this.getAttribute("transform")}),S.attr("opacity",u).attr("transform",function(t){var n=this.parentNode.__axis;return v(n&&isFinite(n=n(t))?n:F(t))})),H.remove(),V.attr("d",t===o||t==i?"M"+k*g+","+b+"H0.5V"+A+"H"+k*g:"M"+b+","+k*g+"V0.5H"+A+"V"+k*g),C.attr("opacity",1).attr("transform",function(t){return v(F(t))}),j.attr(y+"2",k*h),w.attr(y,k*_).text(l),z.filter(s).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===i?"start":t===o?"end":"middle"),z.each(function(){this.__axis=F})}return _.scale=function(t){return arguments.length?(f=t,_):f},_.ticks=function(){return d=n.call(arguments),_},_.tickArguments=function(t){return arguments.length?(d=null==t?[]:n.call(t),_):d.slice()},_.tickValues=function(t){return arguments.length?(m=null==t?null:n.call(t),_):m&&m.slice()},_.tickFormat=function(t){return arguments.length?(p=t,_):p},_.tickSize=function(t){return arguments.length?(h=g=+t,_):h},_.tickSizeInner=function(t){return arguments.length?(h=+t,_):h},_.tickSizeOuter=function(t){return arguments.length?(g=+t,_):g},_.tickPadding=function(t){return arguments.length?(x=+t,_):x},_}t.axisTop=function(t){return f(e,t)},t.axisRight=function(t){return f(i,t)},t.axisBottom=function(t){return f(a,t)},t.axisLeft=function(t){return f(o,t)},Object.defineProperty(t,"__esModule",{value:!0})});
// https://d3js.org/d3-axis/ Version 1.0.10 Copyright 2018 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";var n=Array.prototype.slice;function r(t){return t}var e=1,i=2,a=3,o=4,u=1e-6;function c(t){return"translate("+(t+.5)+",0)"}function l(t){return"translate(0,"+(t+.5)+")"}function s(){return!this.__axis}function f(t,f){var d=[],m=null,p=null,h=6,g=6,x=3,k=t===e||t===o?-1:1,y=t===o||t===i?"x":"y",v=t===e||t===a?c:l;function M(n){var c=null==m?f.ticks?f.ticks.apply(f,d):f.domain():m,l=null==p?f.tickFormat?f.tickFormat.apply(f,d):r:p,M=Math.max(h,0)+x,_=f.range(),b=+_[0]+.5,A=+_[_.length-1]+.5,F=(f.bandwidth?function(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(r){return+t(r)+n}}:function(t){return function(n){return+t(n)}})(f.copy()),V=n.selection?n.selection():n,z=V.selectAll(".domain").data([null]),H=V.selectAll(".tick").data(c,f).order(),C=H.exit(),S=H.enter().append("g").attr("class","tick"),j=H.select("line"),w=H.select("text");z=z.merge(z.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(S),j=j.merge(S.append("line").attr("stroke","currentColor").attr(y+"2",k*h)),w=w.merge(S.append("text").attr("fill","currentColor").attr(y,k*M).attr("dy",t===e?"0em":t===a?"0.71em":"0.32em")),n!==V&&(z=z.transition(n),H=H.transition(n),j=j.transition(n),w=w.transition(n),C=C.transition(n).attr("opacity",u).attr("transform",function(t){return isFinite(t=F(t))?v(t):this.getAttribute("transform")}),S.attr("opacity",u).attr("transform",function(t){var n=this.parentNode.__axis;return v(n&&isFinite(n=n(t))?n:F(t))})),C.remove(),z.attr("d",t===o||t==i?g?"M"+k*g+","+b+"H0.5V"+A+"H"+k*g:"M0.5,"+b+"V"+A:g?"M"+b+","+k*g+"V0.5H"+A+"V"+k*g:"M"+b+",0.5H"+A),H.attr("opacity",1).attr("transform",function(t){return v(F(t))}),j.attr(y+"2",k*h),w.attr(y,k*M).text(l),V.filter(s).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===i?"start":t===o?"end":"middle"),V.each(function(){this.__axis=F})}return M.scale=function(t){return arguments.length?(f=t,M):f},M.ticks=function(){return d=n.call(arguments),M},M.tickArguments=function(t){return arguments.length?(d=null==t?[]:n.call(t),M):d.slice()},M.tickValues=function(t){return arguments.length?(m=null==t?null:n.call(t),M):m&&m.slice()},M.tickFormat=function(t){return arguments.length?(p=t,M):p},M.tickSize=function(t){return arguments.length?(h=g=+t,M):h},M.tickSizeInner=function(t){return arguments.length?(h=+t,M):h},M.tickSizeOuter=function(t){return arguments.length?(g=+t,M):g},M.tickPadding=function(t){return arguments.length?(x=+t,M):x},M}t.axisTop=function(t){return f(e,t)},t.axisRight=function(t){return f(i,t)},t.axisBottom=function(t){return f(a,t)},t.axisLeft=function(t){return f(o,t)},Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "d3-axis",
"version": "1.0.9",
"version": "1.0.10",
"description": "Displays automatic reference lines for scales.",

@@ -27,3 +27,3 @@ "keywords": [

"pretest": "rm -rf build && mkdir build && rollup -c",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"test": "tape 'test/**/*-test.js' && eslint index.js src test",
"prepublish": "yarn test",

@@ -38,3 +38,2 @@ "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-axis/build/d3-axis.js d3-axis.v1.js && cp ../d3-axis/build/d3-axis.min.js d3-axis.v1.min.js && git add d3-axis.v1.js d3-axis.v1.min.js && git commit -m \"d3-axis ${npm_package_version}\" && git push && cd - && zip -j build/d3-axis.zip -- LICENSE README.md build/d3-axis.js build/d3-axis.min.js"

"rollup": "0.64",
"rollup-plugin-node-resolve": "3",
"rollup-plugin-terser": "1",

@@ -41,0 +40,0 @@ "tape": "4"

@@ -1,34 +0,35 @@

import node from "rollup-plugin-node-resolve";
import {terser} from "rollup-plugin-terser";
import * as meta from "./package.json";
const copyright = `// ${meta.homepage} Version ${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}.`;
const config = {
input: "index.js",
external: Object.keys(meta.dependencies || {}),
output: {
file: `build/${meta.name}.js`,
name: "d3",
format: "umd",
extend: true,
banner: `// ${meta.homepage} Version ${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}.`,
globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).map(key => ({[key]: "d3"})))
},
plugins: []
};
export default [
config,
{
input: "index.js",
...config,
output: {
file: "build/d3-axis.js",
format: "umd",
name: "d3",
extend: true,
banner: copyright
...config.output,
file: `build/${meta.name}.min.js`
},
plugins: [
node()
...config.plugins,
terser({
output: {
preamble: config.output.banner
}
})
]
},
{
input: "index.js",
output: {
file: "build/d3-axis.min.js",
format: "umd",
name: "d3",
extend: true
},
plugins: [
node(),
terser({output: {preamble: copyright}})
]
}
];

@@ -97,4 +97,4 @@ import {slice} from "./array";

.attr("d", orient === left || orient == right
? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter
: "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter);
? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1)
: (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1));

@@ -101,0 +101,0 @@ tick

Sorry, the diff of this file is not supported yet

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