d3-layout-circle-graph
Advanced tools
Comparing version 0.4.0 to 1.0.0
@@ -32,3 +32,3 @@ { | ||
}, | ||
"version": "0.4.0" | ||
"version": "1.0.0" | ||
} |
@@ -29,7 +29,7 @@ (function(d3) { | ||
function radiansToX(radians) { | ||
return Math.round(Math.sin(radians) * radius * 100)/100; | ||
return Math.sin(radians) * radius; | ||
} | ||
function radiansToY(radians) { | ||
return Math.round(Math.cos(radians) * radius * 100)/100; | ||
return Math.cos(radians) * -radius; | ||
} | ||
@@ -46,3 +46,3 @@ | ||
}, | ||
key: function(fn) { | ||
@@ -55,3 +55,3 @@ if (fn) { | ||
}, | ||
radius: function (r) { | ||
@@ -73,3 +73,3 @@ if (typeof r === 'number') { | ||
// calculate radians | ||
n.radians = Math.PI - i * radianSeparation; | ||
n.radians = i * radianSeparation; | ||
n.degrees = radiansToDegrees(n.radians); | ||
@@ -76,0 +76,0 @@ |
{ | ||
"name": "d3-layout-circle-graph", | ||
"version": "0.4.0", | ||
"version": "1.0.0", | ||
"description": "A d3 layout generator for visualizing a graph using a circle of nodes and chords connecting them", | ||
@@ -5,0 +5,0 @@ "main": "circleGraph.js", |
@@ -43,3 +43,3 @@ d3.layout.circleGraph | ||
The node objects will be endowed with `x`, `y`, `radians`, `radianRange`, and `degrees` properties. These can be used to visualize the graph as a circle. | ||
The node objects will be endowed with `x`, `y`, `radians`, `radianRange`, and `degrees` properties. These can be used to visualize the graph as a circle. Note that 0° is assumed to be 12 o'clock, and increases going clockwise. | ||
@@ -46,0 +46,0 @@ ### `node.x`, `node.y` |
Sorry, the diff of this file is not supported yet
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
146405
2