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

Conversation

@gotoken
Copy link
Contributor

@gotoken gotoken commented Nov 22, 2016

Axis labels of graph3d is positioned on the middle point of between the origin and the center of each range. e.g.,

xText   = xRange.center() / 2;

For example, for xRange = [100, 200], the center of range is (100+200)/2 = 150 and the middle point is (0+150)/2 = 75 then the middle point is positioned out of range. So axis labels disappear. This patch uses points divide each range in the ratio 1:3 as axis label positions

I've setup preview https://fiddle.jshell.net/gotoken/5sk9ka72/3/show/ . Please try to reproduce by pasting this CSV into http://visjs.org/examples/graph3d/playground/index.html then click "Draw graph".

@mojoaxel
Copy link
Member

@wimrijnders Can you please have a look at this.

@gotoken
Copy link
Contributor Author

gotoken commented Nov 23, 2016

@mojoaxel Thanks you noticed him. I changed my patch to preserve original positioning way, that is, an axis label divides its range in the ratio 1:3. It may well be acceptable. Apologies for the changes after PR.

01d9ad9

@wimrijnders
Copy link

@mojoaxel This fix is fine by me,

Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved by @wimrijnders

@mojoaxel mojoaxel merged commit b0c5659 into visjs:develop Nov 23, 2016
@mojoaxel mojoaxel added this to the Minor Release v4.18 milestone Nov 23, 2016
@gotoken gotoken deleted the develop branch November 24, 2016 01:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants