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,279 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Network | Animation</title>
|
5
|
+
|
6
|
+
<style type="text/css">
|
7
|
+
body {
|
8
|
+
font: 10pt sans;
|
9
|
+
}
|
10
|
+
#mynetwork {
|
11
|
+
width: 600px;
|
12
|
+
height: 600px;
|
13
|
+
border: 1px solid lightgray;
|
14
|
+
}
|
15
|
+
|
16
|
+
div.left {
|
17
|
+
position:relative;
|
18
|
+
float:left;
|
19
|
+
width:300px;
|
20
|
+
border: 1px #c7c7c7 solid;
|
21
|
+
height:590px;
|
22
|
+
padding:5px;
|
23
|
+
}
|
24
|
+
|
25
|
+
div.right {
|
26
|
+
padding-left:10px;
|
27
|
+
float:left;
|
28
|
+
width:600px;
|
29
|
+
}
|
30
|
+
|
31
|
+
div.bottom {
|
32
|
+
position:absolute;
|
33
|
+
bottom:5px;
|
34
|
+
}
|
35
|
+
</style>
|
36
|
+
|
37
|
+
<script type="text/javascript" src="../exampleUtil.js"></script>
|
38
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
39
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css" />
|
40
|
+
|
41
|
+
<script type="text/javascript">
|
42
|
+
var nodes = null;
|
43
|
+
var edges = null;
|
44
|
+
var network = null;
|
45
|
+
var offsetx, offsety, scale, positionx, positiony, duration, easingFunction, doButton, focusButton, showButton;
|
46
|
+
var statusUpdateSpan;
|
47
|
+
var finishMessage = '';
|
48
|
+
var showInterval = false;
|
49
|
+
var showPhase = 1;
|
50
|
+
var amountOfNodes = 25;
|
51
|
+
|
52
|
+
function destroy() {
|
53
|
+
if (network !== null) {
|
54
|
+
network.destroy();
|
55
|
+
network = null;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
function updateValues() {
|
60
|
+
offsetx = parseInt(document.getElementById('offsetx').value);
|
61
|
+
offsety = parseInt(document.getElementById('offsety').value);
|
62
|
+
duration = parseInt(document.getElementById('duration').value);
|
63
|
+
scale = parseFloat(document.getElementById('scale').value);
|
64
|
+
positionx = parseInt(document.getElementById('positionx').value);
|
65
|
+
positiony = parseInt(document.getElementById('positiony').value);
|
66
|
+
easingFunction = document.getElementById('easingFunction').value;
|
67
|
+
}
|
68
|
+
|
69
|
+
function draw() {
|
70
|
+
destroy();
|
71
|
+
statusUpdateSpan = document.getElementById('statusUpdate');
|
72
|
+
doButton = document.getElementById('btnDo');
|
73
|
+
focusButton = document.getElementById('btnFocus');
|
74
|
+
showButton = document.getElementById('btnShow');
|
75
|
+
|
76
|
+
// randomly create some nodes and edges
|
77
|
+
var data = getScaleFreeNetwork(amountOfNodes);
|
78
|
+
|
79
|
+
// create a network
|
80
|
+
var container = document.getElementById('mynetwork');
|
81
|
+
var options = {
|
82
|
+
physics: {
|
83
|
+
stabilization: {
|
84
|
+
iterations: 1200
|
85
|
+
}
|
86
|
+
}
|
87
|
+
};
|
88
|
+
network = new vis.Network(container, data, options);
|
89
|
+
|
90
|
+
// add event listeners
|
91
|
+
network.on('select', function(params) {
|
92
|
+
document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes;
|
93
|
+
});
|
94
|
+
network.on('stabilized', function (params) {
|
95
|
+
document.getElementById('stabilization').innerHTML = 'Stabilization took ' + params.iterations + ' iterations.';
|
96
|
+
});
|
97
|
+
network.on('animationFinished', function() {
|
98
|
+
statusUpdateSpan.innerHTML = finishMessage;
|
99
|
+
})
|
100
|
+
}
|
101
|
+
|
102
|
+
function fitAnimated() {
|
103
|
+
updateValues();
|
104
|
+
|
105
|
+
var options = {offset: {x:offsetx,y:offsety},
|
106
|
+
duration: duration,
|
107
|
+
easingFunction: easingFunction
|
108
|
+
};
|
109
|
+
statusUpdateSpan.innerHTML = 'Doing fit() Animation.';
|
110
|
+
finishMessage = 'Animation finished.';
|
111
|
+
network.fit({animation:options});
|
112
|
+
}
|
113
|
+
|
114
|
+
function doDefaultAnimation() {
|
115
|
+
updateValues();
|
116
|
+
|
117
|
+
var options = {
|
118
|
+
position: {x:positionx,y:positiony},
|
119
|
+
scale: scale,
|
120
|
+
offset: {x:offsetx,y:offsety},
|
121
|
+
animation: true // default duration is 1000ms and default easingFunction is easeInOutQuad.
|
122
|
+
};
|
123
|
+
statusUpdateSpan.innerHTML = 'Doing Animation.';
|
124
|
+
finishMessage = 'Animation finished.';
|
125
|
+
network.moveTo(options);
|
126
|
+
}
|
127
|
+
|
128
|
+
function doAnimation() {
|
129
|
+
updateValues();
|
130
|
+
|
131
|
+
var options = {
|
132
|
+
position: {x:positionx,y:positiony},
|
133
|
+
scale: scale,
|
134
|
+
offset: {x:offsetx,y:offsety},
|
135
|
+
animation: {
|
136
|
+
duration: duration,
|
137
|
+
easingFunction: easingFunction
|
138
|
+
}
|
139
|
+
};
|
140
|
+
statusUpdateSpan.innerHTML = 'Doing Animation.';
|
141
|
+
finishMessage = 'Animation finished.';
|
142
|
+
network.moveTo(options);
|
143
|
+
}
|
144
|
+
|
145
|
+
function focusRandom() {
|
146
|
+
updateValues();
|
147
|
+
|
148
|
+
var nodeId = Math.floor(Math.random() * amountOfNodes);
|
149
|
+
var options = {
|
150
|
+
// position: {x:positionx,y:positiony}, // this is not relevant when focusing on nodes
|
151
|
+
scale: scale,
|
152
|
+
offset: {x:offsetx,y:offsety},
|
153
|
+
animation: {
|
154
|
+
duration: duration,
|
155
|
+
easingFunction: easingFunction
|
156
|
+
}
|
157
|
+
};
|
158
|
+
statusUpdateSpan.innerHTML = 'Focusing on node: ' + nodeId;
|
159
|
+
finishMessage = 'Node: ' + nodeId + ' in focus.';
|
160
|
+
network.focus(nodeId, options);
|
161
|
+
}
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
function startShow() {
|
166
|
+
updateValues();
|
167
|
+
if (showInterval !== false) {
|
168
|
+
showInterval = false;
|
169
|
+
showButton.value = 'Start a show!';
|
170
|
+
network.fit();
|
171
|
+
}
|
172
|
+
else {
|
173
|
+
showButton.value = 'Stop the show!';
|
174
|
+
focusRandom();
|
175
|
+
setTimeout(doTheShow, duration);
|
176
|
+
showInterval = true;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
function doTheShow() {
|
181
|
+
updateValues();
|
182
|
+
if (showInterval == true) {
|
183
|
+
if (showPhase == 0) {
|
184
|
+
focusRandom();
|
185
|
+
showPhase = 1;
|
186
|
+
}
|
187
|
+
else {
|
188
|
+
fitAnimated();
|
189
|
+
showPhase = 0;
|
190
|
+
}
|
191
|
+
setTimeout(doTheShow, duration);
|
192
|
+
}
|
193
|
+
}
|
194
|
+
</script>
|
195
|
+
|
196
|
+
</head>
|
197
|
+
|
198
|
+
<body onload="draw();">
|
199
|
+
<h2>Camera animations</h2>
|
200
|
+
<div style="width:700px; font-size:14px;">
|
201
|
+
You can move the view around programmatically using the .moveTo(options) function. The options supplied to this function can
|
202
|
+
also be (partially) supplied to the .fit() and .focusOnNode() methods. These are explained in the docs.
|
203
|
+
<br /><br/>
|
204
|
+
The buttons below take the fields from the table when they can. For instance, the "Animate with default settings." takes the position, scale and offset while using
|
205
|
+
the default animation values for duration and easing function. The focusOnNode takes everything except the position and the fit takes only the duration and easing function.
|
206
|
+
<br/><br/>
|
207
|
+
Here you can see a full description of the options you can supply to moveTo:
|
208
|
+
</div>
|
209
|
+
<pre>
|
210
|
+
var moveToOptions = {
|
211
|
+
position: {x:x, y:x}, // position to animate to (Numbers)
|
212
|
+
scale: 1.0, // scale to animate to (Number)
|
213
|
+
offset: {x:x, y:y}, // offset from the center in DOM pixels (Numbers)
|
214
|
+
animation: { // animation object, can also be Boolean
|
215
|
+
duration: 1000, // animation duration in milliseconds (Number)
|
216
|
+
easingFunction: "easeInOutQuad" // Animation easing function, available are:
|
217
|
+
} // linear, easeInQuad, easeOutQuad, easeInOutQuad,
|
218
|
+
} // easeInCubic, easeOutCubic, easeInOutCubic,
|
219
|
+
// easeInQuart, easeOutQuart, easeInOutQuart,
|
220
|
+
// easeInQuint, easeOutQuint, easeInOutQuint
|
221
|
+
</pre>
|
222
|
+
<div class="left">
|
223
|
+
<table>
|
224
|
+
<tr>
|
225
|
+
<td>position x</td><td><input type="text" value="300" id="positionx" style="width:170px;"></td>
|
226
|
+
</tr>
|
227
|
+
<tr>
|
228
|
+
<td>position y</td><td><input type="text" value="300" id="positiony" style="width:170px;"></td>
|
229
|
+
</tr>
|
230
|
+
<tr>
|
231
|
+
<td>scale</td><td><input type="text" value="1.0" id="scale" style="width:170px;"></td>
|
232
|
+
</tr>
|
233
|
+
<tr>
|
234
|
+
<td>offset x</td><td><input type="text" value="0" id="offsetx" style="width:170px;"> px</td>
|
235
|
+
</tr>
|
236
|
+
<tr>
|
237
|
+
<td>offset y</td><td><input type="text" value="0" id="offsety" style="width:170px;"> px</td>
|
238
|
+
</tr>
|
239
|
+
<tr>
|
240
|
+
<td>duration</td><td><input type="text" value="1000" id="duration" style="width:170px;"> ms</td>
|
241
|
+
</tr>
|
242
|
+
<tr>
|
243
|
+
<td>easingFunction</td><td>
|
244
|
+
<select id="easingFunction" style="width:174px;">
|
245
|
+
<option value="linear">linear</option>
|
246
|
+
<option value="easeInQuad">easeInQuad</option>
|
247
|
+
<option value="easeOutQuad">easeOutQuad</option>
|
248
|
+
<option value="easeInOutQuad" selected="selected">easeInOutQuad</option>
|
249
|
+
<option value="easeInCubic">easeInCubic</option>
|
250
|
+
<option value="easeOutCubic">easeOutCubic</option>
|
251
|
+
<option value="easeInOutCubic">easeInOutCubic</option>
|
252
|
+
<option value="easeInQuart">easeInQuart</option>
|
253
|
+
<option value="easeOutQuart">easeOutQuart</option>
|
254
|
+
<option value="easeInOutQuart">easeInOutQuart</option>
|
255
|
+
<option value="easeInQuint">easeInQuint</option>
|
256
|
+
<option value="easeOutQuint">easeOutQuint</option>
|
257
|
+
<option value="easeInOutQuint">easeInOutQuint</option>
|
258
|
+
</select>
|
259
|
+
</td>
|
260
|
+
</tr>
|
261
|
+
</table>
|
262
|
+
<div class="bottom">
|
263
|
+
<span id="statusUpdate"></span><br />
|
264
|
+
Examples:
|
265
|
+
<input type="button" onclick="doAnimation();" value="Animate with above settings." style="width:300px;" id="btnDo"> <br/>
|
266
|
+
<input type="button" onclick="doDefaultAnimation();" value="Animate with default settings." style="width:300px;" id="btnDoDefault"> <br/>
|
267
|
+
<input type="button" onclick="fitAnimated();" value="Animated fit()." style="width:300px;" id="btnZoom"> <br/>
|
268
|
+
<input type="button" onclick="focusRandom();" value="Focus on random node." style="width:300px;" id="btnFocus"><br/>
|
269
|
+
<input type="button" onclick="startShow();" value="Start a show!" style="width:300px;" id="btnShow"><br/>
|
270
|
+
</div>
|
271
|
+
</div>
|
272
|
+
<div class="right">
|
273
|
+
<div id="mynetwork"></div>
|
274
|
+
|
275
|
+
<p id="selection"></p>
|
276
|
+
<p id="stabilization"></p>
|
277
|
+
</div>
|
278
|
+
</body>
|
279
|
+
</html>
|
@@ -0,0 +1,107 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Network | Clustering</title>
|
5
|
+
|
6
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
7
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css" />
|
8
|
+
|
9
|
+
<style type="text/css">
|
10
|
+
#mynetwork {
|
11
|
+
width: 600px;
|
12
|
+
height: 600px;
|
13
|
+
border: 1px solid lightgray;
|
14
|
+
}
|
15
|
+
p {
|
16
|
+
max-width:600px;
|
17
|
+
}
|
18
|
+
|
19
|
+
h4 {
|
20
|
+
margin-bottom:3px;
|
21
|
+
}
|
22
|
+
</style>
|
23
|
+
|
24
|
+
</head>
|
25
|
+
|
26
|
+
<body>
|
27
|
+
|
28
|
+
|
29
|
+
<p>
|
30
|
+
Demonstrating getBaseEdges, getClusteredEdges updateEdge and updateClusteredNode. <br/><ul><li>Clicking on the cluster will change it to a star (updateClusteredNode).</li>
|
31
|
+
<li>Clicking on an edge will make it red regardless of whether it is a clusteredEdge or not (updateEdge)</li>
|
32
|
+
<li>Clicking on an edge will also show the results of getBaseEdges and getClusteredEdge</li>
|
33
|
+
</ul>
|
34
|
+
</p>
|
35
|
+
|
36
|
+
<div id="mynetwork"></div>
|
37
|
+
<pre id="eventSpan"></pre>
|
38
|
+
|
39
|
+
<script type="text/javascript">
|
40
|
+
// create an array with nodes
|
41
|
+
var nodes = [
|
42
|
+
{id: 1, label: 'Node 1', color:'orange'},
|
43
|
+
{id: 2, label: 'Node 2', color:'DarkViolet', font:{color:'white'}},
|
44
|
+
{id: 3, label: 'Node 3', color:'orange'},
|
45
|
+
{id: 4, label: 'Node 4', color:'DarkViolet', font:{color:'white'}},
|
46
|
+
{id: 5, label: 'Node 5', color:'orange'},
|
47
|
+
{id: 6, label: 'cid = 1', cid:1, color:'orange'},
|
48
|
+
{id: 7, label: 'cid = 1', cid:1, color:'DarkViolet', font:{color:'white'}},
|
49
|
+
{id: 8, label: 'cid = 1', cid:1, color:'lime'},
|
50
|
+
{id: 9, label: 'cid = 1', cid:1, color:'orange'},
|
51
|
+
{id: 10, label: 'cid = 1', cid:1, color:'lime'}
|
52
|
+
];
|
53
|
+
|
54
|
+
// create an array with edges
|
55
|
+
var edges = [
|
56
|
+
{from: 1, to: 2},
|
57
|
+
{from: 1, to: 3},
|
58
|
+
{from: 10, to: 4},
|
59
|
+
{from: 2, to: 5},
|
60
|
+
{from: 6, to: 2},
|
61
|
+
{from: 7, to: 5},
|
62
|
+
{from: 8, to: 6},
|
63
|
+
{from: 9, to: 7},
|
64
|
+
{from: 10, to: 9}
|
65
|
+
];
|
66
|
+
|
67
|
+
// create a network
|
68
|
+
var container = document.getElementById('mynetwork');
|
69
|
+
var data = {
|
70
|
+
nodes: nodes,
|
71
|
+
edges: edges
|
72
|
+
};
|
73
|
+
var options = {layout:{randomSeed:8}};
|
74
|
+
var network = new vis.Network(container, data, options);
|
75
|
+
var clusterOptionsByData = {
|
76
|
+
joinCondition:function(childOptions) {
|
77
|
+
return childOptions.cid == 1;
|
78
|
+
},
|
79
|
+
clusterNodeProperties: {id:'cidCluster', borderWidth:3, shape:'database'}
|
80
|
+
};
|
81
|
+
network.cluster(clusterOptionsByData);
|
82
|
+
|
83
|
+
network.on("selectNode", function(params) {
|
84
|
+
if (params.nodes.length == 1) {
|
85
|
+
if (network.isCluster(params.nodes[0]) == true) {
|
86
|
+
network.clustering.updateClusteredNode(params.nodes[0], {shape : 'star'});
|
87
|
+
}
|
88
|
+
}
|
89
|
+
});
|
90
|
+
|
91
|
+
network.on("selectEdge", function(params) {
|
92
|
+
if (params.edges.length == 1) {
|
93
|
+
// Single edge selected
|
94
|
+
var obj = {};
|
95
|
+
obj.clicked_id = params.edges[0];
|
96
|
+
network.clustering.updateEdge(params.edges[0], {color : '#aa0000'});
|
97
|
+
obj.base_edges = network.clustering.getBaseEdges(params.edges[0]);
|
98
|
+
obj.all_clustered_edges = network.clustering.getClusteredEdges(params.edges[0]);
|
99
|
+
document.getElementById('eventSpan').innerHTML = '<h2>selectEdge event:</h2>' + JSON.stringify(obj, null, 4);
|
100
|
+
}
|
101
|
+
});
|
102
|
+
|
103
|
+
|
104
|
+
</script>
|
105
|
+
|
106
|
+
</body>
|
107
|
+
</html>
|
@@ -0,0 +1,466 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Network | Chosen Elements</title>
|
5
|
+
|
6
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
7
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css" />
|
8
|
+
|
9
|
+
<style type="text/css">
|
10
|
+
#mynetwork {
|
11
|
+
width: 900px;
|
12
|
+
height: 600px;
|
13
|
+
border: 1px solid lightgray;
|
14
|
+
}
|
15
|
+
code {
|
16
|
+
font-size: 14px;
|
17
|
+
background: #dddddd;
|
18
|
+
}
|
19
|
+
p {
|
20
|
+
max-width: 600px;
|
21
|
+
}
|
22
|
+
.indented {
|
23
|
+
margin-left: 30px;
|
24
|
+
}
|
25
|
+
.sep {
|
26
|
+
height: 1px;
|
27
|
+
width: 35%;
|
28
|
+
margin-left: 40px;
|
29
|
+
background-color: #dddddd;
|
30
|
+
}
|
31
|
+
</style>
|
32
|
+
|
33
|
+
</head>
|
34
|
+
|
35
|
+
<body>
|
36
|
+
|
37
|
+
<p>When a node or edge is selected or hovered its visible characteristics can be changed.</p>
|
38
|
+
|
39
|
+
<div id="mynetwork"></div>
|
40
|
+
|
41
|
+
<p>In this network, an element (node, edge or label) will change a characteristic when hovered, and it will be locked in when selected.
|
42
|
+
This is managed by setting up a 'chosen' function that will be called when the element containing the function is chosen.
|
43
|
+
These functions may be set on nodes, edges and labels, at the individual or group level.</p>
|
44
|
+
|
45
|
+
<p>All states (unselected, hover-over-unselected, selected, and hover-over selected) may be handled as needed by the application using vis, as the select and hover states are passed to the chosen function when called.
|
46
|
+
Additionally, the id of the element is passed to allow context-specific characteristic adjustment on select or hover as needed.</p>
|
47
|
+
|
48
|
+
<p><i>It should be noted that the characteristics which might affect the position of elements have been left out on purpose.
|
49
|
+
While it might be interesting to make them changeable, this is problematic on hovering.
|
50
|
+
Consider that the user hovers over an object.
|
51
|
+
If it changed characteristics that moved it outside of the hover-distance, it would then no longer be hovering.
|
52
|
+
So it would be moved back to its original prosition, within the hover-distance and then again be hovering over the object.
|
53
|
+
This hysteresis loop is kept from occurring by leaving out the characteristics that could cause it.
|
54
|
+
Some seemingly innocuous changes (such as resizing a node's label on hover that would in turn cause the node to resize and move out of hover-distance) may still cause hysteresis, but with care they should be avoidable.</i></p>
|
55
|
+
|
56
|
+
|
57
|
+
<script type="text/javascript">
|
58
|
+
|
59
|
+
var changeChosenLabelColor =
|
60
|
+
function(ctx, values, id) {
|
61
|
+
values.color = "#ff0000";
|
62
|
+
}
|
63
|
+
|
64
|
+
var changeChosenLabelSize =
|
65
|
+
function(ctx, values, id) {
|
66
|
+
values.size += 1;
|
67
|
+
}
|
68
|
+
|
69
|
+
var changeChosenLabelFace =
|
70
|
+
function(ctx, values, id) {
|
71
|
+
values.face = "serif";
|
72
|
+
}
|
73
|
+
|
74
|
+
var changeChosenLabelMod =
|
75
|
+
function(ctx, values, id) {
|
76
|
+
values.mod = "bold italic";
|
77
|
+
}
|
78
|
+
|
79
|
+
var changeChosenLabelStrokeWidth =
|
80
|
+
function(ctx, values, id) {
|
81
|
+
values.strokeWidth = 5;
|
82
|
+
}
|
83
|
+
|
84
|
+
var changeChosenLabelStrokeColor =
|
85
|
+
function(ctx, values, id) {
|
86
|
+
values.strokeColor = "#00ff00";
|
87
|
+
}
|
88
|
+
|
89
|
+
var changeChosenNodeColor =
|
90
|
+
function(values, id, selected, hovering) {
|
91
|
+
values.color = "#ffdd88";
|
92
|
+
}
|
93
|
+
|
94
|
+
var changeChosenNodeBorderWidth =
|
95
|
+
function(values, id, selected, hovering) {
|
96
|
+
values.borderWidth = 3;
|
97
|
+
}
|
98
|
+
|
99
|
+
var changeChosenNodeBorderColor =
|
100
|
+
function(values, id, selected, hovering) {
|
101
|
+
values.borderColor = "#ff0000";
|
102
|
+
}
|
103
|
+
|
104
|
+
var changeChosenNodeSize =
|
105
|
+
function(values, id, selected, hovering) {
|
106
|
+
values.size = 30;
|
107
|
+
}
|
108
|
+
|
109
|
+
var changeChosenNodeBorderDashes =
|
110
|
+
function(values, id, selected, hovering) {
|
111
|
+
values.borderDashes = [ 10, 10 ];
|
112
|
+
}
|
113
|
+
|
114
|
+
var changeChosenNodeBorderRadius =
|
115
|
+
function(values, id, selected, hovering) {
|
116
|
+
values.borderRadius = 15;
|
117
|
+
}
|
118
|
+
|
119
|
+
var changeChosenNodeShadow =
|
120
|
+
function(values, id, selected, hovering) {
|
121
|
+
values.shadow = true;
|
122
|
+
}
|
123
|
+
|
124
|
+
var changeChosenNodeShadowColor =
|
125
|
+
function(values, id, selected, hovering) {
|
126
|
+
values.shadowColor = "#ff0000";
|
127
|
+
}
|
128
|
+
|
129
|
+
var changeChosenNodeShadowSize =
|
130
|
+
function(values, id, selected, hovering) {
|
131
|
+
values.shadowSize = 30;
|
132
|
+
}
|
133
|
+
|
134
|
+
var changeChosenNodeShadowX =
|
135
|
+
function(values, id, selected, hovering) {
|
136
|
+
values.shadowX = -5;
|
137
|
+
}
|
138
|
+
|
139
|
+
var changeChosenNodeShadowY =
|
140
|
+
function(values, id, selected, hovering) {
|
141
|
+
values.shadowY = -5;
|
142
|
+
}
|
143
|
+
|
144
|
+
var changeChosenEdgeToArrow =
|
145
|
+
function(values, id, selected, hovering) {
|
146
|
+
values.toArrow = true;
|
147
|
+
}
|
148
|
+
|
149
|
+
var changeChosenEdgeToArrowScale =
|
150
|
+
function(values, id, selected, hovering) {
|
151
|
+
values.toArrowScale = 2;
|
152
|
+
}
|
153
|
+
|
154
|
+
var changeChosenEdgeToArrowType =
|
155
|
+
function(values, id, selected, hovering) {
|
156
|
+
values.toArrowType = "circle";
|
157
|
+
}
|
158
|
+
|
159
|
+
var changeChosenEdgeMiddleArrow =
|
160
|
+
function(values, id, selected, hovering) {
|
161
|
+
values.middleArrow = true;
|
162
|
+
}
|
163
|
+
|
164
|
+
var changeChosenEdgeMiddleArrowScale =
|
165
|
+
function(values, id, selected, hovering) {
|
166
|
+
values.middleArrowScale = 2;
|
167
|
+
}
|
168
|
+
|
169
|
+
var changeChosenEdgeMiddleArrowType =
|
170
|
+
function(values, id, selected, hovering) {
|
171
|
+
values.middleArrowType = "circle";
|
172
|
+
}
|
173
|
+
|
174
|
+
var changeChosenEdgeFromArrow =
|
175
|
+
function(values, id, selected, hovering) {
|
176
|
+
values.fromArrow = true;
|
177
|
+
}
|
178
|
+
|
179
|
+
var changeChosenEdgeFromArrowScale =
|
180
|
+
function(values, id, selected, hovering) {
|
181
|
+
values.fromArrowScale = 2;
|
182
|
+
}
|
183
|
+
|
184
|
+
var changeChosenEdgeFromArrowType =
|
185
|
+
function(values, id, selected, hovering) {
|
186
|
+
values.fromArrowType = "circle";
|
187
|
+
}
|
188
|
+
|
189
|
+
var changeChosenEdgeArrowStrikethrough =
|
190
|
+
function(values, id, selected, hovering) {
|
191
|
+
values.arrowStrikethrough = false;
|
192
|
+
}
|
193
|
+
|
194
|
+
var changeChosenEdgeColor =
|
195
|
+
function(values, id, selected, hovering) {
|
196
|
+
values.color = "#00ff00";
|
197
|
+
}
|
198
|
+
|
199
|
+
var changeChosenEdgeInheritsColor =
|
200
|
+
function(values, id, selected, hovering) {
|
201
|
+
values.inheritsColor = "both";
|
202
|
+
}
|
203
|
+
|
204
|
+
var changeChosenEdgeOpacity =
|
205
|
+
function(values, id, selected, hovering) {
|
206
|
+
values.opacity = 0.25;
|
207
|
+
}
|
208
|
+
|
209
|
+
var changeChosenEdgeHidden =
|
210
|
+
function(values, id, selected, hovering) {
|
211
|
+
values.hidden = true;
|
212
|
+
}
|
213
|
+
|
214
|
+
var changeChosenEdgeShadow =
|
215
|
+
function(values, id, selected, hovering) {
|
216
|
+
values.shadow = true;
|
217
|
+
}
|
218
|
+
|
219
|
+
var changeChosenEdgeShadowColor =
|
220
|
+
function(values, id, selected, hovering) {
|
221
|
+
values.shadowColor = "#00ffff";
|
222
|
+
}
|
223
|
+
|
224
|
+
var changeChosenEdgeShadowSize =
|
225
|
+
function(values, id, selected, hovering) {
|
226
|
+
values.shadowSize = 20;
|
227
|
+
}
|
228
|
+
|
229
|
+
var changeChosenEdgeShadowX =
|
230
|
+
function(values, id, selected, hovering) {
|
231
|
+
values.shadowX = -5;
|
232
|
+
}
|
233
|
+
|
234
|
+
var changeChosenEdgeShadowY =
|
235
|
+
function(values, id, selected, hovering) {
|
236
|
+
values.shadowY = -5;
|
237
|
+
}
|
238
|
+
|
239
|
+
var changeChosenEdgeWidth =
|
240
|
+
function(values, id, selected, hovering) {
|
241
|
+
values.width = 5;
|
242
|
+
}
|
243
|
+
|
244
|
+
var changeChosenEdgeDashes =
|
245
|
+
function(values, id, selected, hovering) {
|
246
|
+
values.dashes = [10, 10];
|
247
|
+
}
|
248
|
+
|
249
|
+
var nodes = [
|
250
|
+
{ id: 1000, label: "label does not change",
|
251
|
+
x: -400, y: -300,
|
252
|
+
chosen: { label: false, node: false } },
|
253
|
+
{ id: 1010, label: "label default settings",
|
254
|
+
x: -400, y: -225,
|
255
|
+
chosen: { label: true, node: false } },
|
256
|
+
{ id: 1020, label: "label changes color",
|
257
|
+
x: -400, y: -150,
|
258
|
+
chosen: { label: changeChosenLabelColor, node: false } },
|
259
|
+
{ id: 1030, label: "label changes size",
|
260
|
+
x: -400, y: -75,
|
261
|
+
chosen: { label: changeChosenLabelSize, node: false } },
|
262
|
+
{ id: 1040, label: "label changes face",
|
263
|
+
x: -400, y: 0,
|
264
|
+
chosen: { label: changeChosenLabelFace, node: false } },
|
265
|
+
{ id: 1050, label: "label changes modifier",
|
266
|
+
x: -400, y: 75,
|
267
|
+
chosen: { label: changeChosenLabelMod, node: false } },
|
268
|
+
{ id: 1060, label: "label changes stokeWidth",
|
269
|
+
x: -400, y: 150,
|
270
|
+
chosen: { label: changeChosenLabelStrokeWidth, node: false } },
|
271
|
+
{ id: 1070, label: "label changes stokeColor",
|
272
|
+
x: -400, y: 225, font: { strokeWidth: 2 },
|
273
|
+
chosen: { label: changeChosenLabelStrokeColor, node: false } },
|
274
|
+
|
275
|
+
{ id: 2000, label: "node does not change",
|
276
|
+
x: 0, y: -300,
|
277
|
+
chosen: { label: false, node: false } },
|
278
|
+
{ id: 2010, label: "node default settings",
|
279
|
+
x: 0, y: -225,
|
280
|
+
chosen: { label: false, node: true } },
|
281
|
+
{ id: 2020, label: "node changes color",
|
282
|
+
x: 0, y: -150,
|
283
|
+
chosen: { label: false, node: changeChosenNodeColor } },
|
284
|
+
{ id: 2030, label: "node changes borderWidth",
|
285
|
+
x: 0, y: -75,
|
286
|
+
chosen: { label: false, node: changeChosenNodeBorderWidth } },
|
287
|
+
{ id: 2040, label: "node changes borderColor",
|
288
|
+
x: 0, y: 0,
|
289
|
+
chosen: { label: false, node: changeChosenNodeBorderColor } },
|
290
|
+
{ id: 2050, label: "shaped nodes change size",
|
291
|
+
x: 0, y: 70, shape: 'star',
|
292
|
+
chosen: { label: false, node: changeChosenNodeSize } },
|
293
|
+
{ id: 2051, x: -60, y: 70, shape: 'dot',
|
294
|
+
chosen: { label: false, node: changeChosenNodeSize } },
|
295
|
+
{ id: 2052, x: -120, y: 70, shape: 'diamond',
|
296
|
+
chosen: { label: false, node: changeChosenNodeSize } },
|
297
|
+
{ id: 2053, x: 60, y: 70, shape: 'square',
|
298
|
+
chosen: { label: false, node: changeChosenNodeSize } },
|
299
|
+
{ id: 2054, x: 120, y: 70, shape: 'triangle',
|
300
|
+
chosen: { label: false, node: changeChosenNodeSize } },
|
301
|
+
{ id: 2055, x: 165, y: 70, shape: 'triangleDown',
|
302
|
+
chosen: { label: false, node: changeChosenNodeSize } },
|
303
|
+
{ id: 2060, label: "node changes borderDashes",
|
304
|
+
x: 0, y: 150,
|
305
|
+
chosen: { label: false, node: changeChosenNodeBorderDashes } },
|
306
|
+
{ id: 2070, label: "node changes borderRadius",
|
307
|
+
x: 0, y: 225,
|
308
|
+
chosen: { label: false, node: changeChosenNodeBorderRadius } },
|
309
|
+
{ id: 2080, label: "node changes shadow",
|
310
|
+
x: 0, y: 300,
|
311
|
+
chosen: { label: false, node: changeChosenNodeShadow } },
|
312
|
+
{ id: 2090, label: "node changes shadowColor",
|
313
|
+
x: 0, y: 375, shadow: true,
|
314
|
+
chosen: { label: false, node: changeChosenNodeShadowColor } },
|
315
|
+
{ id: 2100, label: "node changes shadowSize",
|
316
|
+
x: 0, y: 450, shadow: true,
|
317
|
+
chosen: { label: false, node: changeChosenNodeShadowSize } },
|
318
|
+
{ id: 2110, label: "node changes shadowX",
|
319
|
+
x: 0, y: 525, shadow: true,
|
320
|
+
chosen: { label: false, node: changeChosenNodeShadowX } },
|
321
|
+
{ id: 2120, label: "node changes shadowY",
|
322
|
+
x: 0, y: 600, shadow: true,
|
323
|
+
chosen: { label: false, node: changeChosenNodeShadowY } },
|
324
|
+
|
325
|
+
{ id: 3000, x: 275, y: -310, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
326
|
+
{ id: 3001, x: 525, y: -210, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
327
|
+
{ id: 3010, x: 275, y: -235, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
328
|
+
{ id: 3011, x: 525, y: -135, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
329
|
+
{ id: 3020, x: 275, y: -160, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
330
|
+
{ id: 3021, x: 525, y: -60, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
331
|
+
{ id: 3030, x: 275, y: -85, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
332
|
+
{ id: 3031, x: 525, y: 15, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
333
|
+
{ id: 3040, x: 275, y: -10, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
334
|
+
{ id: 3041, x: 525, y: 90, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
335
|
+
{ id: 3050, x: 275, y: 65, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
336
|
+
{ id: 3051, x: 525, y: 165, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
337
|
+
{ id: 3060, x: 275, y: 140, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
338
|
+
{ id: 3061, x: 525, y: 240, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
339
|
+
{ id: 3070, x: 275, y: 215, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
340
|
+
{ id: 3071, x: 525, y: 315, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
341
|
+
{ id: 3080, x: 275, y: 290, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0},
|
342
|
+
{ id: 3081, x: 525, y: 390, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
343
|
+
{ id: 3090, x: 275, y: 365, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
344
|
+
{ id: 3091, x: 525, y: 465, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
345
|
+
{ id: 3100, x: 275, y: 440, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
346
|
+
{ id: 3101, x: 525, y: 540, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
347
|
+
{ id: 3110, x: 275, y: 515, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
348
|
+
{ id: 3111, x: 525, y: 615, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
349
|
+
{ id: 3120, x: 575, y: -310, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
350
|
+
{ id: 3121, x: 825, y: -210, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
351
|
+
{ id: 3130, x: 575, y: -235, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
352
|
+
{ id: 3131, x: 825, y: -135, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
353
|
+
{ id: 3140, x: 575, y: -160, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
354
|
+
{ id: 3141, x: 825, y: -60, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
355
|
+
{ id: 3150, x: 575, y: -85, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
356
|
+
{ id: 3151, x: 825, y: 15, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
357
|
+
{ id: 3160, x: 575, y: -10, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
358
|
+
{ id: 3161, x: 825, y: 90, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
359
|
+
{ id: 3170, x: 575, y: 65, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
360
|
+
{ id: 3171, x: 825, y: 165, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
361
|
+
{ id: 3180, x: 575, y: 140, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
362
|
+
{ id: 3181, x: 825, y: 240, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
363
|
+
{ id: 3190, x: 575, y: 215, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
364
|
+
{ id: 3191, x: 825, y: 315, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
365
|
+
{ id: 3200, x: 575, y: 290, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
366
|
+
{ id: 3201, x: 825, y: 390, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
367
|
+
{ id: 3210, x: 575, y: 365, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
368
|
+
{ id: 3211, x: 825, y: 465, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
369
|
+
{ id: 3220, x: 575, y: 440, chosen: false, shape: "dot", size: 10, color: "#dd6644", borderWidth: 0 },
|
370
|
+
{ id: 3221, x: 825, y: 540, chosen: false, shape: "dot", size: 10, color: "#6699dd", borderWidth: 0 },
|
371
|
+
];
|
372
|
+
|
373
|
+
var edges = [
|
374
|
+
{ id: 4000, from: 3000, to: 3001, label: "edge does not change",
|
375
|
+
chosen: false },
|
376
|
+
{ id: 4010, from: 3010, to: 3011, label: "edge has default settings",
|
377
|
+
chosen: { label: false, edge: true } },
|
378
|
+
{ id: 4020, from: 3020, to: 3021, label: "edge changes toArrow",
|
379
|
+
chosen: { label: false, edge: changeChosenEdgeToArrow } },
|
380
|
+
{ id: 4030, from: 3030, to: 3031, label: "edge changes toArrowScale",
|
381
|
+
arrows: { to: true },
|
382
|
+
chosen: { label: false, edge: changeChosenEdgeToArrowScale } },
|
383
|
+
{ id: 4040, from: 3040, to: 3041, label: "edge changes toArrowType",
|
384
|
+
arrows: { to: true },
|
385
|
+
chosen: { label: false, edge: changeChosenEdgeToArrowType } },
|
386
|
+
{ id: 4050, from: 3050, to: 3051, label: "edge changes middleArrow",
|
387
|
+
chosen: { label: false, edge: changeChosenEdgeMiddleArrow } },
|
388
|
+
{ id: 4060, from: 3060, to: 3061, label: "edge changes middleArrowScale",
|
389
|
+
arrows: { middle: true },
|
390
|
+
chosen: { label: false, edge: changeChosenEdgeMiddleArrowScale } },
|
391
|
+
{ id: 4070, from: 3070, to: 3071, label: "edge changes middleArrowType",
|
392
|
+
arrows: { middle: true },
|
393
|
+
chosen: { label: false, edge: changeChosenEdgeMiddleArrowType } },
|
394
|
+
{ id: 4080, from: 3080, to: 3081, label: "edge changes fromArrow",
|
395
|
+
chosen: { label: false, edge: changeChosenEdgeFromArrow } },
|
396
|
+
{ id: 4090, from: 3090, to: 3091, label: "edge changes fromArrowScale",
|
397
|
+
arrows: { from: true },
|
398
|
+
chosen: { label: false, edge: changeChosenEdgeFromArrowScale } },
|
399
|
+
{ id: 4100, from: 3100, to: 3101, label: "edge changes fromArrowType",
|
400
|
+
arrows: { from: true },
|
401
|
+
chosen: { label: false, edge: changeChosenEdgeFromArrowType } },
|
402
|
+
{ id: 4110, from: 3110, to: 3111, label: "edge changes arrowStrikethrough",
|
403
|
+
arrows: { to: true, from: true }, width: 7,
|
404
|
+
chosen: { label: false, edge: changeChosenEdgeArrowStrikethrough } },
|
405
|
+
{ id: 4120, from: 3120, to: 3121, label: "edge changes color",
|
406
|
+
chosen: { label: false, edge: changeChosenEdgeColor } },
|
407
|
+
{ id: 4130, from: 3130, to: 3131, label: "edge inherits color",
|
408
|
+
chosen: { label: false, edge: changeChosenEdgeInheritsColor } },
|
409
|
+
{ id: 4140, from: 3140, to: 3141, label: "edge changes opacity",
|
410
|
+
chosen: { label: false, edge: changeChosenEdgeOpacity } },
|
411
|
+
{ id: 4150, from: 3150, to: 3151, label: "edge changes hidden",
|
412
|
+
chosen: { label: false, edge: changeChosenEdgeHidden } },
|
413
|
+
{ id: 4160, from: 3160, to: 3161, label: "edge changes shadow",
|
414
|
+
width: 7,
|
415
|
+
chosen: { label: false, edge: changeChosenEdgeShadow } },
|
416
|
+
{ id: 4170, from: 3170, to: 3171, label: "edge changes shadowColor",
|
417
|
+
shadow: true, width: 7,
|
418
|
+
chosen: { label: false, edge: changeChosenEdgeShadowColor } },
|
419
|
+
{ id: 4180, from: 3180, to: 3181, label: "edge changes shadowSize",
|
420
|
+
shadow: true, width: 7,
|
421
|
+
chosen: { label: false, edge: changeChosenEdgeShadowSize } },
|
422
|
+
{ id: 4190, from: 3190, to: 3191, label: "edge changes shadowX",
|
423
|
+
shadow: true, width: 7,
|
424
|
+
chosen: { label: false, edge: changeChosenEdgeShadowX } },
|
425
|
+
{ id: 4200, from: 3200, to: 3201, label: "edge changes shadowY",
|
426
|
+
shadow: true, width: 7,
|
427
|
+
chosen: { label: false, edge: changeChosenEdgeShadowY } },
|
428
|
+
{ id: 4210, from: 3210, to: 3211, label: "edge changes width",
|
429
|
+
chosen: { label: false, edge: changeChosenEdgeWidth } },
|
430
|
+
{ id: 4220, from: 3220, to: 3221, label: "edge changes dashes",
|
431
|
+
chosen: { label: false, edge: changeChosenEdgeDashes } },
|
432
|
+
];
|
433
|
+
|
434
|
+
var container = document.getElementById('mynetwork');
|
435
|
+
var data = {
|
436
|
+
nodes: nodes,
|
437
|
+
edges: edges
|
438
|
+
};
|
439
|
+
var options = {
|
440
|
+
edges: {
|
441
|
+
font: {
|
442
|
+
size: 16
|
443
|
+
},
|
444
|
+
selfReferenceSize: 30
|
445
|
+
},
|
446
|
+
nodes: {
|
447
|
+
shape: 'box',
|
448
|
+
widthConstraint: 250,
|
449
|
+
color: "#cccccc",
|
450
|
+
margin: 10,
|
451
|
+
font: {
|
452
|
+
size: 16
|
453
|
+
}
|
454
|
+
},
|
455
|
+
physics: {
|
456
|
+
enabled: false
|
457
|
+
},
|
458
|
+
interaction: {
|
459
|
+
hover: true
|
460
|
+
}
|
461
|
+
};
|
462
|
+
var network = new vis.Network(container, data, options);
|
463
|
+
</script>
|
464
|
+
|
465
|
+
</body>
|
466
|
+
</html>
|