visjs-rails 4.16.1.0 → 4.21.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +19 -19
- data/example/.gitignore +26 -0
- data/example/.ruby-version +1 -0
- data/example/Gemfile +64 -0
- data/example/Gemfile.lock +224 -0
- data/example/README.md +24 -0
- data/example/Rakefile +6 -0
- data/example/app/assets/config/manifest.js +3 -0
- data/example/app/assets/images/.keep +0 -0
- data/example/app/assets/javascripts/application.js +20 -0
- data/example/app/assets/javascripts/cable.js +13 -0
- data/example/app/assets/javascripts/channels/.keep +0 -0
- data/example/app/assets/javascripts/welcome.coffee +6 -0
- data/example/app/assets/stylesheets/application.scss +3 -0
- data/example/app/assets/stylesheets/welcome.scss +3 -0
- data/example/app/channels/application_cable/channel.rb +4 -0
- data/example/app/channels/application_cable/connection.rb +4 -0
- data/example/app/controllers/application_controller.rb +2 -0
- data/example/app/controllers/concerns/.keep +0 -0
- data/example/app/controllers/welcome_controller.rb +4 -0
- data/example/app/helpers/application_helper.rb +2 -0
- data/example/app/helpers/welcome_helper.rb +2 -0
- data/example/app/jobs/application_job.rb +2 -0
- data/example/app/mailers/application_mailer.rb +4 -0
- data/example/app/models/application_record.rb +3 -0
- data/example/app/models/concerns/.keep +0 -0
- data/example/app/views/layouts/application.html.erb +15 -0
- data/example/app/views/layouts/mailer.html.erb +13 -0
- data/example/app/views/layouts/mailer.text.erb +1 -0
- data/example/app/views/welcome/index.html.erb +48 -0
- data/example/bin/bundle +3 -0
- data/example/bin/rails +9 -0
- data/example/bin/rake +9 -0
- data/example/bin/setup +36 -0
- data/example/bin/spring +17 -0
- data/example/bin/update +31 -0
- data/example/bin/yarn +11 -0
- data/example/config.ru +5 -0
- data/example/config/application.rb +19 -0
- data/example/config/boot.rb +4 -0
- data/example/config/cable.yml +10 -0
- data/example/config/credentials.yml.enc +1 -0
- data/example/config/database.yml +85 -0
- data/example/config/environment.rb +5 -0
- data/example/config/environments/development.rb +61 -0
- data/example/config/environments/production.rb +94 -0
- data/example/config/environments/test.rb +46 -0
- data/example/config/initializers/application_controller_renderer.rb +8 -0
- data/example/config/initializers/assets.rb +14 -0
- data/example/config/initializers/backtrace_silencers.rb +7 -0
- data/example/config/initializers/content_security_policy.rb +25 -0
- data/example/config/initializers/cookies_serializer.rb +5 -0
- data/example/config/initializers/filter_parameter_logging.rb +4 -0
- data/example/config/initializers/inflections.rb +16 -0
- data/example/config/initializers/mime_types.rb +4 -0
- data/example/config/initializers/wrap_parameters.rb +14 -0
- data/example/config/locales/en.yml +33 -0
- data/example/config/puma.rb +34 -0
- data/example/config/routes.rb +5 -0
- data/example/config/spring.rb +6 -0
- data/example/config/storage.yml +34 -0
- data/example/db/seeds.rb +7 -0
- data/example/lib/assets/.keep +0 -0
- data/example/lib/tasks/.keep +0 -0
- data/example/log/.keep +0 -0
- data/example/package.json +5 -0
- data/example/public/404.html +67 -0
- data/example/public/422.html +67 -0
- data/example/public/500.html +66 -0
- data/example/public/apple-touch-icon-precomposed.png +0 -0
- data/example/public/apple-touch-icon.png +0 -0
- data/example/public/favicon.ico +0 -0
- data/example/public/robots.txt +1 -0
- data/example/test/application_system_test_case.rb +5 -0
- data/example/test/controllers/.keep +0 -0
- data/example/test/controllers/welcome_controller_test.rb +9 -0
- data/example/test/fixtures/.keep +0 -0
- data/example/test/fixtures/files/.keep +0 -0
- data/example/test/helpers/.keep +0 -0
- data/example/test/integration/.keep +0 -0
- data/example/test/mailers/.keep +0 -0
- data/example/test/models/.keep +0 -0
- data/example/test/system/.keep +0 -0
- data/example/test/test_helper.rb +10 -0
- data/example/tmp/.keep +0 -0
- data/example/vendor/.keep +0 -0
- data/examples_for_vis/graph2d/01_basic.html +71 -0
- data/examples_for_vis/graph2d/02_bars.html +80 -0
- data/examples_for_vis/graph2d/03_groups.html +112 -0
- data/examples_for_vis/graph2d/04_rightAxis.html +126 -0
- data/examples_for_vis/graph2d/05_bothAxis.html +228 -0
- data/examples_for_vis/graph2d/06_interpolation.html +160 -0
- data/examples_for_vis/graph2d/07_scrollingAndSorting.html +74 -0
- data/examples_for_vis/graph2d/08_performance.html +194 -0
- data/examples_for_vis/graph2d/09_external_legend.html +452 -0
- data/examples_for_vis/graph2d/10_barsSideBySide.html +75 -0
- data/examples_for_vis/graph2d/11_barsSideBySideGroups.html +181 -0
- data/examples_for_vis/graph2d/12_customRange.html +92 -0
- data/examples_for_vis/graph2d/13_localization.html +65 -0
- data/examples_for_vis/graph2d/14_toggleGroups.html +145 -0
- data/examples_for_vis/graph2d/15_streaming_data.html +122 -0
- data/examples_for_vis/graph2d/16_bothAxisTitles.html +201 -0
- data/examples_for_vis/graph2d/17_dynamicStyling.html +281 -0
- data/examples_for_vis/graph2d/18_scatterplot.html +63 -0
- data/examples_for_vis/graph2d/19_labels.html +213 -0
- data/examples_for_vis/graph2d/20_shading.html +218 -0
- data/examples_for_vis/graph2d/21_barsWithEnd.html +76 -0
- data/examples_for_vis/graph2d/default.css +87 -0
- data/examples_for_vis/graph3d/01_basics.html +71 -0
- data/examples_for_vis/graph3d/02_camera.html +110 -0
- data/examples_for_vis/graph3d/03_filter_data.html +64 -0
- data/examples_for_vis/graph3d/04_animation.html +70 -0
- data/examples_for_vis/graph3d/05_line.html +60 -0
- data/examples_for_vis/graph3d/06_moving_dots.html +78 -0
- data/examples_for_vis/graph3d/07_dot_cloud_colors.html +72 -0
- data/examples_for_vis/graph3d/08_dot_cloud_size.html +69 -0
- data/examples_for_vis/graph3d/09_mobile.html +79 -0
- data/examples_for_vis/graph3d/10_styling.html +121 -0
- data/examples_for_vis/graph3d/11_tooltips.html +132 -0
- data/examples_for_vis/graph3d/12_custom_labels.html +116 -0
- data/examples_for_vis/graph3d/default.css +87 -0
- data/examples_for_vis/graph3d/playground/csv2array.js +120 -0
- data/examples_for_vis/graph3d/playground/csv2datatable.html +80 -0
- data/examples_for_vis/graph3d/playground/datasource.html +173 -0
- data/examples_for_vis/graph3d/playground/datasource.php +155 -0
- data/examples_for_vis/graph3d/playground/index.html +196 -0
- data/examples_for_vis/graph3d/playground/playground.css +91 -0
- data/examples_for_vis/graph3d/playground/playground.js +550 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-apollo.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-css.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-hs.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-lisp.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-lua.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-ml.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-proto.js +1 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-scala.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-sql.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-vb.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-vhdl.js +3 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-wiki.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/lang-yaml.js +2 -0
- data/examples_for_vis/graph3d/playground/prettify/prettify.css +1 -0
- data/examples_for_vis/graph3d/playground/prettify/prettify.js +33 -0
- data/examples_for_vis/network/basicUsage.html +87 -0
- data/examples_for_vis/network/data/datasets.html +196 -0
- data/examples_for_vis/network/data/dotLanguage/data/cellular_automata.gv.txt +23 -0
- data/examples_for_vis/network/data/dotLanguage/data/computer_network.gv.txt +19 -0
- data/examples_for_vis/network/data/dotLanguage/data/simple.gv.txt +15 -0
- data/examples_for_vis/network/data/dotLanguage/dotEdgeStyles.html +197 -0
- data/examples_for_vis/network/data/dotLanguage/dotLanguage.html +22 -0
- data/examples_for_vis/network/data/dotLanguage/dotPlayground.html +216 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/fsm.gv.txt +20 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/hello.gv.txt +1 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/process.gv.txt +15 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/screenshots/fsm.png +0 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/screenshots/hello.png +0 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/screenshots/softmaint.png +0 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/screenshots/traffic_lights.png +0 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/siblings.gv.txt +512 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/softmaint.gv.txt +377 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/traffic_lights.gv.txt +29 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/transparency.gv.txt +105 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/twopi2.gv.txt +2212 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/unix.gv.txt +55 -0
- data/examples_for_vis/network/data/dotLanguage/graphvizGallery/world.gv.txt +67 -0
- data/examples_for_vis/network/data/dynamicData.html +266 -0
- data/examples_for_vis/network/data/importingFromGephi.html +174 -0
- data/examples_for_vis/network/data/scalingCustom.html +86 -0
- data/examples_for_vis/network/data/scalingNodesEdges.html +79 -0
- data/examples_for_vis/network/data/scalingNodesEdgesLabels.html +85 -0
- data/examples_for_vis/network/datasources/WorldCup2014.js +9970 -0
- data/examples_for_vis/network/datasources/WorldCup2014.json +1 -0
- data/examples_for_vis/network/datasources/largeHierarchicalDataset.js +2 -0
- data/examples_for_vis/network/edgeStyles/arrowTypes.html +103 -0
- data/examples_for_vis/network/edgeStyles/arrows.html +61 -0
- data/examples_for_vis/network/edgeStyles/colors.html +71 -0
- data/examples_for_vis/network/edgeStyles/dashes.html +57 -0
- data/examples_for_vis/network/edgeStyles/smooth.html +78 -0
- data/examples_for_vis/network/edgeStyles/smoothWorldCup.html +97 -0
- data/examples_for_vis/network/events/interactionEvents.html +132 -0
- data/examples_for_vis/network/events/physicsEvents.html +73 -0
- data/examples_for_vis/network/events/renderEvents.html +83 -0
- data/examples_for_vis/network/exampleApplications/disassemblerExample.html +24 -0
- data/examples_for_vis/network/exampleApplications/disassemblerExample.js +53 -0
- data/examples_for_vis/network/exampleApplications/lesMiserables.html +396 -0
- data/examples_for_vis/network/exampleApplications/loadingBar.html +504 -0
- data/examples_for_vis/network/exampleApplications/neighbourhoodHighlight.html +162 -0
- data/examples_for_vis/network/exampleApplications/nodeLegend.html +163 -0
- data/examples_for_vis/network/exampleApplications/worldCupPerformance.html +98 -0
- data/examples_for_vis/network/exampleUtil.js +133 -0
- data/examples_for_vis/network/imageSelected/broken-image.png +0 -0
- data/examples_for_vis/network/imageSelected/imageSelected.html +82 -0
- data/examples_for_vis/network/imageSelected/selected.svg +53 -0
- data/examples_for_vis/network/imageSelected/unselected.svg +6 -0
- data/examples_for_vis/network/img/indonesia/1.png +0 -0
- data/examples_for_vis/network/img/indonesia/10.png +0 -0
- data/examples_for_vis/network/img/indonesia/11.png +0 -0
- data/examples_for_vis/network/img/indonesia/12.png +0 -0
- data/examples_for_vis/network/img/indonesia/13.png +0 -0
- data/examples_for_vis/network/img/indonesia/14.png +0 -0
- data/examples_for_vis/network/img/indonesia/2.png +0 -0
- data/examples_for_vis/network/img/indonesia/3.png +0 -0
- data/examples_for_vis/network/img/indonesia/4.png +0 -0
- data/examples_for_vis/network/img/indonesia/5.png +0 -0
- data/examples_for_vis/network/img/indonesia/6.png +0 -0
- data/examples_for_vis/network/img/indonesia/7.png +0 -0
- data/examples_for_vis/network/img/indonesia/8.png +0 -0
- data/examples_for_vis/network/img/indonesia/9.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-Fax-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-Laptop-1-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-Mobile-Phone-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-Computer-3-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-PDA-02-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-PDA-04-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-PDA-05-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-My-Phone-Picture-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Hardware-Printer-Blue-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Misc-Scanner-default-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Network-Drive-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Network-Internet-Connection-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/Network-Pipe-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/System-Firewall-2-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/System-Globe-icon.png +0 -0
- data/examples_for_vis/network/img/refresh-cl/license.txt +14 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Document-icon24.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Document-icon32.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Document-icon48.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Email-icon24.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Email-icon32.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Email-icon48.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Folder-icon24.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Folder-icon32.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Folder-icon48.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Folder-icon64.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Smiley-Angry-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/Smiley-Grin-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Administrator-Blue-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Administrator-Green-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Coat-Blue-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Coat-Green-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Coat-Red-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Executive-Green-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Preppy-Blue-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/User-Preppy-Red-icon.png +0 -0
- data/examples_for_vis/network/img/soft-scraps-icons/license.txt +12 -0
- data/examples_for_vis/network/labels/labelAlignment.html +70 -0
- data/examples_for_vis/network/labels/labelBackground.html +57 -0
- data/examples_for_vis/network/labels/labelColorAndSize.html +61 -0
- data/examples_for_vis/network/labels/labelMargins.html +63 -0
- data/examples_for_vis/network/labels/labelMultifont.html +115 -0
- data/examples_for_vis/network/labels/labelStroke.html +61 -0
- data/examples_for_vis/network/labels/multilineText.html +52 -0
- data/examples_for_vis/network/layout/demo.jsonp +1894 -0
- data/examples_for_vis/network/layout/demo_big.jsonp +3762 -0
- data/examples_for_vis/network/layout/hierarchicalLayout.html +114 -0
- data/examples_for_vis/network/layout/hierarchicalLayoutBigUserDefined.html +46 -0
- data/examples_for_vis/network/layout/hierarchicalLayoutMethods.html +108 -0
- data/examples_for_vis/network/layout/hierarchicalLayoutUserdefined.html +152 -0
- data/examples_for_vis/network/layout/hierarchicalLayoutWithoutPhysics.html +111 -0
- data/examples_for_vis/network/layout/randomSeed.html +60 -0
- data/examples_for_vis/network/nodeStyles/HTMLInNodes.html +83 -0
- data/examples_for_vis/network/nodeStyles/circularImages.html +219 -0
- data/examples_for_vis/network/nodeStyles/colors.html +140 -0
- data/examples_for_vis/network/nodeStyles/customGroups.html +132 -0
- data/examples_for_vis/network/nodeStyles/groups.html +119 -0
- data/examples_for_vis/network/nodeStyles/icons.html +196 -0
- data/examples_for_vis/network/nodeStyles/images.html +82 -0
- data/examples_for_vis/network/nodeStyles/imagesWithBorders.html +105 -0
- data/examples_for_vis/network/nodeStyles/shadows.html +119 -0
- data/examples_for_vis/network/nodeStyles/shapes.html +73 -0
- data/examples_for_vis/network/nodeStyles/shapesWithDashedBorders.html +61 -0
- data/examples_for_vis/network/nodeStyles/widthHeight.html +121 -0
- data/examples_for_vis/network/other/animationShowcase.html +279 -0
- data/examples_for_vis/network/other/changingClusteredEdgesNodes.html +107 -0
- data/examples_for_vis/network/other/chosen.html +466 -0
- data/examples_for_vis/network/other/clustering.html +141 -0
- data/examples_for_vis/network/other/clusteringByZoom.html +160 -0
- data/examples_for_vis/network/other/clustersOfclusters.html +88 -0
- data/examples_for_vis/network/other/configuration.html +83 -0
- data/examples_for_vis/network/other/cursorChange.html +140 -0
- data/examples_for_vis/network/other/manipulation.html +193 -0
- data/examples_for_vis/network/other/manipulationEditEdgeNoDrag.html +255 -0
- data/examples_for_vis/network/other/navigation.html +135 -0
- data/examples_for_vis/network/other/onLoadAnimation.html +85 -0
- data/examples_for_vis/network/other/performance.html +91 -0
- data/examples_for_vis/network/other/saveAndLoad.html +202 -0
- data/examples_for_vis/network/physics/physicsConfiguration.html +85 -0
- data/examples_for_vis/timeline/basicUsage.html +45 -0
- data/examples_for_vis/timeline/dataHandling/dataSerialization.html +123 -0
- data/examples_for_vis/timeline/dataHandling/loadExternalData.html +61 -0
- data/examples_for_vis/timeline/editing/customSnappingOfItems.html +76 -0
- data/examples_for_vis/timeline/editing/editingItems.html +109 -0
- data/examples_for_vis/timeline/editing/editingItemsCallbacks.html +172 -0
- data/examples_for_vis/timeline/editing/individualEditableItems.html +131 -0
- data/examples_for_vis/timeline/editing/itemsAlwaysDraggable.html +44 -0
- data/examples_for_vis/timeline/editing/overrideEditingItems.html +166 -0
- data/examples_for_vis/timeline/editing/tooltipOnItemChange.html +133 -0
- data/examples_for_vis/timeline/editing/updateDataOnEvent.html +87 -0
- data/examples_for_vis/timeline/groups/groups.html +79 -0
- data/examples_for_vis/timeline/groups/groupsEditable.html +2001 -0
- data/examples_for_vis/timeline/groups/groupsOrdering.html +117 -0
- data/examples_for_vis/timeline/groups/nestedGroups.html +113 -0
- data/examples_for_vis/timeline/groups/subgroups.html +326 -0
- data/examples_for_vis/timeline/groups/verticalItemsHide.html +196 -0
- data/examples_for_vis/timeline/interaction/animateWindow.html +143 -0
- data/examples_for_vis/timeline/interaction/clickToUse.html +107 -0
- data/examples_for_vis/timeline/interaction/eventListeners.html +166 -0
- data/examples_for_vis/timeline/interaction/limitMoveAndZoom.html +70 -0
- data/examples_for_vis/timeline/interaction/navigationMenu.html +121 -0
- data/examples_for_vis/timeline/interaction/rollingMode.html +50 -0
- data/examples_for_vis/timeline/interaction/setSelection.html +223 -0
- data/examples_for_vis/timeline/items/backgroundAreas.html +92 -0
- data/examples_for_vis/timeline/items/backgroundAreasWithGroups.html +123 -0
- data/examples_for_vis/timeline/items/expectedVsActualTimesItems.html +136 -0
- data/examples_for_vis/timeline/items/htmlContents.html +109 -0
- data/examples_for_vis/timeline/items/itemOrdering.html +88 -0
- data/examples_for_vis/timeline/items/pointItems.html +124 -0
- data/examples_for_vis/timeline/items/rangeOverflowItem.html +88 -0
- data/examples_for_vis/timeline/items/tooltip.html +120 -0
- data/examples_for_vis/timeline/items/visibleFrameTemplateContent.html +67 -0
- data/examples_for_vis/timeline/other/customTimeBars.html +99 -0
- data/examples_for_vis/timeline/other/customTimeBarsTooltip.html +105 -0
- data/examples_for_vis/timeline/other/dataAttributes.html +79 -0
- data/examples_for_vis/timeline/other/dataAttributesAll.html +78 -0
- data/examples_for_vis/timeline/other/drag&drop.html +201 -0
- data/examples_for_vis/timeline/other/functionLabelFormats.html +147 -0
- data/examples_for_vis/timeline/other/groupsPerformance.html +124 -0
- data/examples_for_vis/timeline/other/hidingPeriods.html +92 -0
- data/examples_for_vis/timeline/other/horizontalScroll.html +77 -0
- data/examples_for_vis/timeline/other/localization.html +81 -0
- data/examples_for_vis/timeline/other/performance.html +79 -0
- data/examples_for_vis/timeline/other/requirejs/requirejs_example.html +17 -0
- data/examples_for_vis/timeline/other/requirejs/scripts/main.js +19 -0
- data/examples_for_vis/timeline/other/requirejs/scripts/require.js +35 -0
- data/examples_for_vis/timeline/other/rtl.html +82 -0
- data/examples_for_vis/timeline/other/stressPerformance.html +66 -0
- data/examples_for_vis/timeline/other/timezone.html +98 -0
- data/examples_for_vis/timeline/other/usingReact.html +68 -0
- data/examples_for_vis/timeline/other/verticalScroll.html +91 -0
- data/examples_for_vis/timeline/resources/data/basic.json +34 -0
- data/examples_for_vis/timeline/resources/data/wk2014.json +152 -0
- data/examples_for_vis/timeline/resources/img/Hardware-Mobile-Phone-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/attachment-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/blog-post-edit-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/comments-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/community-users-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/license.txt +17 -0
- data/examples_for_vis/timeline/resources/img/license_aesthetica-2.txt +36 -0
- data/examples_for_vis/timeline/resources/img/license_refresh-cl.txt +26 -0
- data/examples_for_vis/timeline/resources/img/mail-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/notes-edit-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/product-icon.png +0 -0
- data/examples_for_vis/timeline/resources/img/truck-icon.png +0 -0
- data/examples_for_vis/timeline/styling/axisOrientation.html +113 -0
- data/examples_for_vis/timeline/styling/customCss.html +128 -0
- data/examples_for_vis/timeline/styling/gridStyling.html +80 -0
- data/examples_for_vis/timeline/styling/itemClassNames.html +125 -0
- data/examples_for_vis/timeline/styling/itemTemplates.html +264 -0
- data/examples_for_vis/timeline/styling/weekStyling.html +129 -0
- data/lib/visjs/rails/version.rb +1 -1
- data/vendor/assets/images/network/acceptDeleteIcon.png +0 -0
- data/vendor/assets/images/network/addNodeIcon.png +0 -0
- data/vendor/assets/images/network/backIcon.png +0 -0
- data/vendor/assets/images/network/connectIcon.png +0 -0
- data/vendor/assets/images/network/cross.png +0 -0
- data/vendor/assets/images/network/cross2.png +0 -0
- data/vendor/assets/images/network/deleteIcon.png +0 -0
- data/vendor/assets/images/network/downArrow.png +0 -0
- data/vendor/assets/images/network/editIcon.png +0 -0
- data/vendor/assets/images/network/leftArrow.png +0 -0
- data/vendor/assets/images/network/minus.png +0 -0
- data/vendor/assets/images/network/plus.png +0 -0
- data/vendor/assets/images/network/rightArrow.png +0 -0
- data/vendor/assets/images/network/upArrow.png +0 -0
- data/vendor/assets/images/network/zoomExtends.png +0 -0
- data/vendor/assets/javascripts/vis-graph3d.min.js +9 -12
- data/vendor/assets/javascripts/vis-network.min.js +9 -20
- data/vendor/assets/javascripts/vis-timeline-graph2d.min.js +9 -18
- data/vendor/assets/javascripts/vis.js +53293 -39579
- data/vendor/assets/javascripts/vis.min.js +26 -23
- data/vendor/assets/stylesheets/vis-network.min.css +1 -0
- data/vendor/assets/stylesheets/vis-timeline-graph2d.min.css +1 -0
- data/vendor/assets/stylesheets/{vis.scss → vis.css} +764 -640
- data/vendor/assets/stylesheets/vis.min.css +1 -0
- metadata +365 -6
- data/vendor/assets/images/timeline/delete.png +0 -0
- data/vendor/assets/stylesheets/vis.min.scss +0 -1
@@ -0,0 +1,114 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Network | Hierarchical layout</title>
|
5
|
+
|
6
|
+
<style type="text/css">
|
7
|
+
body {
|
8
|
+
font: 10pt sans;
|
9
|
+
}
|
10
|
+
|
11
|
+
#mynetwork {
|
12
|
+
width: 600px;
|
13
|
+
height: 600px;
|
14
|
+
border: 1px solid lightgray;
|
15
|
+
}
|
16
|
+
</style>
|
17
|
+
|
18
|
+
<script type="text/javascript" src="../exampleUtil.js"></script>
|
19
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
20
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css"/>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript">
|
24
|
+
var nodes = null;
|
25
|
+
var edges = null;
|
26
|
+
var network = null;
|
27
|
+
|
28
|
+
function destroy() {
|
29
|
+
if (network !== null) {
|
30
|
+
network.destroy();
|
31
|
+
network = null;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
function draw() {
|
36
|
+
destroy();
|
37
|
+
// randomly create some nodes and edges
|
38
|
+
var nodeCount = document.getElementById('nodeCount').value;
|
39
|
+
var data = getScaleFreeNetwork(nodeCount)
|
40
|
+
|
41
|
+
// create a network
|
42
|
+
var container = document.getElementById('mynetwork');
|
43
|
+
var directionInput = document.getElementById("direction").value;
|
44
|
+
var options = {
|
45
|
+
layout: {
|
46
|
+
hierarchical: {
|
47
|
+
direction: directionInput
|
48
|
+
}
|
49
|
+
}
|
50
|
+
};
|
51
|
+
network = new vis.Network(container, data, options);
|
52
|
+
|
53
|
+
// add event listeners
|
54
|
+
network.on('select', function (params) {
|
55
|
+
document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes;
|
56
|
+
});
|
57
|
+
}
|
58
|
+
|
59
|
+
</script>
|
60
|
+
|
61
|
+
</head>
|
62
|
+
|
63
|
+
<body onload="draw();">
|
64
|
+
<h2>Hierarchical Layout - Scale-Free-Network</h2>
|
65
|
+
|
66
|
+
<div style="width:700px; font-size:14px; text-align: justify;">
|
67
|
+
This example shows the randomly generated <b>scale-free-network</b> set of nodes and connected edges from example 2.
|
68
|
+
In this example, hierarchical layout has been enabled and the vertical levels are determined automatically.
|
69
|
+
</div>
|
70
|
+
<br/>
|
71
|
+
|
72
|
+
<form onsubmit="draw(); return false;">
|
73
|
+
<label for="nodeCount">Number of nodes:</label>
|
74
|
+
<input id="nodeCount" type="text" value="25" style="width: 50px;">
|
75
|
+
<input type="submit" value="Go">
|
76
|
+
</form>
|
77
|
+
<p>
|
78
|
+
<input type="button" id="btn-UD" value="Up-Down">
|
79
|
+
<input type="button" id="btn-DU" value="Down-Up">
|
80
|
+
<input type="button" id="btn-LR" value="Left-Right">
|
81
|
+
<input type="button" id="btn-RL" value="Right-Left">
|
82
|
+
<input type="hidden" id='direction' value="UD">
|
83
|
+
</p>
|
84
|
+
|
85
|
+
<script language="javascript">
|
86
|
+
var directionInput = document.getElementById("direction");
|
87
|
+
var btnUD = document.getElementById("btn-UD");
|
88
|
+
btnUD.onclick = function () {
|
89
|
+
directionInput.value = "UD";
|
90
|
+
draw();
|
91
|
+
}
|
92
|
+
var btnDU = document.getElementById("btn-DU");
|
93
|
+
btnDU.onclick = function () {
|
94
|
+
directionInput.value = "DU";
|
95
|
+
draw();
|
96
|
+
};
|
97
|
+
var btnLR = document.getElementById("btn-LR");
|
98
|
+
btnLR.onclick = function () {
|
99
|
+
directionInput.value = "LR";
|
100
|
+
draw();
|
101
|
+
};
|
102
|
+
var btnRL = document.getElementById("btn-RL");
|
103
|
+
btnRL.onclick = function () {
|
104
|
+
directionInput.value = "RL";
|
105
|
+
draw();
|
106
|
+
};
|
107
|
+
</script>
|
108
|
+
<br>
|
109
|
+
|
110
|
+
<div id="mynetwork"></div>
|
111
|
+
|
112
|
+
<p id="selection"></p>
|
113
|
+
</body>
|
114
|
+
</html>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Network | Hierarchical layout</title>
|
5
|
+
|
6
|
+
<style type="text/css">
|
7
|
+
body {
|
8
|
+
font: 10pt sans;
|
9
|
+
}
|
10
|
+
|
11
|
+
#mynetwork {
|
12
|
+
width: 600px;
|
13
|
+
height: 600px;
|
14
|
+
border: 1px solid lightgray;
|
15
|
+
}
|
16
|
+
</style>
|
17
|
+
|
18
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
19
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css"/>
|
20
|
+
|
21
|
+
<script type="text/javascript">
|
22
|
+
var network = null;
|
23
|
+
|
24
|
+
function p(data) {
|
25
|
+
var container = document.getElementById('mynetwork');
|
26
|
+
var options = {
|
27
|
+
layout: {
|
28
|
+
hierarchical: {},
|
29
|
+
},
|
30
|
+
};
|
31
|
+
console.log("starting layout");
|
32
|
+
network = new vis.Network(container, data, options);
|
33
|
+
console.log("layout complete");
|
34
|
+
}
|
35
|
+
</script>
|
36
|
+
</head>
|
37
|
+
|
38
|
+
<body>
|
39
|
+
<h2>Hierarchical Layout</h2>
|
40
|
+
|
41
|
+
<div id="mynetwork"></div>
|
42
|
+
|
43
|
+
<script type="text/javascript" src="./demo.jsonp"></script>
|
44
|
+
|
45
|
+
</body>
|
46
|
+
</html>
|
@@ -0,0 +1,108 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Network | Hierarchical layout difference</title>
|
5
|
+
|
6
|
+
<style type="text/css">
|
7
|
+
body {
|
8
|
+
font: 10pt sans;
|
9
|
+
}
|
10
|
+
#mynetwork {
|
11
|
+
width: 800px;
|
12
|
+
height: 500px;
|
13
|
+
border: 1px solid lightgray;
|
14
|
+
}
|
15
|
+
</style>
|
16
|
+
|
17
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
18
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css" />
|
19
|
+
|
20
|
+
<script type="text/javascript">
|
21
|
+
var network = null;
|
22
|
+
var layoutMethod = "directed";
|
23
|
+
|
24
|
+
function destroy() {
|
25
|
+
if (network !== null) {
|
26
|
+
network.destroy();
|
27
|
+
network = null;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
function draw() {
|
32
|
+
destroy();
|
33
|
+
|
34
|
+
var nodes = [];
|
35
|
+
var edges = [];
|
36
|
+
// randomly create some nodes and edges
|
37
|
+
for (var i = 0; i < 19; i++) {
|
38
|
+
nodes.push({id: i, label: String(i)});
|
39
|
+
}
|
40
|
+
edges.push({from: 0, to: 1});
|
41
|
+
edges.push({from: 0, to: 6});
|
42
|
+
edges.push({from: 0, to: 13});
|
43
|
+
edges.push({from: 0, to: 11});
|
44
|
+
edges.push({from: 1, to: 2});
|
45
|
+
edges.push({from: 2, to: 3});
|
46
|
+
edges.push({from: 2, to: 4});
|
47
|
+
edges.push({from: 3, to: 5});
|
48
|
+
edges.push({from: 1, to: 10});
|
49
|
+
edges.push({from: 1, to: 7});
|
50
|
+
edges.push({from: 2, to: 8});
|
51
|
+
edges.push({from: 2, to: 9});
|
52
|
+
edges.push({from: 3, to: 14});
|
53
|
+
edges.push({from: 1, to: 12});
|
54
|
+
edges.push({from: 16, to: 15});
|
55
|
+
edges.push({from: 15, to: 17});
|
56
|
+
edges.push({from: 18, to: 17});
|
57
|
+
|
58
|
+
// create a network
|
59
|
+
var container = document.getElementById('mynetwork');
|
60
|
+
var data = {
|
61
|
+
nodes: nodes,
|
62
|
+
edges: edges
|
63
|
+
};
|
64
|
+
|
65
|
+
var options = {
|
66
|
+
layout: {
|
67
|
+
hierarchical: {
|
68
|
+
sortMethod: layoutMethod
|
69
|
+
}
|
70
|
+
},
|
71
|
+
edges: {
|
72
|
+
smooth: true,
|
73
|
+
arrows: {to : true }
|
74
|
+
}
|
75
|
+
};
|
76
|
+
network = new vis.Network(container, data, options);
|
77
|
+
}
|
78
|
+
|
79
|
+
</script>
|
80
|
+
|
81
|
+
</head>
|
82
|
+
|
83
|
+
<body onload="draw();">
|
84
|
+
<h2>Hierarchical layout difference</h2>
|
85
|
+
<div style="width:700px; font-size:14px; text-align: justify;">
|
86
|
+
This example shows a the effect of the different hierarchical layout methods. Hubsize is based on the amount of edges connected to a node.
|
87
|
+
The node with the most connections (the largest hub) is drawn at the top of the tree. The direction method is based on the direction of the edges.
|
88
|
+
Try switching between the methods with the dropdown box below.
|
89
|
+
</div>
|
90
|
+
Layout method:
|
91
|
+
<select id="layout">
|
92
|
+
<option value="hubsize">hubsize</option>
|
93
|
+
<option value="directed">directed</option>
|
94
|
+
</select><br/>
|
95
|
+
<br />
|
96
|
+
|
97
|
+
<div id="mynetwork"></div>
|
98
|
+
|
99
|
+
<p id="selection"></p>
|
100
|
+
<script language="JavaScript">
|
101
|
+
var dropdown = document.getElementById("layout");
|
102
|
+
dropdown.onchange = function() {
|
103
|
+
layoutMethod = dropdown.value;
|
104
|
+
draw();
|
105
|
+
}
|
106
|
+
</script>
|
107
|
+
</body>
|
108
|
+
</html>
|
@@ -0,0 +1,152 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Network | Hierarchical Layout, userDefined</title>
|
5
|
+
|
6
|
+
<style type="text/css">
|
7
|
+
body {
|
8
|
+
font: 10pt sans;
|
9
|
+
}
|
10
|
+
|
11
|
+
#mynetwork {
|
12
|
+
width: 600px;
|
13
|
+
height: 600px;
|
14
|
+
border: 1px solid lightgray;
|
15
|
+
}
|
16
|
+
</style>
|
17
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
18
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css"/>
|
19
|
+
|
20
|
+
|
21
|
+
<script type="text/javascript">
|
22
|
+
var nodes = null;
|
23
|
+
var edges = null;
|
24
|
+
var network = null;
|
25
|
+
var directionInput = document.getElementById("direction");
|
26
|
+
|
27
|
+
function destroy() {
|
28
|
+
if (network !== null) {
|
29
|
+
network.destroy();
|
30
|
+
network = null;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
function draw() {
|
35
|
+
destroy();
|
36
|
+
nodes = [];
|
37
|
+
edges = [];
|
38
|
+
var connectionCount = [];
|
39
|
+
|
40
|
+
// randomly create some nodes and edges
|
41
|
+
for (var i = 0; i < 15; i++) {
|
42
|
+
nodes.push({id: i, label: String(i)});
|
43
|
+
}
|
44
|
+
edges.push({from: 0, to: 1});
|
45
|
+
edges.push({from: 0, to: 6});
|
46
|
+
edges.push({from: 0, to: 13});
|
47
|
+
edges.push({from: 0, to: 11});
|
48
|
+
edges.push({from: 1, to: 2});
|
49
|
+
edges.push({from: 2, to: 3});
|
50
|
+
edges.push({from: 2, to: 4});
|
51
|
+
edges.push({from: 3, to: 5});
|
52
|
+
edges.push({from: 1, to: 10});
|
53
|
+
edges.push({from: 1, to: 7});
|
54
|
+
edges.push({from: 2, to: 8});
|
55
|
+
edges.push({from: 2, to: 9});
|
56
|
+
edges.push({from: 3, to: 14});
|
57
|
+
edges.push({from: 1, to: 12});
|
58
|
+
nodes[0]["level"] = 0;
|
59
|
+
nodes[1]["level"] = 1;
|
60
|
+
nodes[2]["level"] = 3;
|
61
|
+
nodes[3]["level"] = 4;
|
62
|
+
nodes[4]["level"] = 4;
|
63
|
+
nodes[5]["level"] = 5;
|
64
|
+
nodes[6]["level"] = 1;
|
65
|
+
nodes[7]["level"] = 2;
|
66
|
+
nodes[8]["level"] = 4;
|
67
|
+
nodes[9]["level"] = 4;
|
68
|
+
nodes[10]["level"] = 2;
|
69
|
+
nodes[11]["level"] = 1;
|
70
|
+
nodes[12]["level"] = 2;
|
71
|
+
nodes[13]["level"] = 1;
|
72
|
+
nodes[14]["level"] = 5;
|
73
|
+
|
74
|
+
|
75
|
+
// create a network
|
76
|
+
var container = document.getElementById('mynetwork');
|
77
|
+
var data = {
|
78
|
+
nodes: nodes,
|
79
|
+
edges: edges
|
80
|
+
};
|
81
|
+
|
82
|
+
var options = {
|
83
|
+
edges: {
|
84
|
+
smooth: {
|
85
|
+
type: 'cubicBezier',
|
86
|
+
forceDirection: (directionInput.value == "UD" || directionInput.value == "DU") ? 'vertical' : 'horizontal',
|
87
|
+
roundness: 0.4
|
88
|
+
}
|
89
|
+
},
|
90
|
+
layout: {
|
91
|
+
hierarchical: {
|
92
|
+
direction: directionInput.value
|
93
|
+
}
|
94
|
+
},
|
95
|
+
physics:false
|
96
|
+
};
|
97
|
+
network = new vis.Network(container, data, options);
|
98
|
+
|
99
|
+
// add event listeners
|
100
|
+
network.on('select', function (params) {
|
101
|
+
document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes;
|
102
|
+
});
|
103
|
+
}
|
104
|
+
|
105
|
+
</script>
|
106
|
+
|
107
|
+
</head>
|
108
|
+
|
109
|
+
<body onload="draw();">
|
110
|
+
<h2>Hierarchical Layout - User-defined</h2>
|
111
|
+
|
112
|
+
<div style="width:700px; font-size:14px; text-align: justify;">
|
113
|
+
This example shows a user-defined hierarchical layout. If the user defines levels for nodes but does not do so for
|
114
|
+
all nodes, an alert will show up and hierarchical layout will be disabled. Either all or none can be defined.
|
115
|
+
If the smooth curves appear to be inverted, the direction of the edge is not in the same direction as the network.
|
116
|
+
</div>
|
117
|
+
<p>
|
118
|
+
<input type="button" id="btn-UD" value="Up-Down">
|
119
|
+
<input type="button" id="btn-DU" value="Down-Up">
|
120
|
+
<input type="button" id="btn-LR" value="Left-Right">
|
121
|
+
<input type="button" id="btn-RL" value="Right-Left">
|
122
|
+
<input type="hidden" id='direction' value="UD">
|
123
|
+
</p>
|
124
|
+
|
125
|
+
<div id="mynetwork"></div>
|
126
|
+
|
127
|
+
<p id="selection"></p>
|
128
|
+
<script language="JavaScript">
|
129
|
+
var directionInput = document.getElementById("direction");
|
130
|
+
var btnUD = document.getElementById("btn-UD");
|
131
|
+
btnUD.onclick = function () {
|
132
|
+
directionInput.value = "UD";
|
133
|
+
draw();
|
134
|
+
};
|
135
|
+
var btnDU = document.getElementById("btn-DU");
|
136
|
+
btnDU.onclick = function () {
|
137
|
+
directionInput.value = "DU";
|
138
|
+
draw();
|
139
|
+
};
|
140
|
+
var btnLR = document.getElementById("btn-LR");
|
141
|
+
btnLR.onclick = function () {
|
142
|
+
directionInput.value = "LR";
|
143
|
+
draw();
|
144
|
+
};
|
145
|
+
var btnRL = document.getElementById("btn-RL");
|
146
|
+
btnRL.onclick = function () {
|
147
|
+
directionInput.value = "RL";
|
148
|
+
draw();
|
149
|
+
};
|
150
|
+
</script>
|
151
|
+
</body>
|
152
|
+
</html>
|
@@ -0,0 +1,111 @@
|
|
1
|
+
<html>
|
2
|
+
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Hierarchical Layout without Physics</title>
|
6
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
7
|
+
<script type="text/javascript" src="../datasources/largeHierarchicalDataset.js"></script>
|
8
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css" />
|
9
|
+
<style type="text/css">
|
10
|
+
#network {
|
11
|
+
width: 1000px;
|
12
|
+
height: 400px;
|
13
|
+
border: 1px solid lightgray;
|
14
|
+
}
|
15
|
+
|
16
|
+
td {
|
17
|
+
vertical-align: top;
|
18
|
+
}
|
19
|
+
|
20
|
+
table {
|
21
|
+
width: 800px;
|
22
|
+
}
|
23
|
+
</style>
|
24
|
+
</head>
|
25
|
+
|
26
|
+
<body>
|
27
|
+
<h1>Hierarchical Layout without Physics</h1>
|
28
|
+
The hierarchical layout can now be controlled without the use of physics. This is much quicker. The options for this are:
|
29
|
+
<br />
|
30
|
+
<br />
|
31
|
+
|
32
|
+
<table>
|
33
|
+
<tr>
|
34
|
+
<td width="150px">
|
35
|
+
<code>levelSeparation</code>
|
36
|
+
</td>
|
37
|
+
<td width="400px">Distance between levels.</td>
|
38
|
+
</tr>
|
39
|
+
<tr>
|
40
|
+
<td>
|
41
|
+
<code>nodeSpacing</code>
|
42
|
+
</td>
|
43
|
+
<td>Minimum distance between nodes on the free axis.</td>
|
44
|
+
</tr>
|
45
|
+
<tr>
|
46
|
+
<td>
|
47
|
+
<code>treeSpacing</code>
|
48
|
+
</td>
|
49
|
+
<td>Distance between different trees (independent networks).</td>
|
50
|
+
</tr>
|
51
|
+
<tr>
|
52
|
+
<td>
|
53
|
+
<code>blockShifting</code>
|
54
|
+
</td>
|
55
|
+
<td>Method for reducing whitespace. Can be used alone or together with edge minimization. Each node will check for
|
56
|
+
whitespace and will shift it's branch along with it for as far as it can, respecting the nodeSpacing on any
|
57
|
+
level.</td>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<td>
|
61
|
+
<code>edgeMinimization</code>
|
62
|
+
</td>
|
63
|
+
<td>Method for reducing whitespace. Can be used alone or together with block shifting. Enabling block shifting will
|
64
|
+
usually speed up the layout process. Each node will try to move along its free axis to reduce the total length
|
65
|
+
of it's edges.</td>
|
66
|
+
</tr>
|
67
|
+
<tr>
|
68
|
+
<td>
|
69
|
+
<code>parentCentralization</code>
|
70
|
+
</td>
|
71
|
+
<td>When true, the parents nodes will be centered again after the the layout algorithm has been finished.</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
<br />
|
75
|
+
<br /> Play with the settings below the network and see how the layout changes!
|
76
|
+
<div id="network"></div>
|
77
|
+
<script>
|
78
|
+
var data = {
|
79
|
+
nodes: nodes,
|
80
|
+
edges: edges
|
81
|
+
};
|
82
|
+
// create a network
|
83
|
+
var container = document.getElementById('network');
|
84
|
+
var options = {
|
85
|
+
layout: {
|
86
|
+
hierarchical: {
|
87
|
+
direction: "UD",
|
88
|
+
sortMethod: "directed"
|
89
|
+
}
|
90
|
+
},
|
91
|
+
interaction: {
|
92
|
+
dragNodes: false
|
93
|
+
},
|
94
|
+
physics: {
|
95
|
+
enabled: false
|
96
|
+
},
|
97
|
+
configure: {
|
98
|
+
filter: function (option, path) {
|
99
|
+
if (path.indexOf('hierarchical') !== -1) {
|
100
|
+
return true;
|
101
|
+
}
|
102
|
+
return false;
|
103
|
+
},
|
104
|
+
showButton: false
|
105
|
+
}
|
106
|
+
};
|
107
|
+
var network = new vis.Network(container, data, options);
|
108
|
+
</script>
|
109
|
+
</body>
|
110
|
+
|
111
|
+
</html>
|