Skip to content

Conversation

@Fil
Copy link

@Fil Fil commented Mar 11, 2014

Makes it easier to draw lines from the starting point to the label, or do some computations with distances moved.

Fil added 3 commits March 11, 2014 09:20
`label_array[i].sx` and `label_array[i].sy` are a copy of the initial positions; makes it easy to use the distance moved to change the label or the label class

Basic example:

```
.text(function(d) { return d.name + ' ' + Math.ceil(Math.sqrt((d.x-d.sx)*(d.x-d.sx) + (d.y-d.sy)*(d.y-d.sy))) });
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant