New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

d3plus-network

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3plus-network - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

dev/pacha/chl_usa_2010_hs92_4.json

6

build/d3plus-network.js
/*
d3plus-network v0.1.11
d3plus-network v0.1.12
Javascript network visualizations built upon d3 modules.

@@ -250,2 +250,4 @@ Copyright (c) 2017 D3plus - https://d3plus.org

if (n === undefined) { return false; }
return {

@@ -262,3 +264,3 @@ __d3plus__: true,

});
}).filter(function (n) { return n; });

@@ -265,0 +267,0 @@ var xExtent = d3Array.extent(nodes.map(function (n) { return n.fx; })),

/*
d3plus-network v0.1.11
d3plus-network v0.1.12
Javascript network visualizations built upon d3 modules.

@@ -7,2 +7,2 @@ Copyright (c) 2017 D3plus - https://d3plus.org

*/
if(typeof Object.assign!=="function"){Object.defineProperty(Object,"assign",{value:function e(t){"use strict";if(t===null){throw new TypeError("Cannot convert undefined or null to object")}var r=Object(t);for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i!==null){for(var o in i){if(Object.prototype.hasOwnProperty.call(i,o)){r[o]=i[o]}}}}return r},writable:true,configurable:true})}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function e(t,r){var n=Object(this);var i=n.length>>>0;if(i===0)return false;var o=r|0;var s=Math.max(o>=0?o:i-Math.abs(o),0);function a(e,t){return e===t||typeof e==="number"&&typeof t==="number"&&isNaN(e)&&isNaN(t)}while(s<i){if(a(n[s],t)){return true}s++}return false}})}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("d3-array"),require("d3-collection"),require("d3-scale"),require("d3-zoom"),require("d3plus-common"),require("d3plus-shape"),require("d3plus-viz")):typeof define==="function"&&define.amd?define("d3plus-network",["exports","d3-array","d3-collection","d3-scale","d3-zoom","d3plus-common","d3plus-shape","d3plus-viz"],t):t(e.d3plus={},e.d3Array,e.d3Collection,e.scales,e.d3Zoom,e.d3plusCommon,e.shapes,e.d3plusViz)})(this,function(e,t,r,n,i,o,s,a){"use strict";var u=function(e){function u(){var t=this;e.call(this);this._links=[];this._nodes=[];this._on["click.shape"]=function(e,r){t._tooltipClass.data([]).render();if(t._hover&&t._drawDepth>=t._groupBy.length-1){if(t._focus&&t._focus===e.id){t.active(false);t._on.mouseenter.bind(t)(e,r);t._focus=undefined;t._zoomToBounds(null)}else{var n=t._nodeGroupBy&&t._nodeGroupBy[t._drawDepth](e,r)?t._nodeGroupBy[t._drawDepth](e,r):t._id(e,r),o=t._linkLookup[n],s=t._nodeLookup[n];var a=[s.id];var u=[s.x-s.r,s.x+s.r],c=[s.y-s.r,s.y+s.r];o.forEach(function(e){a.push(e.id);if(e.x-e.r<u[0]){u[0]=e.x-e.r}if(e.x+e.r>u[1]){u[1]=e.x+e.r}if(e.y-e.r<c[0]){c[0]=e.y-e.r}if(e.y+e.r>c[1]){c[1]=e.y+e.r}});t.active(function(e,r){if(e.source&&e.target){return e.source.id===s.id||e.target.id===s.id}else{return a.includes(t._ids(e,r)[t._drawDepth])}});t._focus=e.id;var d=i.zoomTransform(t._container.node());u=u.map(function(e){return e*d.k+d.x});c=c.map(function(e){return e*d.k+d.y});t._zoomToBounds([[u[0],c[0]],[u[1],c[1]]])}}};this._on["click.legend"]=function(e,r){var n=t._id(e);var o=t._ids(e);o=o[o.length-1];if(t._hover&&t._drawDepth>=t._groupBy.length-1){if(t._focus&&t._focus===n){t.active(false);t._on.mouseenter.bind(t)(e,r);t._focus=undefined;t._zoomToBounds(null)}else{var s=n.map(function(e){return t._nodeLookup[e]});var a=[o];var u=[s[0].x-s[0].r,s[0].x+s[0].r],c=[s[0].y-s[0].r,s[0].y+s[0].r];s.forEach(function(e){a.push(e.id);if(e.x-e.r<u[0]){u[0]=e.x-e.r}if(e.x+e.r>u[1]){u[1]=e.x+e.r}if(e.y-e.r<c[0]){c[0]=e.y-e.r}if(e.y+e.r>c[1]){c[1]=e.y+e.r}});t.active(function(e,r){if(e.source&&e.target){return a.includes(e.source.id)&&a.includes(e.target.id)}else{var n=t._ids(e,r);return a.includes(n[n.length-1])}});t._focus=n;var d=i.zoomTransform(t._container.node());u=u.map(function(e){return e*d.k+d.x});c=c.map(function(e){return e*d.k+d.y});t._zoomToBounds([[u[0],c[0]],[u[1],c[1]]])}t._on["mousemove.legend"].bind(t)(e,r)}};this._sizeMin=5;this._sizeScale="sqrt";this._shape=o.constant("Circle");this._shapeConfig=o.assign(this._shapeConfig,{labelConfig:{textAnchor:"middle",verticalAlign:"middle"},Path:{fill:"none",label:false,stroke:"#eee",strokeWidth:1}});this._x=o.accessor("x");this._y=o.accessor("y");this._zoom=true}if(e)u.__proto__=e;u.prototype=Object.create(e&&e.prototype);u.prototype.constructor=u;u.prototype._draw=function i(a){var u=this;e.prototype._draw.call(this,a);var c=this._height-this._margin.top-this._margin.bottom,d="translate("+this._margin.left+", "+this._margin.top+")",f=this._transition,h=this._width-this._margin.left-this._margin.right;var p=this._filteredData.reduce(function(e,t,r){e[u._id(t,r)]=t;return e},{});var l=this._nodes.reduce(function(e,t,r){e[u._nodeGroupBy?u._nodeGroupBy[u._drawDepth](t,r):u._id(t,r)]=t;return e},{});l=Array.from(new Set(Object.keys(p).concat(Object.keys(l)))).map(function(e,t){var r=p[e],n=l[e];return{__d3plus__:true,data:r||n,i:t,id:e,fx:r!==undefined&&u._x(r)!==undefined?u._x(r):u._x(n),fy:r!==undefined&&u._y(r)!==undefined?u._y(r):u._y(n),node:n,r:u._size?r!==undefined&&u._size(r)!==undefined?u._size(r):u._size(n):u._sizeMin,shape:r!==undefined&&u._shape(r)!==undefined?u._shape(r):u._shape(n)}});var _=t.extent(l.map(function(e){return e.fx})),y=t.extent(l.map(function(e){return e.fy}));var g=n.scaleLinear().domain(_).range([0,h]),m=n.scaleLinear().domain(y).range([0,c]);var v=(_[1]-_[0])/(y[1]-y[0]),x=h/c;if(v>x){var z=c*x/v;m.range([(c-z)/2,c-(c-z)/2])}else{var k=h*v/x;g.range([(h-k)/2,h-(h-k)/2])}l.forEach(function(e){e.x=g(e.fx);e.y=m(e.fy)});var w=t.extent(l.map(function(e){return e.r}));var b=this._sizeMax||t.min(t.merge(l.map(function(e){return l.map(function(t){return e===t?null:s.pointDistance([e.x,e.y],[t.x,t.y])})})))/2;var M=n["scale"+this._sizeScale.charAt(0).toUpperCase()+this._sizeScale.slice(1)]().domain(w).range([w[0]===w[1]?b:t.min([b/2,this._sizeMin]),b]),A=g.domain(),B=m.domain();var G=A[1]-A[0],O=B[1]-B[0];l.forEach(function(e){var t=M(e.r);if(A[0]>g.invert(e.x-t)){A[0]=g.invert(e.x-t)}if(A[1]<g.invert(e.x+t)){A[1]=g.invert(e.x+t)}if(B[0]>m.invert(e.y-t)){B[0]=m.invert(e.y-t)}if(B[1]<m.invert(e.y+t)){B[1]=m.invert(e.y+t)}});var j=A[1]-A[0],C=B[1]-B[0];b*=t.min([G/j,O/C]);M.range([w[0]===w[1]?b:t.min([b/2,this._sizeMin]),b]);g.domain(A);m.domain(B);l.forEach(function(e){e.x=g(e.fx);e.fx=e.x;e.y=m(e.fy);e.fy=e.y;e.r=M(e.r);e.width=e.r*2;e.height=e.r*2});var q=this._nodeLookup=l.reduce(function(e,t){e[t.id]=t;return e},{});var L=l.map(function(e){return e.node});var D=this._links.map(function(e){return{source:typeof e.source==="number"?l[L.indexOf(u._nodes[e.source])]:q[e.source.id],target:typeof e.target==="number"?l[L.indexOf(u._nodes[e.target])]:q[e.target.id]}});this._linkLookup=D.reduce(function(e,t){if(!e[t.source.id]){e[t.source.id]=[]}e[t.source.id].push(t.target);if(!e[t.target.id]){e[t.target.id]=[]}e[t.target.id].push(t.source);return e},{});this._container=this._select.selectAll("svg.d3plus-network").data([0]);this._container=this._container.enter().append("svg").attr("class","d3plus-network").attr("opacity",0).attr("width",h).attr("height",c).attr("x",this._margin.left).attr("y",this._margin.top).style("background-color","transparent").merge(this._container);this._container.transition(this._transition).attr("opacity",1).attr("width",h).attr("height",c).attr("x",this._margin.left).attr("y",this._margin.top);var P=this._container.selectAll("rect.d3plus-network-hitArea").data([0]);P.enter().append("rect").attr("class","d3plus-network-hitArea").merge(P).attr("width",h).attr("height",c).attr("fill","transparent");this._zoomGroup=this._container.selectAll("g.d3plus-network-zoomGroup").data([0]);var S=this._zoomGroup=this._zoomGroup.enter().append("g").attr("class","d3plus-network-zoomGroup").merge(this._zoomGroup);this._shapes.push((new s.Path).config(this._shapeConfig).config(this._shapeConfig.Path).d(function(e){return"M"+e.source.x+","+e.source.y+" "+e.target.x+","+e.target.y}).data(D).select(o.elem("g.d3plus-network-links",{parent:S,transition:f,enter:{transform:d},update:{transform:d}}).node()).render());var E={label:function(e){return u._drawLabel(e.data||e.node,e.i)},select:o.elem("g.d3plus-network-nodes",{parent:S,transition:f,enter:{transform:d},update:{transform:d}}).node()};r.nest().key(function(e){return e.shape}).entries(l).forEach(function(e){u._shapes.push((new s[e.key]).config(o.configPrep.bind(u)(u._shapeConfig,"shape",e.key)).config(E).data(e.values).render())});return this};u.prototype.links=function e(t,r){return arguments.length?(this._queue.push([a.dataLoad.bind(this),t,r,"links"]),this):this._links};u.prototype.nodeGroupBy=function e(t){var r=this;if(!arguments.length){return this._nodeGroupBy}if(!(t instanceof Array)){t=[t]}return this._nodeGroupBy=t.map(function(e){if(typeof e==="function"){return e}else{if(!r._aggs[e]){r._aggs[e]=function(e){var t=Array.from(new Set(e));return t.length===1?t[0]:t}}return o.accessor(e)}}),this};u.prototype.nodes=function e(t,r){return arguments.length?(this._queue.push([a.dataLoad.bind(this),t,r,"nodes"]),this):this._nodes};u.prototype.size=function e(t){return arguments.length?(this._size=typeof t==="function"||!t?t:o.accessor(t),this):this._size};u.prototype.sizeMax=function e(t){return arguments.length?(this._sizeMax=t,this):this._sizeMax};u.prototype.sizeMin=function e(t){return arguments.length?(this._sizeMin=t,this):this._sizeMin};u.prototype.sizeScale=function e(t){return arguments.length?(this._sizeScale=t,this):this._sizeScale};u.prototype.x=function e(r){if(arguments.length){if(typeof r==="function"){this._x=r}else{this._x=o.accessor(r);if(!this._aggs[r]){this._aggs[r]=function(e){return t.mean(e)}}}return this}else{return this._x}};u.prototype.y=function e(r){if(arguments.length){if(typeof r==="function"){this._y=r}else{this._y=o.accessor(r);if(!this._aggs[r]){this._aggs[r]=function(e){return t.mean(e)}}}return this}else{return this._y}};return u}(a.Viz);e.Network=u;Object.defineProperty(e,"__esModule",{value:true})});
if(typeof Object.assign!=="function"){Object.defineProperty(Object,"assign",{value:function e(t){"use strict";if(t===null){throw new TypeError("Cannot convert undefined or null to object")}var r=Object(t);for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i!==null){for(var o in i){if(Object.prototype.hasOwnProperty.call(i,o)){r[o]=i[o]}}}}return r},writable:true,configurable:true})}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function e(t,r){var n=Object(this);var i=n.length>>>0;if(i===0)return false;var o=r|0;var s=Math.max(o>=0?o:i-Math.abs(o),0);function a(e,t){return e===t||typeof e==="number"&&typeof t==="number"&&isNaN(e)&&isNaN(t)}while(s<i){if(a(n[s],t)){return true}s++}return false}})}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("d3-array"),require("d3-collection"),require("d3-scale"),require("d3-zoom"),require("d3plus-common"),require("d3plus-shape"),require("d3plus-viz")):typeof define==="function"&&define.amd?define("d3plus-network",["exports","d3-array","d3-collection","d3-scale","d3-zoom","d3plus-common","d3plus-shape","d3plus-viz"],t):t(e.d3plus={},e.d3Array,e.d3Collection,e.scales,e.d3Zoom,e.d3plusCommon,e.shapes,e.d3plusViz)})(this,function(e,t,r,n,i,o,s,a){"use strict";var u=function(e){function u(){var t=this;e.call(this);this._links=[];this._nodes=[];this._on["click.shape"]=function(e,r){t._tooltipClass.data([]).render();if(t._hover&&t._drawDepth>=t._groupBy.length-1){if(t._focus&&t._focus===e.id){t.active(false);t._on.mouseenter.bind(t)(e,r);t._focus=undefined;t._zoomToBounds(null)}else{var n=t._nodeGroupBy&&t._nodeGroupBy[t._drawDepth](e,r)?t._nodeGroupBy[t._drawDepth](e,r):t._id(e,r),o=t._linkLookup[n],s=t._nodeLookup[n];var a=[s.id];var u=[s.x-s.r,s.x+s.r],c=[s.y-s.r,s.y+s.r];o.forEach(function(e){a.push(e.id);if(e.x-e.r<u[0]){u[0]=e.x-e.r}if(e.x+e.r>u[1]){u[1]=e.x+e.r}if(e.y-e.r<c[0]){c[0]=e.y-e.r}if(e.y+e.r>c[1]){c[1]=e.y+e.r}});t.active(function(e,r){if(e.source&&e.target){return e.source.id===s.id||e.target.id===s.id}else{return a.includes(t._ids(e,r)[t._drawDepth])}});t._focus=e.id;var d=i.zoomTransform(t._container.node());u=u.map(function(e){return e*d.k+d.x});c=c.map(function(e){return e*d.k+d.y});t._zoomToBounds([[u[0],c[0]],[u[1],c[1]]])}}};this._on["click.legend"]=function(e,r){var n=t._id(e);var o=t._ids(e);o=o[o.length-1];if(t._hover&&t._drawDepth>=t._groupBy.length-1){if(t._focus&&t._focus===n){t.active(false);t._on.mouseenter.bind(t)(e,r);t._focus=undefined;t._zoomToBounds(null)}else{var s=n.map(function(e){return t._nodeLookup[e]});var a=[o];var u=[s[0].x-s[0].r,s[0].x+s[0].r],c=[s[0].y-s[0].r,s[0].y+s[0].r];s.forEach(function(e){a.push(e.id);if(e.x-e.r<u[0]){u[0]=e.x-e.r}if(e.x+e.r>u[1]){u[1]=e.x+e.r}if(e.y-e.r<c[0]){c[0]=e.y-e.r}if(e.y+e.r>c[1]){c[1]=e.y+e.r}});t.active(function(e,r){if(e.source&&e.target){return a.includes(e.source.id)&&a.includes(e.target.id)}else{var n=t._ids(e,r);return a.includes(n[n.length-1])}});t._focus=n;var d=i.zoomTransform(t._container.node());u=u.map(function(e){return e*d.k+d.x});c=c.map(function(e){return e*d.k+d.y});t._zoomToBounds([[u[0],c[0]],[u[1],c[1]]])}t._on["mousemove.legend"].bind(t)(e,r)}};this._sizeMin=5;this._sizeScale="sqrt";this._shape=o.constant("Circle");this._shapeConfig=o.assign(this._shapeConfig,{labelConfig:{textAnchor:"middle",verticalAlign:"middle"},Path:{fill:"none",label:false,stroke:"#eee",strokeWidth:1}});this._x=o.accessor("x");this._y=o.accessor("y");this._zoom=true}if(e)u.__proto__=e;u.prototype=Object.create(e&&e.prototype);u.prototype.constructor=u;u.prototype._draw=function i(a){var u=this;e.prototype._draw.call(this,a);var c=this._height-this._margin.top-this._margin.bottom,d="translate("+this._margin.left+", "+this._margin.top+")",f=this._transition,h=this._width-this._margin.left-this._margin.right;var p=this._filteredData.reduce(function(e,t,r){e[u._id(t,r)]=t;return e},{});var l=this._nodes.reduce(function(e,t,r){e[u._nodeGroupBy?u._nodeGroupBy[u._drawDepth](t,r):u._id(t,r)]=t;return e},{});l=Array.from(new Set(Object.keys(p).concat(Object.keys(l)))).map(function(e,t){var r=p[e],n=l[e];if(n===undefined){return false}return{__d3plus__:true,data:r||n,i:t,id:e,fx:r!==undefined&&u._x(r)!==undefined?u._x(r):u._x(n),fy:r!==undefined&&u._y(r)!==undefined?u._y(r):u._y(n),node:n,r:u._size?r!==undefined&&u._size(r)!==undefined?u._size(r):u._size(n):u._sizeMin,shape:r!==undefined&&u._shape(r)!==undefined?u._shape(r):u._shape(n)}}).filter(function(e){return e});var _=t.extent(l.map(function(e){return e.fx})),y=t.extent(l.map(function(e){return e.fy}));var g=n.scaleLinear().domain(_).range([0,h]),m=n.scaleLinear().domain(y).range([0,c]);var v=(_[1]-_[0])/(y[1]-y[0]),x=h/c;if(v>x){var z=c*x/v;m.range([(c-z)/2,c-(c-z)/2])}else{var k=h*v/x;g.range([(h-k)/2,h-(h-k)/2])}l.forEach(function(e){e.x=g(e.fx);e.y=m(e.fy)});var w=t.extent(l.map(function(e){return e.r}));var b=this._sizeMax||t.min(t.merge(l.map(function(e){return l.map(function(t){return e===t?null:s.pointDistance([e.x,e.y],[t.x,t.y])})})))/2;var M=n["scale"+this._sizeScale.charAt(0).toUpperCase()+this._sizeScale.slice(1)]().domain(w).range([w[0]===w[1]?b:t.min([b/2,this._sizeMin]),b]),A=g.domain(),B=m.domain();var G=A[1]-A[0],O=B[1]-B[0];l.forEach(function(e){var t=M(e.r);if(A[0]>g.invert(e.x-t)){A[0]=g.invert(e.x-t)}if(A[1]<g.invert(e.x+t)){A[1]=g.invert(e.x+t)}if(B[0]>m.invert(e.y-t)){B[0]=m.invert(e.y-t)}if(B[1]<m.invert(e.y+t)){B[1]=m.invert(e.y+t)}});var j=A[1]-A[0],C=B[1]-B[0];b*=t.min([G/j,O/C]);M.range([w[0]===w[1]?b:t.min([b/2,this._sizeMin]),b]);g.domain(A);m.domain(B);l.forEach(function(e){e.x=g(e.fx);e.fx=e.x;e.y=m(e.fy);e.fy=e.y;e.r=M(e.r);e.width=e.r*2;e.height=e.r*2});var q=this._nodeLookup=l.reduce(function(e,t){e[t.id]=t;return e},{});var L=l.map(function(e){return e.node});var D=this._links.map(function(e){return{source:typeof e.source==="number"?l[L.indexOf(u._nodes[e.source])]:q[e.source.id],target:typeof e.target==="number"?l[L.indexOf(u._nodes[e.target])]:q[e.target.id]}});this._linkLookup=D.reduce(function(e,t){if(!e[t.source.id]){e[t.source.id]=[]}e[t.source.id].push(t.target);if(!e[t.target.id]){e[t.target.id]=[]}e[t.target.id].push(t.source);return e},{});this._container=this._select.selectAll("svg.d3plus-network").data([0]);this._container=this._container.enter().append("svg").attr("class","d3plus-network").attr("opacity",0).attr("width",h).attr("height",c).attr("x",this._margin.left).attr("y",this._margin.top).style("background-color","transparent").merge(this._container);this._container.transition(this._transition).attr("opacity",1).attr("width",h).attr("height",c).attr("x",this._margin.left).attr("y",this._margin.top);var P=this._container.selectAll("rect.d3plus-network-hitArea").data([0]);P.enter().append("rect").attr("class","d3plus-network-hitArea").merge(P).attr("width",h).attr("height",c).attr("fill","transparent");this._zoomGroup=this._container.selectAll("g.d3plus-network-zoomGroup").data([0]);var S=this._zoomGroup=this._zoomGroup.enter().append("g").attr("class","d3plus-network-zoomGroup").merge(this._zoomGroup);this._shapes.push((new s.Path).config(this._shapeConfig).config(this._shapeConfig.Path).d(function(e){return"M"+e.source.x+","+e.source.y+" "+e.target.x+","+e.target.y}).data(D).select(o.elem("g.d3plus-network-links",{parent:S,transition:f,enter:{transform:d},update:{transform:d}}).node()).render());var E={label:function(e){return u._drawLabel(e.data||e.node,e.i)},select:o.elem("g.d3plus-network-nodes",{parent:S,transition:f,enter:{transform:d},update:{transform:d}}).node()};r.nest().key(function(e){return e.shape}).entries(l).forEach(function(e){u._shapes.push((new s[e.key]).config(o.configPrep.bind(u)(u._shapeConfig,"shape",e.key)).config(E).data(e.values).render())});return this};u.prototype.links=function e(t,r){return arguments.length?(this._queue.push([a.dataLoad.bind(this),t,r,"links"]),this):this._links};u.prototype.nodeGroupBy=function e(t){var r=this;if(!arguments.length){return this._nodeGroupBy}if(!(t instanceof Array)){t=[t]}return this._nodeGroupBy=t.map(function(e){if(typeof e==="function"){return e}else{if(!r._aggs[e]){r._aggs[e]=function(e){var t=Array.from(new Set(e));return t.length===1?t[0]:t}}return o.accessor(e)}}),this};u.prototype.nodes=function e(t,r){return arguments.length?(this._queue.push([a.dataLoad.bind(this),t,r,"nodes"]),this):this._nodes};u.prototype.size=function e(t){return arguments.length?(this._size=typeof t==="function"||!t?t:o.accessor(t),this):this._size};u.prototype.sizeMax=function e(t){return arguments.length?(this._sizeMax=t,this):this._sizeMax};u.prototype.sizeMin=function e(t){return arguments.length?(this._sizeMin=t,this):this._sizeMin};u.prototype.sizeScale=function e(t){return arguments.length?(this._sizeScale=t,this):this._sizeScale};u.prototype.x=function e(r){if(arguments.length){if(typeof r==="function"){this._x=r}else{this._x=o.accessor(r);if(!this._aggs[r]){this._aggs[r]=function(e){return t.mean(e)}}}return this}else{return this._x}};u.prototype.y=function e(r){if(arguments.length){if(typeof r==="function"){this._y=r}else{this._y=o.accessor(r);if(!this._aggs[r]){this._aggs[r]=function(e){return t.mean(e)}}}return this}else{return this._y}};return u}(a.Viz);e.Network=u;Object.defineProperty(e,"__esModule",{value:true})});
{
"name": "d3plus-network",
"version": "0.1.11",
"version": "0.1.12",
"description": "Javascript network visualizations built upon d3 modules.",

@@ -5,0 +5,0 @@ "main": "build/d3plus-network.js",

@@ -99,3 +99,3 @@ # d3plus-network

<a name="Network.links" href="#Network.links">#</a> Network.**links**(*links*, [*formatter*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L362)
<a name="Network.links" href="#Network.links">#</a> Network.**links**(*links*, [*formatter*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L364)

@@ -119,3 +119,3 @@ A predefined *Array* of edges that connect each object passed to the [node](#Network.node) method. The `source` and `target` keys in each link need to map to the nodes in one of three ways:

<a name="Network.nodeGroupBy" href="#Network.nodeGroupBy">#</a> Network.**nodeGroupBy**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L372)
<a name="Network.nodeGroupBy" href="#Network.nodeGroupBy">#</a> Network.**nodeGroupBy**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L374)

@@ -128,3 +128,3 @@ If *value* is specified, sets the node group accessor(s) to the specified string, function, or array of values and returns the current class instance. This method overrides the default .groupBy() function from being used with the data passed to .nodes(). If *value* is not specified, returns the current node group accessor.

<a name="Network.nodes" href="#Network.nodes">#</a> Network.**nodes**(*nodes*, [*formatter*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L398)
<a name="Network.nodes" href="#Network.nodes">#</a> Network.**nodes**(*nodes*, [*formatter*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L400)

@@ -145,3 +145,3 @@ The list of nodes to be used for drawing the network. The value passed should either be an *Array* of data or a *String* representing a filepath or URL to be loaded.

<a name="Network.size" href="#Network.size">#</a> Network.**size**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L408)
<a name="Network.size" href="#Network.size">#</a> Network.**size**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L410)

@@ -154,3 +154,3 @@ If *value* is specified, sets the size accessor to the specified function or data key and returns the current class instance. If *value* is not specified, returns the current size accessor.

<a name="Network.sizeMax" href="#Network.sizeMax">#</a> Network.**sizeMax**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L418)
<a name="Network.sizeMax" href="#Network.sizeMax">#</a> Network.**sizeMax**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L420)

@@ -163,3 +163,3 @@ If *value* is specified, sets the size scale maximum to the specified number and returns the current class instance. If *value* is not specified, returns the current size scale maximum. By default, the maximum size is determined by half the distance of the two closest nodes.

<a name="Network.sizeMin" href="#Network.sizeMin">#</a> Network.**sizeMin**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L428)
<a name="Network.sizeMin" href="#Network.sizeMin">#</a> Network.**sizeMin**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L430)

@@ -172,3 +172,3 @@ If *value* is specified, sets the size scale minimum to the specified number and returns the current class instance. If *value* is not specified, returns the current size scale minimum.

<a name="Network.sizeScale" href="#Network.sizeScale">#</a> Network.**sizeScale**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L438)
<a name="Network.sizeScale" href="#Network.sizeScale">#</a> Network.**sizeScale**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L440)

@@ -181,3 +181,3 @@ If *value* is specified, sets the size scale to the specified string and returns the current class instance. If *value* is not specified, returns the current size scale.

<a name="Network.x" href="#Network.x">#</a> Network.**x**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L448)
<a name="Network.x" href="#Network.x">#</a> Network.**x**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L450)

@@ -190,3 +190,3 @@ If *value* is specified, sets the x accessor to the specified function or string matching a key in the data and returns the current class instance. The data passed to .data() takes priority over the .nodes() data array. If *value* is not specified, returns the current x accessor. By default, the x and y positions are determined dynamically based on default force layout properties.

<a name="Network.y" href="#Network.y">#</a> Network.**y**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L466)
<a name="Network.y" href="#Network.y">#</a> Network.**y**([*value*]) [<>](https://github.com/d3plus/d3plus-network/blob/master/src/Network.js#L468)

@@ -202,2 +202,2 @@ If *value* is specified, sets the y accessor to the specified function or string matching a key in the data and returns the current class instance. The data passed to .data() takes priority over the .nodes() data array. If *value* is not specified, returns the current y accessor. By default, the x and y positions are determined dynamically based on default force layout properties.

###### <sub>Documentation generated on Tue, 10 Oct 2017 19:50:35 GMT</sub>
###### <sub>Documentation generated on Mon, 23 Oct 2017 19:26:10 GMT</sub>

@@ -186,2 +186,4 @@ /**

if (n === undefined) return false;
return {

@@ -198,3 +200,3 @@ __d3plus__: true,

});
}).filter(n => n);

@@ -201,0 +203,0 @@ const xExtent = extent(nodes.map(n => n.fx)),

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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