Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Add a fontAlignment option. This option should control where the label is drawn with respect to the node (ie. above, middle, under, left, right etc). #246

Open
AVermeij opened this issue Aug 15, 2014 · 4 comments

Comments

@AVermeij
Copy link

Hi,

Currently, the dot shape only allows rendering of labels below the node. In many cases, it is aesthetically more pleasing to allow the node to be drawn 'on top' of the shape to reduce visual clutter.

The circle shape provides a partial solution, but always draws the label inside the shape and increases node size accordingly. This then overrides the node value setting, losing important visual information in the resulting network.

Would it be possible to allow for labels to be rendered on top of a dot shape? In case of long node labels (e.g. document titles), it would also be very interesting to be able to set a cutting point to separate the label in 2 lines after a certain amount of characters (to avoid long node labels overlapping adjacent nodes).

Cheers,

André

@AlexDM0
Copy link
Contributor

AlexDM0 commented Aug 15, 2014

Hi Andre,

The cutting of the label is up to the implementing developer. I don't think this is something that should be done by vis (there are waayy too many ways to cut up a string, number of characters, on specific characters etc). Maybe a font alignment could be nice addition (ie. above, midde, under, left, right etc) for certain shapes with sizes that are independent of the text size.

Regards,

Alex

@AVermeij
Copy link
Author

Hi Alex,

A fontAlignment option indeed sounds like a great idea to provide more label visualization possibilities for shapes that are independent of label size.

You're actually right about the cut-off point thing - way too many options for that to implement it in a standardized way.

Cheers,

André

@AlexDM0
Copy link
Contributor

AlexDM0 commented Jan 9, 2015

Hi,

Over the last year a lot of feature requests have been made. We have just introduced our new website which has a list of the requested features. We have placed this request on that list.

The list can be found here:
http://visjs.org/featureRequests.html

An explaination of the new system can be found here:
http://visjs.org/blog.html#New\ website\ for\ vis.js!

I would like to stress that this does not mean we abandon this request. Discussion here will continue if needed on this feature but we will close it to keep our Github issue page more of a bug-todo list.

Future feature requests will still be made here and then added to the website by us.

Regards,

Alex

@AlexDM0 AlexDM0 closed this as completed Jan 9, 2015
@mojoaxel mojoaxel changed the title Allow rendering labels on top of dot shapes Add a fontAlignment option. This option should control where the label is drawn with respect to the node (ie. above, middle, under, left, right etc). Oct 24, 2016
@mojoaxel
Copy link
Member

Reopening as Feature-Request issue (see #2114).
Everybody: Please feel free to implement this!

@mojoaxel mojoaxel reopened this Oct 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants