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,55 @@
|
|
1
|
+
/* courtesy Ian Darwin and Geoff Collyer, Softquad Inc. */
|
2
|
+
digraph unix {
|
3
|
+
size="6,6";
|
4
|
+
node [color=lightblue, style=filled];
|
5
|
+
"5th Edition" -> "6th Edition";
|
6
|
+
"5th Edition" -> "PWB 1.0";
|
7
|
+
"6th Edition" -> "LSX";
|
8
|
+
"6th Edition" -> "1 BSD";
|
9
|
+
"6th Edition" -> "Mini Unix";
|
10
|
+
"6th Edition" -> "Wollongong";
|
11
|
+
"6th Edition" -> "Interdata";
|
12
|
+
"Interdata" -> "Unix/TS 3.0";
|
13
|
+
"Interdata" -> "PWB 2.0";
|
14
|
+
"Interdata" -> "7th Edition";
|
15
|
+
"7th Edition" -> "8th Edition";
|
16
|
+
"7th Edition" -> "32V";
|
17
|
+
"7th Edition" -> "V7M";
|
18
|
+
"7th Edition" -> "Ultrix-11";
|
19
|
+
"7th Edition" -> "Xenix";
|
20
|
+
"7th Edition" -> "UniPlus+";
|
21
|
+
"V7M" -> "Ultrix-11";
|
22
|
+
"8th Edition" -> "9th Edition";
|
23
|
+
"1 BSD" -> "2 BSD";
|
24
|
+
"2 BSD" -> "2.8 BSD";
|
25
|
+
"2.8 BSD" -> "Ultrix-11";
|
26
|
+
"2.8 BSD" -> "2.9 BSD";
|
27
|
+
"32V" -> "3 BSD";
|
28
|
+
"3 BSD" -> "4 BSD";
|
29
|
+
"4 BSD" -> "4.1 BSD";
|
30
|
+
"4.1 BSD" -> "4.2 BSD";
|
31
|
+
"4.1 BSD" -> "2.8 BSD";
|
32
|
+
"4.1 BSD" -> "8th Edition";
|
33
|
+
"4.2 BSD" -> "4.3 BSD";
|
34
|
+
"4.2 BSD" -> "Ultrix-32";
|
35
|
+
"PWB 1.0" -> "PWB 1.2";
|
36
|
+
"PWB 1.0" -> "USG 1.0";
|
37
|
+
"PWB 1.2" -> "PWB 2.0";
|
38
|
+
"USG 1.0" -> "CB Unix 1";
|
39
|
+
"USG 1.0" -> "USG 2.0";
|
40
|
+
"CB Unix 1" -> "CB Unix 2";
|
41
|
+
"CB Unix 2" -> "CB Unix 3";
|
42
|
+
"CB Unix 3" -> "Unix/TS++";
|
43
|
+
"CB Unix 3" -> "PDP-11 Sys V";
|
44
|
+
"USG 2.0" -> "USG 3.0";
|
45
|
+
"USG 3.0" -> "Unix/TS 3.0";
|
46
|
+
"PWB 2.0" -> "Unix/TS 3.0";
|
47
|
+
"Unix/TS 1.0" -> "Unix/TS 3.0";
|
48
|
+
"Unix/TS 3.0" -> "TS 4.0";
|
49
|
+
"Unix/TS++" -> "TS 4.0";
|
50
|
+
"CB Unix 3" -> "TS 4.0";
|
51
|
+
"TS 4.0" -> "System V.0";
|
52
|
+
"System V.0" -> "System V.2";
|
53
|
+
"System V.2" -> "System V.3";
|
54
|
+
}
|
55
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
digraph world {
|
2
|
+
size="7,7";
|
3
|
+
{rank=same; S8 S24 S1 S35 S30;}
|
4
|
+
{rank=same; T8 T24 T1 T35 T30;}
|
5
|
+
{rank=same; 43 37 36 10 2;}
|
6
|
+
{rank=same; 25 9 38 40 13 17 12 18;}
|
7
|
+
{rank=same; 26 42 11 3 33 19 39 14 16;}
|
8
|
+
{rank=same; 4 31 34 21 41 28 20;}
|
9
|
+
{rank=same; 27 5 22 32 29 15;}
|
10
|
+
{rank=same; 6 23;}
|
11
|
+
{rank=same; 7;}
|
12
|
+
|
13
|
+
S8 -> 9;
|
14
|
+
S24 -> 25;
|
15
|
+
S24 -> 27;
|
16
|
+
S1 -> 2;
|
17
|
+
S1 -> 10;
|
18
|
+
S35 -> 43;
|
19
|
+
S35 -> 36;
|
20
|
+
S30 -> 31;
|
21
|
+
S30 -> 33;
|
22
|
+
9 -> 42;
|
23
|
+
9 -> T1;
|
24
|
+
25 -> T1;
|
25
|
+
25 -> 26;
|
26
|
+
27 -> T24;
|
27
|
+
2 -> {3 ; 16 ; 17 ; T1 ; 18}
|
28
|
+
10 -> { 11 ; 14 ; T1 ; 13; 12;}
|
29
|
+
31 -> T1;
|
30
|
+
31 -> 32;
|
31
|
+
33 -> T30;
|
32
|
+
33 -> 34;
|
33
|
+
42 -> 4;
|
34
|
+
26 -> 4;
|
35
|
+
3 -> 4;
|
36
|
+
16 -> 15;
|
37
|
+
17 -> 19;
|
38
|
+
18 -> 29;
|
39
|
+
11 -> 4;
|
40
|
+
14 -> 15;
|
41
|
+
37 -> {39 ; 41 ; 38 ; 40;}
|
42
|
+
13 -> 19;
|
43
|
+
12 -> 29;
|
44
|
+
43 -> 38;
|
45
|
+
43 -> 40;
|
46
|
+
36 -> 19;
|
47
|
+
32 -> 23;
|
48
|
+
34 -> 29;
|
49
|
+
39 -> 15;
|
50
|
+
41 -> 29;
|
51
|
+
38 -> 4;
|
52
|
+
40 -> 19;
|
53
|
+
4 -> 5;
|
54
|
+
19 -> {21 ; 20 ; 28;}
|
55
|
+
5 -> {6 ; T35 ; 23;}
|
56
|
+
21 -> 22;
|
57
|
+
20 -> 15;
|
58
|
+
28 -> 29;
|
59
|
+
6 -> 7;
|
60
|
+
15 -> T1;
|
61
|
+
22 -> T35;
|
62
|
+
22 -> 23;
|
63
|
+
29 -> T30;
|
64
|
+
7 -> T8;
|
65
|
+
23 -> T24;
|
66
|
+
23 -> T1;
|
67
|
+
}
|
@@ -0,0 +1,266 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Network | DataSet</title>
|
5
|
+
|
6
|
+
<style type="text/css">
|
7
|
+
html, body {
|
8
|
+
font: 11pt arial;
|
9
|
+
}
|
10
|
+
|
11
|
+
h1 {
|
12
|
+
font-size: 150%;
|
13
|
+
margin: 5px 0;
|
14
|
+
}
|
15
|
+
|
16
|
+
h2 {
|
17
|
+
font-size: 100%;
|
18
|
+
margin: 5px 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
table.view {
|
22
|
+
width: 100%;
|
23
|
+
}
|
24
|
+
|
25
|
+
table td {
|
26
|
+
vertical-align: top;
|
27
|
+
}
|
28
|
+
|
29
|
+
table table {
|
30
|
+
background-color: #f5f5f5;
|
31
|
+
border: 1px solid #e5e5e5;
|
32
|
+
}
|
33
|
+
|
34
|
+
table table td {
|
35
|
+
vertical-align: middle;
|
36
|
+
}
|
37
|
+
|
38
|
+
input[type=text], pre {
|
39
|
+
border: 1px solid lightgray;
|
40
|
+
}
|
41
|
+
|
42
|
+
pre {
|
43
|
+
margin: 0;
|
44
|
+
padding: 5px;
|
45
|
+
font-size: 10pt;
|
46
|
+
}
|
47
|
+
|
48
|
+
#network {
|
49
|
+
width: 100%;
|
50
|
+
height: 400px;
|
51
|
+
border: 1px solid lightgray;
|
52
|
+
}
|
53
|
+
</style>
|
54
|
+
|
55
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
56
|
+
<link href="../../../vendor/assets/stylesheets/vis-network.min.css" rel="stylesheet" type="text/css"/>
|
57
|
+
|
58
|
+
<script type="text/javascript">
|
59
|
+
var nodes, edges, network;
|
60
|
+
|
61
|
+
// convenience method to stringify a JSON object
|
62
|
+
function toJSON(obj) {
|
63
|
+
return JSON.stringify(obj, null, 4);
|
64
|
+
}
|
65
|
+
|
66
|
+
function addNode() {
|
67
|
+
try {
|
68
|
+
nodes.add({
|
69
|
+
id: document.getElementById('node-id').value,
|
70
|
+
label: document.getElementById('node-label').value
|
71
|
+
});
|
72
|
+
}
|
73
|
+
catch (err) {
|
74
|
+
alert(err);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
function updateNode() {
|
79
|
+
try {
|
80
|
+
nodes.update({
|
81
|
+
id: document.getElementById('node-id').value,
|
82
|
+
label: document.getElementById('node-label').value
|
83
|
+
});
|
84
|
+
}
|
85
|
+
catch (err) {
|
86
|
+
alert(err);
|
87
|
+
}
|
88
|
+
}
|
89
|
+
function removeNode() {
|
90
|
+
try {
|
91
|
+
nodes.remove({id: document.getElementById('node-id').value});
|
92
|
+
}
|
93
|
+
catch (err) {
|
94
|
+
alert(err);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
function addEdge() {
|
99
|
+
try {
|
100
|
+
edges.add({
|
101
|
+
id: document.getElementById('edge-id').value,
|
102
|
+
from: document.getElementById('edge-from').value,
|
103
|
+
to: document.getElementById('edge-to').value
|
104
|
+
});
|
105
|
+
}
|
106
|
+
catch (err) {
|
107
|
+
alert(err);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
function updateEdge() {
|
111
|
+
try {
|
112
|
+
edges.update({
|
113
|
+
id: document.getElementById('edge-id').value,
|
114
|
+
from: document.getElementById('edge-from').value,
|
115
|
+
to: document.getElementById('edge-to').value
|
116
|
+
});
|
117
|
+
}
|
118
|
+
catch (err) {
|
119
|
+
alert(err);
|
120
|
+
}
|
121
|
+
}
|
122
|
+
function removeEdge() {
|
123
|
+
try {
|
124
|
+
edges.remove({id: document.getElementById('edge-id').value});
|
125
|
+
}
|
126
|
+
catch (err) {
|
127
|
+
alert(err);
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
function draw() {
|
132
|
+
// create an array with nodes
|
133
|
+
nodes = new vis.DataSet();
|
134
|
+
nodes.on('*', function () {
|
135
|
+
document.getElementById('nodes').innerHTML = JSON.stringify(nodes.get(), null, 4);
|
136
|
+
});
|
137
|
+
nodes.add([
|
138
|
+
{id: '1', label: 'Node 1'},
|
139
|
+
{id: '2', label: 'Node 2'},
|
140
|
+
{id: '3', label: 'Node 3'},
|
141
|
+
{id: '4', label: 'Node 4'},
|
142
|
+
{id: '5', label: 'Node 5'}
|
143
|
+
]);
|
144
|
+
|
145
|
+
// create an array with edges
|
146
|
+
edges = new vis.DataSet();
|
147
|
+
edges.on('*', function () {
|
148
|
+
document.getElementById('edges').innerHTML = JSON.stringify(edges.get(), null, 4);
|
149
|
+
});
|
150
|
+
edges.add([
|
151
|
+
{id: '1', from: '1', to: '2'},
|
152
|
+
{id: '2', from: '1', to: '3'},
|
153
|
+
{id: '3', from: '2', to: '4'},
|
154
|
+
{id: '4', from: '2', to: '5'}
|
155
|
+
]);
|
156
|
+
|
157
|
+
// create a network
|
158
|
+
var container = document.getElementById('network');
|
159
|
+
var data = {
|
160
|
+
nodes: nodes,
|
161
|
+
edges: edges
|
162
|
+
};
|
163
|
+
var options = {};
|
164
|
+
network = new vis.Network(container, data, options);
|
165
|
+
|
166
|
+
}
|
167
|
+
|
168
|
+
</script>
|
169
|
+
|
170
|
+
</head>
|
171
|
+
|
172
|
+
<body onload="draw();">
|
173
|
+
|
174
|
+
<p>
|
175
|
+
This example demonstrates dynamically adding, updating and removing nodes
|
176
|
+
and edges using a DataSet.
|
177
|
+
</p>
|
178
|
+
|
179
|
+
<h1>Adjust</h1>
|
180
|
+
<table>
|
181
|
+
<tr>
|
182
|
+
<td>
|
183
|
+
<h2>Node</h2>
|
184
|
+
<table>
|
185
|
+
<tr>
|
186
|
+
<td></td>
|
187
|
+
<td><label for="node-id">Id</label></td>
|
188
|
+
<td><input id="node-id" type="text" value="6"></td>
|
189
|
+
</tr>
|
190
|
+
<tr>
|
191
|
+
<td></td>
|
192
|
+
<td><label for="node-label">Label</label></td>
|
193
|
+
<td><input id="node-label" type="text" value="Node 6"></td>
|
194
|
+
</tr>
|
195
|
+
<tr>
|
196
|
+
<td></td>
|
197
|
+
<td>Action</td>
|
198
|
+
<td>
|
199
|
+
<button id="node-add" onclick="addNode();">Add</button>
|
200
|
+
<button id="node-update" onclick="updateNode();">Update</button>
|
201
|
+
<button id="node-remove" onclick="removeNode();">Remove</button>
|
202
|
+
</td>
|
203
|
+
</tr>
|
204
|
+
</table>
|
205
|
+
</td>
|
206
|
+
<td>
|
207
|
+
<h2>Edge</h2>
|
208
|
+
<table>
|
209
|
+
<tr>
|
210
|
+
<td></td>
|
211
|
+
<td><label for="edge-id">Id</label></td>
|
212
|
+
<td><input id="edge-id" type="text" value="5"></td>
|
213
|
+
</tr>
|
214
|
+
<tr>
|
215
|
+
<td></td>
|
216
|
+
<td><label for="edge-from">From</label></td>
|
217
|
+
<td><input id="edge-from" type="text" value="3"></td>
|
218
|
+
</tr>
|
219
|
+
<tr>
|
220
|
+
<td></td>
|
221
|
+
<td><label for="edge-to">To</label></td>
|
222
|
+
<td><input id="edge-to" type="text" value="4"></td>
|
223
|
+
</tr>
|
224
|
+
<tr>
|
225
|
+
<td></td>
|
226
|
+
<td>Action</td>
|
227
|
+
<td>
|
228
|
+
<button id="edge-add" onclick="addEdge();">Add</button>
|
229
|
+
<button id="edge-update" onclick="updateEdge();">Update</button>
|
230
|
+
<button id="edge-remove" onclick="removeEdge();">Remove</button>
|
231
|
+
</td>
|
232
|
+
</tr>
|
233
|
+
</table>
|
234
|
+
</td>
|
235
|
+
</tr>
|
236
|
+
|
237
|
+
</table>
|
238
|
+
|
239
|
+
<h1>View</h1>
|
240
|
+
<table class="view">
|
241
|
+
<colgroup>
|
242
|
+
<col width="25%">
|
243
|
+
<col width="25%">
|
244
|
+
<col width="50%">
|
245
|
+
</colgroup>
|
246
|
+
<tr>
|
247
|
+
<td>
|
248
|
+
<h2>Nodes</h2>
|
249
|
+
<pre id="nodes"></pre>
|
250
|
+
</td>
|
251
|
+
|
252
|
+
<td>
|
253
|
+
<h2>Edges</h2>
|
254
|
+
<pre id="edges"></pre>
|
255
|
+
</td>
|
256
|
+
|
257
|
+
<td>
|
258
|
+
<h2>Network</h2>
|
259
|
+
|
260
|
+
<div id="network"></div>
|
261
|
+
</td>
|
262
|
+
</tr>
|
263
|
+
</table>
|
264
|
+
|
265
|
+
</body>
|
266
|
+
</html>
|
@@ -0,0 +1,174 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!-- saved from url=(0044)http://kenedict.com/networks/worldcup14/vis/ , thanks Andre!-->
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF8">
|
6
|
+
<title>Dynamic Data - Importing from Gephi (JSON)</title>
|
7
|
+
<script type="text/javascript" src="../exampleUtil.js"></script>
|
8
|
+
|
9
|
+
<script type="text/javascript" src="../../../vendor/assets/javascripts/vis.js"></script>
|
10
|
+
<link type="text/css" rel="stylesheet" href="../../../vendor/assets/stylesheets/vis-network.min.css">
|
11
|
+
|
12
|
+
<style type="text/css">
|
13
|
+
#mynetwork {
|
14
|
+
width: 800px;
|
15
|
+
height: 800px;
|
16
|
+
border: 1px solid lightgray;
|
17
|
+
}
|
18
|
+
|
19
|
+
div.nodeContent {
|
20
|
+
position: relative;
|
21
|
+
border: 1px solid lightgray;
|
22
|
+
width: 480px;
|
23
|
+
height: 780px;
|
24
|
+
margin-top: -802px;
|
25
|
+
margin-left: 810px;
|
26
|
+
padding: 10px;
|
27
|
+
}
|
28
|
+
|
29
|
+
pre {
|
30
|
+
padding: 5px;
|
31
|
+
margin: 5px;
|
32
|
+
}
|
33
|
+
|
34
|
+
.string {
|
35
|
+
color: green;
|
36
|
+
}
|
37
|
+
|
38
|
+
.number {
|
39
|
+
color: darkorange;
|
40
|
+
}
|
41
|
+
|
42
|
+
.boolean {
|
43
|
+
color: blue;
|
44
|
+
}
|
45
|
+
|
46
|
+
.null {
|
47
|
+
color: magenta;
|
48
|
+
}
|
49
|
+
|
50
|
+
.key {
|
51
|
+
color: red;
|
52
|
+
}
|
53
|
+
</style>
|
54
|
+
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
|
59
|
+
<h2>Dynamic Data - Importing from Gephi (JSON)</h2>
|
60
|
+
|
61
|
+
<div style="width:700px; font-size:14px; text-align: justify;">
|
62
|
+
This example shows how to import a JSON file exported by Gephi. The two
|
63
|
+
options available for the import are
|
64
|
+
available through the checkboxes. You can download the Gephi JSON exporter
|
65
|
+
here:
|
66
|
+
<a href="https://marketplace.gephi.org/plugin/json-exporter/" target="_blank">https://marketplace.gephi.org/plugin/json-exporter/</a>.
|
67
|
+
All of Gephi's attributes are also contained within the node elements. This
|
68
|
+
means you can access all of this data through the DataSet.
|
69
|
+
<br/>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
<p>
|
73
|
+
<label><input type="checkbox" id="fixed" checked="checked"/> Fix in place after import.</label><br>
|
74
|
+
<label><input type="checkbox" id="parseColor"/> Parse the color instead of
|
75
|
+
copy (adds borders, highlights etc.)</label>
|
76
|
+
</p>
|
77
|
+
|
78
|
+
<div id="mynetwork"></div>
|
79
|
+
<div class="nodeContent"><h4>Node Content:</h4>
|
80
|
+
<pre id="nodeContent"></pre>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<script type="text/javascript">
|
84
|
+
var network;
|
85
|
+
|
86
|
+
var nodes = new vis.DataSet();
|
87
|
+
var edges = new vis.DataSet();
|
88
|
+
var gephiImported;
|
89
|
+
var fixedCheckbox = document.getElementById('fixed');
|
90
|
+
fixedCheckbox.onchange = redrawAll;
|
91
|
+
|
92
|
+
var parseColorCheckbox = document.getElementById('parseColor');
|
93
|
+
parseColorCheckbox.onchange = redrawAll;
|
94
|
+
|
95
|
+
var nodeContent = document.getElementById('nodeContent');
|
96
|
+
|
97
|
+
loadJSON('../datasources/WorldCup2014.json', redrawAll, function(err) {console.log('error')});
|
98
|
+
|
99
|
+
var container = document.getElementById('mynetwork');
|
100
|
+
var data = {
|
101
|
+
nodes: nodes,
|
102
|
+
edges: edges
|
103
|
+
};
|
104
|
+
var options = {
|
105
|
+
nodes: {
|
106
|
+
shape: 'dot',
|
107
|
+
font: {
|
108
|
+
face: 'Tahoma'
|
109
|
+
}
|
110
|
+
},
|
111
|
+
edges: {
|
112
|
+
width: 0.15,
|
113
|
+
smooth: {
|
114
|
+
type: 'continuous'
|
115
|
+
}
|
116
|
+
},
|
117
|
+
interaction: {
|
118
|
+
tooltipDelay: 200,
|
119
|
+
hideEdgesOnDrag: true
|
120
|
+
},
|
121
|
+
physics: {
|
122
|
+
stabilization: false,
|
123
|
+
barnesHut: {
|
124
|
+
gravitationalConstant: -10000,
|
125
|
+
springConstant: 0.002,
|
126
|
+
springLength: 150
|
127
|
+
}
|
128
|
+
}
|
129
|
+
};
|
130
|
+
|
131
|
+
network = new vis.Network(container, data, options);
|
132
|
+
network.on('click', function (params) {
|
133
|
+
if (params.nodes.length > 0) {
|
134
|
+
var data = nodes.get(params.nodes[0]); // get the data from selected node
|
135
|
+
nodeContent.innerHTML = JSON.stringify(data, undefined, 3); // show the data in the div
|
136
|
+
}
|
137
|
+
})
|
138
|
+
|
139
|
+
/**
|
140
|
+
* This function fills the DataSets. These DataSets will update the network.
|
141
|
+
*/
|
142
|
+
function redrawAll(gephiJSON) {
|
143
|
+
if (gephiJSON.nodes === undefined) {
|
144
|
+
gephiJSON = gephiImported;
|
145
|
+
}
|
146
|
+
else {
|
147
|
+
gephiImported = gephiJSON;
|
148
|
+
}
|
149
|
+
|
150
|
+
nodes.clear();
|
151
|
+
edges.clear();
|
152
|
+
|
153
|
+
var fixed = fixedCheckbox.checked;
|
154
|
+
var parseColor = parseColorCheckbox.checked;
|
155
|
+
|
156
|
+
var parsed = vis.network.gephiParser.parseGephi(gephiJSON, {
|
157
|
+
fixed: fixed,
|
158
|
+
parseColor: parseColor
|
159
|
+
});
|
160
|
+
|
161
|
+
// add the parsed data to the DataSets.
|
162
|
+
nodes.add(parsed.nodes);
|
163
|
+
edges.add(parsed.edges);
|
164
|
+
|
165
|
+
var data = nodes.get(2); // get the data from node 2 as example
|
166
|
+
nodeContent.innerHTML = JSON.stringify(data,undefined,3); // show the data in the div
|
167
|
+
network.fit(); // zoom to fit
|
168
|
+
}
|
169
|
+
|
170
|
+
</script>
|
171
|
+
|
172
|
+
|
173
|
+
</body>
|
174
|
+
</html>
|