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

Add option definitions and validation to Graph3d #3099

Merged
merged 20 commits into from
Jul 23, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0a33741
Proof of concept with copied options + handling from network
wimrijnders May 24, 2017
e07d68f
Added unit test for Graph3d, for checking default syntax; completed d…
wimrijnders May 24, 2017
95ef79b
Fixes for options in playground example
wimrijnders May 25, 2017
8df2388
Added onclick options to graph3d documentation
wimrijnders May 25, 2017
80a3a09
Fixes in graph3d examples
wimrijnders May 25, 2017
6aa3492
Final fixes for option definitions in Graph3d
wimrijnders May 25, 2017
24bef83
Merge branch 'develop' into optionsGraph3d
wimrijnders Jun 3, 2017
49c4476
Fixed handling of 'undefined' in options, enhanced graph3d unit test
wimrijnders Jun 4, 2017
cd1c203
Disabled console output in graph3d unit test
wimrijnders Jun 4, 2017
1c33c15
merge with develop, fix conflict
wimrijnders Jun 13, 2017
59a045a
Merge branch 'develop' into optionsGraph3d
wimrijnders Jul 3, 2017
be90cea
Merge branch 'develop' into optionsGraph3d
wimrijnders Jul 13, 2017
3de1985
Merge branch 'develop' into optionsGraph3d
wimrijnders Jul 13, 2017
7b8489b
Fix conflicts
wimrijnders Jul 17, 2017
ef2b339
Upgrade webpack module
wimrijnders Jul 17, 2017
cc22771
Merge branch 'optionsGraph3d' of github.com:wimrijnders/vis into opti…
wimrijnders Jul 17, 2017
39639d2
Fixed conflicts
wimrijnders Jul 21, 2017
830c199
Merge branch 'develop' into optionsGraph3d
yotamberk Jul 21, 2017
46286ed
Merge branch 'develop' into optionsGraph3d
wimrijnders Jul 22, 2017
fe0b276
Merge branch 'develop' into optionsGraph3d
yotamberk Jul 23, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Final fixes for option definitions in Graph3d
  • Loading branch information
wimrijnders committed May 25, 2017
commit 6aa3492cf6038bfe690cd6d4b43e4d35ae8e3cb4
25 changes: 19 additions & 6 deletions lib/graph3d/Graph3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var Range = require('./Range');
var Settings = require('./Settings');
var Validator = require("./../shared/Validator").default;
var {printStyle} = require('./../shared/Validator');
var {allOptions, configureOptions} = require('./options.js');
var {allOptions} = require('./options.js');


/// enumerate the available styles
Expand All @@ -24,9 +24,13 @@ Graph3d.STYLE = Settings.STYLE;
*
* Using 'undefined' directly achieves the same thing, but this is more
* descriptive by describing the intent.
*/
*
* Value not used any more in code; this comment block now serves as reference.

var autoByDefault = undefined;

*/


/**
* Default values for option settings.
Expand Down Expand Up @@ -61,10 +65,8 @@ Graph3d.DEFAULTS = {
dotSizeMinFraction: 0.5, // size of min-value dot as a fraction of dotSizeRatio
dotSizeMaxFraction: 2.5, // size of max-value dot as a fraction of dotSizeRatio

showAnimationControls: autoByDefault,
animationInterval : 1000, // milliseconds
animationPreload : false,
animationAutoStart : autoByDefault,

axisColor : '#4D4D4D',
gridColor : '#D3D3D3',
Expand Down Expand Up @@ -96,8 +98,6 @@ Graph3d.DEFAULTS = {
}
},

showLegend : autoByDefault, // determined by graph style
backgroundColor : autoByDefault,

dataColor : {
fill : '#7DC1FF',
Expand All @@ -111,6 +111,18 @@ Graph3d.DEFAULTS = {
distance : 1.7
},


/*
The following fields are 'auto by default', see above.
The explicit setting of the fields has been disabled, because the
Validator module can't handle 'undefined' as set value.

showAnimationControls: autoByDefault,
animationAutoStart : autoByDefault,

showLegend : autoByDefault, // determined by graph style
backgroundColor : autoByDefault,

xBarWidth : autoByDefault,
yBarWidth : autoByDefault,
valueMin : autoByDefault,
Expand All @@ -124,6 +136,7 @@ Graph3d.DEFAULTS = {
zMin : autoByDefault,
zMax : autoByDefault,
zStep : autoByDefault
*/
};


Expand Down
Loading