vis.js is a dynamic, browser-based visualization library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

284 lines
8.8 KiB

Implementation of a week scale feature (#3009) * Add Gitter badge (#2179) * do not generate source-maps in distribution version * add 'dist' folder for deployment * added Badges * added codeclimate badge * added @Tooa to the support team * added badges from isitmaintained.com (#2517) * do not ignore dist and test folders in master * generated dist files for v4.18.0 * generated dist files for v4.18.1 * Cheap fix for bug #2795 * Update to PR #2826 to use newline format * changed to v4.18.1-SNAPSHOT * chore(docs): general improvements (#2652) * removed NOTICE file * updated license date range to include 2017 * chore(docs): updated support team members * chore: updated dependencies and devDependencies (#2649) * Fixes instanceof Object statements for objects from other windows and iFrames. (#2631) * Replaces instanceof Object checks with typeof to prevent cross tab issues. * Adds missing space. * chore: removed google-analytics from all examples (#2670) * chore(docs): Add note that PRs should be submitted against the `develop` branch (#2623) Related to: https://github.com/almende/vis/pull/2618 Related to: https://github.com/almende/vis/pull/2620 * feat(timeline): Change setCustomTimeTitle title parameter to be a string or a function (#2611) * change setCustomTimeTitle title parameter, Now could be an string or a function * Fixed indent and spacing * feat(timeline): refactor tooltip to only use one dom-element (#2662) * feat(network): Allow for image nodes to have a selected or broken image (#2601) * feat(tests): run mocha tests in travis ci (#2687) * Added showX(YZ)Axis options to Graph3d (#2686) * Added showX(YZ)Axis to Graph3d * Added show_Axis options to docs and playground example * Resolved merge conflict * Added show_Axis options to docs and playground example * fix(build): use babel version compatible with webpack@1.14 (#2693) fixes #2685 * feat(docs): use babel preset2015 for custom builds (#2678) * add link to a mentioned example (#2709) * chore(lint): added support for eslint (#2695) * Trivial typo fix in how_to_help doc. (#2714) * fix(timeline): #2598 Flickering onUpdateTimeTooltip (#2702) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Add animation to onUpdateTooltip * fix(timeline): #778 Tooltip does not work with background items in timeline (#2703) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Make items z-index default to 1 * Add initial tests for Timeline PointItem (#2716) * fix(timeline): #2679 TypeError: Cannot read property 'hasOwnProperty' of null (#2735) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Fix bug in item editable * feat(timeline): #2647 Dynamic rolling mode option (#2705) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Add toggleRollingMode option * Update docs with toggleRollingMode option * fixes timestep next issue (#2732) * feat(timeline): added new locales for french and espanol (#2723) * Fix eslint problem on Travis. (#2744) * fix: Range.js "event" is undeclared (#2749) * fix(timeline): #2720 Problems with option editable (#2743) Clean up and centralise edit status for Timeline Items. * feat(network): Improve the performance of the network layout engine (#2729) * Improve the performance of the network layout engine Short-cut the execution of a number of methods in LayoutEngine to make them handle highly-connected graphs better. * Demonstrations of layouts of large networks * Added support to supply an end to bar charts to have them scale (#2760) * Added support to supply an X2 to bar charts to have them scale * Fixed graph2d stacking issue. It no longer takes into account hidden items * Changed x2 to end per recommendation and added this to the docs * Initial tests for timeline ItemSet. (#2750) Somewhat more complicated setup, associated with the need for a real window. * [Timeline] Modify redraw logic to treat scroll as needing restack. (#2774) This addresses #1982 and #1417. It possibly reduces performance, but correctness seems better. * fix(timeline): #2672 Item events original event (#2704) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Fix events returned from mouse events * Fix example * Rename censor to stringifyObject in example * [timeline] Update examples to use ISOString format. (#2791) Resolves #2790 * [timeline] Update serialization example to use ISOString dates. (#2789) Resolves #2696 * added github templates for issues and pull-requests (#2787) fixes #2418 * feat(timeline): Add item data as argument to the template function (#2799) * Fix regression introduced in #2743. (#2796) * Fix for issue #2536 (#2803) * Fix for issue #2536 * Adjusted documentation for fix. * Adjustments due to review * Grrrrr whitespace * Fixed Travis issue * Cheap fix for bug #2795 * Update to PR #2826 to use newline format * Update to gitignore to reflect changes on remote * clean dist folder * Local gitignore update * Just a first example file for the week scale feature * Allowing sourcemap creation * Initial (non-functional) commit to ensure we insert code at the right places (check TODOs) * Functional, not bug-free version which works with locale aware week numbers. * Locale-aware implementation and simplified major labels to a full year * Trying to make the major labels show the correct start date * Working implementation of week numbers using localization. * removing development leftovers * Updated package.json * Reintagrate package.json from accidental deletion * Updates for package.json * Fixing package.json * Integrate the week numbers feature in the documentation. * Reverting local changes to .gitignore * Reverting local changes * Extending examples to cover the case when 1st day of week and 1st day of month align; Fixing display bug so that week numbers are not repeated in minorLabels * Putting the examples into a loop
7 years ago
Implementation of a week scale feature (#3009) * Add Gitter badge (#2179) * do not generate source-maps in distribution version * add 'dist' folder for deployment * added Badges * added codeclimate badge * added @Tooa to the support team * added badges from isitmaintained.com (#2517) * do not ignore dist and test folders in master * generated dist files for v4.18.0 * generated dist files for v4.18.1 * Cheap fix for bug #2795 * Update to PR #2826 to use newline format * changed to v4.18.1-SNAPSHOT * chore(docs): general improvements (#2652) * removed NOTICE file * updated license date range to include 2017 * chore(docs): updated support team members * chore: updated dependencies and devDependencies (#2649) * Fixes instanceof Object statements for objects from other windows and iFrames. (#2631) * Replaces instanceof Object checks with typeof to prevent cross tab issues. * Adds missing space. * chore: removed google-analytics from all examples (#2670) * chore(docs): Add note that PRs should be submitted against the `develop` branch (#2623) Related to: https://github.com/almende/vis/pull/2618 Related to: https://github.com/almende/vis/pull/2620 * feat(timeline): Change setCustomTimeTitle title parameter to be a string or a function (#2611) * change setCustomTimeTitle title parameter, Now could be an string or a function * Fixed indent and spacing * feat(timeline): refactor tooltip to only use one dom-element (#2662) * feat(network): Allow for image nodes to have a selected or broken image (#2601) * feat(tests): run mocha tests in travis ci (#2687) * Added showX(YZ)Axis options to Graph3d (#2686) * Added showX(YZ)Axis to Graph3d * Added show_Axis options to docs and playground example * Resolved merge conflict * Added show_Axis options to docs and playground example * fix(build): use babel version compatible with webpack@1.14 (#2693) fixes #2685 * feat(docs): use babel preset2015 for custom builds (#2678) * add link to a mentioned example (#2709) * chore(lint): added support for eslint (#2695) * Trivial typo fix in how_to_help doc. (#2714) * fix(timeline): #2598 Flickering onUpdateTimeTooltip (#2702) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Add animation to onUpdateTooltip * fix(timeline): #778 Tooltip does not work with background items in timeline (#2703) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Make items z-index default to 1 * Add initial tests for Timeline PointItem (#2716) * fix(timeline): #2679 TypeError: Cannot read property 'hasOwnProperty' of null (#2735) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Fix bug in item editable * feat(timeline): #2647 Dynamic rolling mode option (#2705) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Add toggleRollingMode option * Update docs with toggleRollingMode option * fixes timestep next issue (#2732) * feat(timeline): added new locales for french and espanol (#2723) * Fix eslint problem on Travis. (#2744) * fix: Range.js "event" is undeclared (#2749) * fix(timeline): #2720 Problems with option editable (#2743) Clean up and centralise edit status for Timeline Items. * feat(network): Improve the performance of the network layout engine (#2729) * Improve the performance of the network layout engine Short-cut the execution of a number of methods in LayoutEngine to make them handle highly-connected graphs better. * Demonstrations of layouts of large networks * Added support to supply an end to bar charts to have them scale (#2760) * Added support to supply an X2 to bar charts to have them scale * Fixed graph2d stacking issue. It no longer takes into account hidden items * Changed x2 to end per recommendation and added this to the docs * Initial tests for timeline ItemSet. (#2750) Somewhat more complicated setup, associated with the need for a real window. * [Timeline] Modify redraw logic to treat scroll as needing restack. (#2774) This addresses #1982 and #1417. It possibly reduces performance, but correctness seems better. * fix(timeline): #2672 Item events original event (#2704) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Fix events returned from mouse events * Fix example * Rename censor to stringifyObject in example * [timeline] Update examples to use ISOString format. (#2791) Resolves #2790 * [timeline] Update serialization example to use ISOString dates. (#2789) Resolves #2696 * added github templates for issues and pull-requests (#2787) fixes #2418 * feat(timeline): Add item data as argument to the template function (#2799) * Fix regression introduced in #2743. (#2796) * Fix for issue #2536 (#2803) * Fix for issue #2536 * Adjusted documentation for fix. * Adjustments due to review * Grrrrr whitespace * Fixed Travis issue * Cheap fix for bug #2795 * Update to PR #2826 to use newline format * Update to gitignore to reflect changes on remote * clean dist folder * Local gitignore update * Just a first example file for the week scale feature * Allowing sourcemap creation * Initial (non-functional) commit to ensure we insert code at the right places (check TODOs) * Functional, not bug-free version which works with locale aware week numbers. * Locale-aware implementation and simplified major labels to a full year * Trying to make the major labels show the correct start date * Working implementation of week numbers using localization. * removing development leftovers * Updated package.json * Reintagrate package.json from accidental deletion * Updates for package.json * Fixing package.json * Integrate the week numbers feature in the documentation. * Reverting local changes to .gitignore * Reverting local changes * Extending examples to cover the case when 1st day of week and 1st day of month align; Fixing display bug so that week numbers are not repeated in minorLabels * Putting the examples into a loop
7 years ago
Implementation of a week scale feature (#3009) * Add Gitter badge (#2179) * do not generate source-maps in distribution version * add 'dist' folder for deployment * added Badges * added codeclimate badge * added @Tooa to the support team * added badges from isitmaintained.com (#2517) * do not ignore dist and test folders in master * generated dist files for v4.18.0 * generated dist files for v4.18.1 * Cheap fix for bug #2795 * Update to PR #2826 to use newline format * changed to v4.18.1-SNAPSHOT * chore(docs): general improvements (#2652) * removed NOTICE file * updated license date range to include 2017 * chore(docs): updated support team members * chore: updated dependencies and devDependencies (#2649) * Fixes instanceof Object statements for objects from other windows and iFrames. (#2631) * Replaces instanceof Object checks with typeof to prevent cross tab issues. * Adds missing space. * chore: removed google-analytics from all examples (#2670) * chore(docs): Add note that PRs should be submitted against the `develop` branch (#2623) Related to: https://github.com/almende/vis/pull/2618 Related to: https://github.com/almende/vis/pull/2620 * feat(timeline): Change setCustomTimeTitle title parameter to be a string or a function (#2611) * change setCustomTimeTitle title parameter, Now could be an string or a function * Fixed indent and spacing * feat(timeline): refactor tooltip to only use one dom-element (#2662) * feat(network): Allow for image nodes to have a selected or broken image (#2601) * feat(tests): run mocha tests in travis ci (#2687) * Added showX(YZ)Axis options to Graph3d (#2686) * Added showX(YZ)Axis to Graph3d * Added show_Axis options to docs and playground example * Resolved merge conflict * Added show_Axis options to docs and playground example * fix(build): use babel version compatible with webpack@1.14 (#2693) fixes #2685 * feat(docs): use babel preset2015 for custom builds (#2678) * add link to a mentioned example (#2709) * chore(lint): added support for eslint (#2695) * Trivial typo fix in how_to_help doc. (#2714) * fix(timeline): #2598 Flickering onUpdateTimeTooltip (#2702) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Add animation to onUpdateTooltip * fix(timeline): #778 Tooltip does not work with background items in timeline (#2703) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Make items z-index default to 1 * Add initial tests for Timeline PointItem (#2716) * fix(timeline): #2679 TypeError: Cannot read property 'hasOwnProperty' of null (#2735) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Fix bug in item editable * feat(timeline): #2647 Dynamic rolling mode option (#2705) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Add toggleRollingMode option * Update docs with toggleRollingMode option * fixes timestep next issue (#2732) * feat(timeline): added new locales for french and espanol (#2723) * Fix eslint problem on Travis. (#2744) * fix: Range.js "event" is undeclared (#2749) * fix(timeline): #2720 Problems with option editable (#2743) Clean up and centralise edit status for Timeline Items. * feat(network): Improve the performance of the network layout engine (#2729) * Improve the performance of the network layout engine Short-cut the execution of a number of methods in LayoutEngine to make them handle highly-connected graphs better. * Demonstrations of layouts of large networks * Added support to supply an end to bar charts to have them scale (#2760) * Added support to supply an X2 to bar charts to have them scale * Fixed graph2d stacking issue. It no longer takes into account hidden items * Changed x2 to end per recommendation and added this to the docs * Initial tests for timeline ItemSet. (#2750) Somewhat more complicated setup, associated with the need for a real window. * [Timeline] Modify redraw logic to treat scroll as needing restack. (#2774) This addresses #1982 and #1417. It possibly reduces performance, but correctness seems better. * fix(timeline): #2672 Item events original event (#2704) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Fix events returned from mouse events * Fix example * Rename censor to stringifyObject in example * [timeline] Update examples to use ISOString format. (#2791) Resolves #2790 * [timeline] Update serialization example to use ISOString dates. (#2789) Resolves #2696 * added github templates for issues and pull-requests (#2787) fixes #2418 * feat(timeline): Add item data as argument to the template function (#2799) * Fix regression introduced in #2743. (#2796) * Fix for issue #2536 (#2803) * Fix for issue #2536 * Adjusted documentation for fix. * Adjustments due to review * Grrrrr whitespace * Fixed Travis issue * Cheap fix for bug #2795 * Update to PR #2826 to use newline format * Update to gitignore to reflect changes on remote * clean dist folder * Local gitignore update * Just a first example file for the week scale feature * Allowing sourcemap creation * Initial (non-functional) commit to ensure we insert code at the right places (check TODOs) * Functional, not bug-free version which works with locale aware week numbers. * Locale-aware implementation and simplified major labels to a full year * Trying to make the major labels show the correct start date * Working implementation of week numbers using localization. * removing development leftovers * Updated package.json * Reintagrate package.json from accidental deletion * Updates for package.json * Fixing package.json * Integrate the week numbers feature in the documentation. * Reverting local changes to .gitignore * Reverting local changes * Extending examples to cover the case when 1st day of week and 1st day of month align; Fixing display bug so that week numbers are not repeated in minorLabels * Putting the examples into a loop
7 years ago
Implementation of a week scale feature (#3009) * Add Gitter badge (#2179) * do not generate source-maps in distribution version * add 'dist' folder for deployment * added Badges * added codeclimate badge * added @Tooa to the support team * added badges from isitmaintained.com (#2517) * do not ignore dist and test folders in master * generated dist files for v4.18.0 * generated dist files for v4.18.1 * Cheap fix for bug #2795 * Update to PR #2826 to use newline format * changed to v4.18.1-SNAPSHOT * chore(docs): general improvements (#2652) * removed NOTICE file * updated license date range to include 2017 * chore(docs): updated support team members * chore: updated dependencies and devDependencies (#2649) * Fixes instanceof Object statements for objects from other windows and iFrames. (#2631) * Replaces instanceof Object checks with typeof to prevent cross tab issues. * Adds missing space. * chore: removed google-analytics from all examples (#2670) * chore(docs): Add note that PRs should be submitted against the `develop` branch (#2623) Related to: https://github.com/almende/vis/pull/2618 Related to: https://github.com/almende/vis/pull/2620 * feat(timeline): Change setCustomTimeTitle title parameter to be a string or a function (#2611) * change setCustomTimeTitle title parameter, Now could be an string or a function * Fixed indent and spacing * feat(timeline): refactor tooltip to only use one dom-element (#2662) * feat(network): Allow for image nodes to have a selected or broken image (#2601) * feat(tests): run mocha tests in travis ci (#2687) * Added showX(YZ)Axis options to Graph3d (#2686) * Added showX(YZ)Axis to Graph3d * Added show_Axis options to docs and playground example * Resolved merge conflict * Added show_Axis options to docs and playground example * fix(build): use babel version compatible with webpack@1.14 (#2693) fixes #2685 * feat(docs): use babel preset2015 for custom builds (#2678) * add link to a mentioned example (#2709) * chore(lint): added support for eslint (#2695) * Trivial typo fix in how_to_help doc. (#2714) * fix(timeline): #2598 Flickering onUpdateTimeTooltip (#2702) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Add animation to onUpdateTooltip * fix(timeline): #778 Tooltip does not work with background items in timeline (#2703) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Make items z-index default to 1 * Add initial tests for Timeline PointItem (#2716) * fix(timeline): #2679 TypeError: Cannot read property 'hasOwnProperty' of null (#2735) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Fix bug in item editable * feat(timeline): #2647 Dynamic rolling mode option (#2705) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Add toggleRollingMode option * Update docs with toggleRollingMode option * fixes timestep next issue (#2732) * feat(timeline): added new locales for french and espanol (#2723) * Fix eslint problem on Travis. (#2744) * fix: Range.js "event" is undeclared (#2749) * fix(timeline): #2720 Problems with option editable (#2743) Clean up and centralise edit status for Timeline Items. * feat(network): Improve the performance of the network layout engine (#2729) * Improve the performance of the network layout engine Short-cut the execution of a number of methods in LayoutEngine to make them handle highly-connected graphs better. * Demonstrations of layouts of large networks * Added support to supply an end to bar charts to have them scale (#2760) * Added support to supply an X2 to bar charts to have them scale * Fixed graph2d stacking issue. It no longer takes into account hidden items * Changed x2 to end per recommendation and added this to the docs * Initial tests for timeline ItemSet. (#2750) Somewhat more complicated setup, associated with the need for a real window. * [Timeline] Modify redraw logic to treat scroll as needing restack. (#2774) This addresses #1982 and #1417. It possibly reduces performance, but correctness seems better. * fix(timeline): #2672 Item events original event (#2704) * Fix redraw order * Fix error when option is not defined * Allow template labels * Add .travis.yml file * Add experiment travis code * Fix react example * Fix events returned from mouse events * Fix example * Rename censor to stringifyObject in example * [timeline] Update examples to use ISOString format. (#2791) Resolves #2790 * [timeline] Update serialization example to use ISOString dates. (#2789) Resolves #2696 * added github templates for issues and pull-requests (#2787) fixes #2418 * feat(timeline): Add item data as argument to the template function (#2799) * Fix regression introduced in #2743. (#2796) * Fix for issue #2536 (#2803) * Fix for issue #2536 * Adjusted documentation for fix. * Adjustments due to review * Grrrrr whitespace * Fixed Travis issue * Cheap fix for bug #2795 * Update to PR #2826 to use newline format * Update to gitignore to reflect changes on remote * clean dist folder * Local gitignore update * Just a first example file for the week scale feature * Allowing sourcemap creation * Initial (non-functional) commit to ensure we insert code at the right places (check TODOs) * Functional, not bug-free version which works with locale aware week numbers. * Locale-aware implementation and simplified major labels to a full year * Trying to make the major labels show the correct start date * Working implementation of week numbers using localization. * removing development leftovers * Updated package.json * Reintagrate package.json from accidental deletion * Updates for package.json * Fixing package.json * Integrate the week numbers feature in the documentation. * Reverting local changes to .gitignore * Reverting local changes * Extending examples to cover the case when 1st day of week and 1st day of month align; Fixing display bug so that week numbers are not repeated in minorLabels * Putting the examples into a loop
7 years ago
  1. /**
  2. * This object contains all possible options. It will check if the types are correct, if required if the option is one
  3. * of the allowed values.
  4. *
  5. * __any__ means that the name of the property does not matter.
  6. * __type__ is a required field for all objects and contains the allowed types of all objects
  7. */
  8. let string = 'string';
  9. let bool = 'boolean';
  10. let number = 'number';
  11. let array = 'array';
  12. let date = 'date';
  13. let object = 'object'; // should only be in a __type__ property
  14. let dom = 'dom';
  15. let moment = 'moment';
  16. let any = 'any';
  17. let allOptions = {
  18. configure: {
  19. enabled: { 'boolean': bool},
  20. filter: { 'boolean': bool,'function': 'function'},
  21. container: {dom},
  22. __type__: {object, 'boolean': bool,'function': 'function'}
  23. },
  24. //globals :
  25. align: {string},
  26. alignCurrentTime: {string, 'undefined': 'undefined'},
  27. rtl: { 'boolean': bool, 'undefined': 'undefined'},
  28. rollingMode: {
  29. follow: { 'boolean': bool },
  30. offset: {number,'undefined': 'undefined'},
  31. __type__: {object}
  32. },
  33. onTimeout: {
  34. timeoutMs: {number},
  35. callback: {'function': 'function'},
  36. __type__: {object}
  37. },
  38. verticalScroll: { 'boolean': bool, 'undefined': 'undefined'},
  39. horizontalScroll: { 'boolean': bool, 'undefined': 'undefined'},
  40. autoResize: { 'boolean': bool},
  41. throttleRedraw: {number}, // TODO: DEPRICATED see https://github.com/almende/vis/issues/2511
  42. clickToUse: { 'boolean': bool},
  43. dataAttributes: {string, array},
  44. editable: {
  45. add: { 'boolean': bool, 'undefined': 'undefined'},
  46. remove: { 'boolean': bool, 'undefined': 'undefined'},
  47. updateGroup: { 'boolean': bool, 'undefined': 'undefined'},
  48. updateTime: { 'boolean': bool, 'undefined': 'undefined'},
  49. overrideItems: { 'boolean': bool, 'undefined': 'undefined'},
  50. __type__: { 'boolean': bool, object}
  51. },
  52. end: {number, date, string, moment},
  53. format: {
  54. minorLabels: {
  55. millisecond: {string,'undefined': 'undefined'},
  56. second: {string,'undefined': 'undefined'},
  57. minute: {string,'undefined': 'undefined'},
  58. hour: {string,'undefined': 'undefined'},
  59. weekday: {string,'undefined': 'undefined'},
  60. day: {string,'undefined': 'undefined'},
  61. week: {string,'undefined': 'undefined'},
  62. month: {string,'undefined': 'undefined'},
  63. quarter: {string,'undefined': 'undefined'},
  64. year: {string,'undefined': 'undefined'},
  65. __type__: {object, 'function': 'function'}
  66. },
  67. majorLabels: {
  68. millisecond: {string,'undefined': 'undefined'},
  69. second: {string,'undefined': 'undefined'},
  70. minute: {string,'undefined': 'undefined'},
  71. hour: {string,'undefined': 'undefined'},
  72. weekday: {string,'undefined': 'undefined'},
  73. day: {string,'undefined': 'undefined'},
  74. week: {string,'undefined': 'undefined'},
  75. month: {string,'undefined': 'undefined'},
  76. quarter: {string,'undefined': 'undefined'},
  77. year: {string,'undefined': 'undefined'},
  78. __type__: {object, 'function': 'function'}
  79. },
  80. __type__: {object}
  81. },
  82. moment: {'function': 'function'},
  83. groupHeightMode: {string},
  84. groupLabelDirection: {string},
  85. groupOrder: {string, 'function': 'function'},
  86. groupEditable: {
  87. add: { 'boolean': bool, 'undefined': 'undefined'},
  88. remove: { 'boolean': bool, 'undefined': 'undefined'},
  89. order: { 'boolean': bool, 'undefined': 'undefined'},
  90. __type__: { 'boolean': bool, object}
  91. },
  92. groupOrderSwap: {'function': 'function'},
  93. height: {string, number},
  94. hiddenDates: {
  95. start: {date, number, string, moment},
  96. end: {date, number, string, moment},
  97. repeat: {string},
  98. __type__: {object, array}
  99. },
  100. itemsAlwaysDraggable: {
  101. item: { 'boolean': bool, 'undefined': 'undefined'},
  102. range: { 'boolean': bool, 'undefined': 'undefined'},
  103. __type__: { 'boolean': bool, object}
  104. },
  105. limitSize: {'boolean': bool},
  106. locale:{string},
  107. locales:{
  108. __any__: {any},
  109. __type__: {object}
  110. },
  111. margin: {
  112. axis: {number},
  113. item: {
  114. horizontal: {number,'undefined': 'undefined'},
  115. vertical: {number,'undefined': 'undefined'},
  116. __type__: {object,number}
  117. },
  118. __type__: {object,number}
  119. },
  120. max: {date, number, string, moment},
  121. maxHeight: {number, string},
  122. maxMinorChars: {number},
  123. min: {date, number, string, moment},
  124. minHeight: {number, string},
  125. moveable: { 'boolean': bool},
  126. multiselect: { 'boolean': bool},
  127. multiselectPerGroup: { 'boolean': bool},
  128. onAdd: {'function': 'function'},
  129. onDropObjectOnItem: {'function': 'function'},
  130. onUpdate: {'function': 'function'},
  131. onMove: {'function': 'function'},
  132. onMoving: {'function': 'function'},
  133. onRemove: {'function': 'function'},
  134. onAddGroup: {'function': 'function'},
  135. onMoveGroup: {'function': 'function'},
  136. onRemoveGroup: {'function': 'function'},
  137. onInitialDrawComplete: {'function': 'function'},
  138. order: {'function': 'function'},
  139. orientation: {
  140. axis: {string,'undefined': 'undefined'},
  141. item: {string,'undefined': 'undefined'},
  142. __type__: {string, object}
  143. },
  144. selectable: { 'boolean': bool},
  145. showCurrentTime: { 'boolean': bool},
  146. showMajorLabels: { 'boolean': bool},
  147. showMinorLabels: { 'boolean': bool},
  148. stack: { 'boolean': bool},
  149. stackSubgroups: { 'boolean': bool},
  150. snap: {'function': 'function', 'null': 'null'},
  151. start: {date, number, string, moment},
  152. template: {'function': 'function'},
  153. loadingScreenTemplate: {'function': 'function'},
  154. groupTemplate: {'function': 'function'},
  155. visibleFrameTemplate: {string, 'function': 'function'},
  156. showTooltips: { 'boolean': bool},
  157. tooltip: {
  158. followMouse: { 'boolean': bool },
  159. overflowMethod: { 'string': ['cap', 'flip'] },
  160. __type__: {object}
  161. },
  162. tooltipOnItemUpdateTime: {
  163. template: {'function': 'function'},
  164. __type__: { 'boolean': bool, object}
  165. },
  166. timeAxis: {
  167. scale: {string,'undefined': 'undefined'},
  168. step: {number,'undefined': 'undefined'},
  169. __type__: {object}
  170. },
  171. type: {string},
  172. width: {string, number},
  173. zoomable: { 'boolean': bool},
  174. zoomKey: {string: ['ctrlKey', 'altKey', 'metaKey', '']},
  175. zoomMax: {number},
  176. zoomMin: {number},
  177. __type__: {object}
  178. };
  179. let configureOptions = {
  180. global: {
  181. align: ['center', 'left', 'right'],
  182. alignCurrentTime: ['none', 'year', 'month', 'quarter', 'week', 'isoWeek', 'day', 'date', 'hour', 'minute', 'second'],
  183. direction: false,
  184. autoResize: true,
  185. clickToUse: false,
  186. // dataAttributes: ['all'], // FIXME: can be 'all' or string[]
  187. editable: {
  188. add: false,
  189. remove: false,
  190. updateGroup: false,
  191. updateTime: false
  192. },
  193. end: '',
  194. format: {
  195. minorLabels: {
  196. millisecond:'SSS',
  197. second: 's',
  198. minute: 'HH:mm',
  199. hour: 'HH:mm',
  200. weekday: 'ddd D',
  201. day: 'D',
  202. week: 'w',
  203. month: 'MMM',
  204. quarter: '[Q]Q',
  205. year: 'YYYY'
  206. },
  207. majorLabels: {
  208. millisecond:'HH:mm:ss',
  209. second: 'D MMMM HH:mm',
  210. minute: 'ddd D MMMM',
  211. hour: 'ddd D MMMM',
  212. weekday: 'MMMM YYYY',
  213. day: 'MMMM YYYY',
  214. week: 'MMMM YYYY',
  215. month: 'YYYY',
  216. quarter: 'YYYY',
  217. year: ''
  218. }
  219. },
  220. groupHeightMode: ['auto', 'fixed'],
  221. groupLabelDirection: ['horizontal', 'vertical'],
  222. //groupOrder: {string, 'function': 'function'},
  223. groupsDraggable: false,
  224. height: '',
  225. //hiddenDates: {object, array},
  226. locale: '',
  227. margin: {
  228. axis: [20, 0, 100, 1],
  229. item: {
  230. horizontal: [10, 0, 100, 1],
  231. vertical: [10, 0, 100, 1]
  232. }
  233. },
  234. max: '',
  235. maxHeight: '',
  236. maxMinorChars: [7, 0, 20, 1],
  237. min: '',
  238. minHeight: '',
  239. moveable: false,
  240. multiselect: false,
  241. multiselectPerGroup: false,
  242. //onAdd: {'function': 'function'},
  243. //onUpdate: {'function': 'function'},
  244. //onMove: {'function': 'function'},
  245. //onMoving: {'function': 'function'},
  246. //onRename: {'function': 'function'},
  247. //order: {'function': 'function'},
  248. orientation: {
  249. axis: ['both', 'bottom', 'top'],
  250. item: ['bottom', 'top']
  251. },
  252. selectable: true,
  253. showCurrentTime: false,
  254. showMajorLabels: true,
  255. showMinorLabels: true,
  256. stack: true,
  257. stackSubgroups: true,
  258. //snap: {'function': 'function', nada},
  259. start: '',
  260. //template: {'function': 'function'},
  261. //timeAxis: {
  262. // scale: ['millisecond', 'second', 'minute', 'hour', 'weekday', 'day', 'week', 'month', 'quarter', 'year'],
  263. // step: [1, 1, 10, 1]
  264. //},
  265. showTooltips: true,
  266. tooltip: {
  267. followMouse: false,
  268. overflowMethod: 'flip'
  269. },
  270. tooltipOnItemUpdateTime: false,
  271. type: ['box', 'point', 'range', 'background'],
  272. width: '100%',
  273. zoomable: true,
  274. zoomKey: ['ctrlKey', 'altKey', 'metaKey', ''],
  275. zoomMax: [315360000000000, 10, 315360000000000, 1],
  276. zoomMin: [10, 10, 315360000000000, 1]
  277. }
  278. };
  279. export {allOptions, configureOptions};