{"action":"created","issue":{"url":"https://api.github.com/repos/vasturiano/react-force-graph/issues/46","repository_url":"https://api.github.com/repos/vasturiano/react-force-graph","labels_url":"https://api.github.com/repos/vasturiano/react-force-graph/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/vasturiano/react-force-graph/issues/46/comments","events_url":"https://api.github.com/repos/vasturiano/react-force-graph/issues/46/events","html_url":"https://github.com/vasturiano/react-force-graph/issues/46","id":372600385,"node_id":"MDU6SXNzdWUzNzI2MDAzODU=","number":46,"title":"d3Force link distance example","user":{"login":"wadehenning","id":10761087,"node_id":"MDQ6VXNlcjEwNzYxMDg3","avatar_url":"https://avatars3.githubusercontent.com/u/10761087?v=4","gravatar_id":"","url":"https://api.github.com/users/wadehenning","html_url":"https://github.com/wadehenning","followers_url":"https://api.github.com/users/wadehenning/followers","following_url":"https://api.github.com/users/wadehenning/following{/other_user}","gists_url":"https://api.github.com/users/wadehenning/gists{/gist_id}","starred_url":"https://api.github.com/users/wadehenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wadehenning/subscriptions","organizations_url":"https://api.github.com/users/wadehenning/orgs","repos_url":"https://api.github.com/users/wadehenning/repos","events_url":"https://api.github.com/users/wadehenning/events{/privacy}","received_events_url":"https://api.github.com/users/wadehenning/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-22T16:42:39Z","updated_at":"2018-10-22T17:50:41Z","closed_at":null,"author_association":"NONE","body":"Hi @vasturiano \r\nI have calculated the distance between each of my variables and included that distance in the links data.  What is the simplest way to use this as the distance between nodes my component?  ```d3Force=???```  I know below is incorrect, but just to give an idea.\r\n\r\n```\r\nexport default class TextGraph extends React.Component {\r\n        render() {\r\n          const {data} = this.props;        \r\n\r\n          return <ForceGraph3D       \r\n              graphData={data}\r\n              d3Force = { ('link', \"distance\")}\r\n\r\n              nodeLabel = \"desc\"       \r\n              cooldownTime={15000}\r\n              d3AlphaDecay={0}\r\n              d3VelocityDecay={0}\r\n              nodeAutoColorBy=\"group\"\r\n              enableNodeDrag={false}     \r\n\r\n              nodeThreeObject={node => {\r\n                const sprite = new SpriteText(node.id);\r\n                sprite.color = node.color;\r\n                sprite.textHeight = node.revenue;\r\n                return sprite;\r\n          }}\r\n        />;\r\n        }\r\n      }\r\n```\r\n\r\nThank you.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vasturiano/react-force-graph/issues/comments/431913610","html_url":"https://github.com/vasturiano/react-force-graph/issues/46#issuecomment-431913610","issue_url":"https://api.github.com/repos/vasturiano/react-force-graph/issues/46","id":431913610,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTkxMzYxMA==","user":{"login":"wadehenning","id":10761087,"node_id":"MDQ6VXNlcjEwNzYxMDg3","avatar_url":"https://avatars3.githubusercontent.com/u/10761087?v=4","gravatar_id":"","url":"https://api.github.com/users/wadehenning","html_url":"https://github.com/wadehenning","followers_url":"https://api.github.com/users/wadehenning/followers","following_url":"https://api.github.com/users/wadehenning/following{/other_user}","gists_url":"https://api.github.com/users/wadehenning/gists{/gist_id}","starred_url":"https://api.github.com/users/wadehenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wadehenning/subscriptions","organizations_url":"https://api.github.com/users/wadehenning/orgs","repos_url":"https://api.github.com/users/wadehenning/repos","events_url":"https://api.github.com/users/wadehenning/events{/privacy}","received_events_url":"https://api.github.com/users/wadehenning/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T17:50:41Z","updated_at":"2018-10-22T17:50:41Z","author_association":"NONE","body":"@vasturiano .  So use  ```.distance(node=> )``` even though the distances are connected to the links?  I've tried both ways but must still does not seem to be working. \r\n\r\n```\r\nexport default class TextGraph extends React.Component {\r\n        componentDidMount(){\r\n          this.fg.d3Force('link').distance(node => node.distance);\r\n        }\r\n\r\n        render() {\r\n          const {data} = this.props;        \r\n\r\n          return <ForceGraph3D      \r\n               ref={el => this.fg = el} \r\n              graphData={data}    \r\n              nodeLabel = \"desc\"       \r\n              cooldownTime={60000}\r\n              d3AlphaDecay={0}\r\n              d3VelocityDecay={0}\r\n              nodeAutoColorBy=\"group\"\r\n              enableNodeDrag={false}     \r\n\r\n              nodeThreeObject={node => {\r\n                const sprite = new SpriteText(node.id);\r\n                sprite.color = node.color;\r\n                sprite.textHeight = node.revenue;\r\n                return sprite;\r\n          }}\r\n        />;\r\n        }\r\n      }\r\n```\r\n\r\nThank you."}}
{"actor":{"display_login":"wadehenning"}}