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,79 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<title>Timeline | performance</title>
|
6
|
+
|
7
|
+
<style>
|
8
|
+
body,
|
9
|
+
html {
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
font-size: 11pt;
|
12
|
+
}
|
13
|
+
</style>
|
14
|
+
|
15
|
+
<!-- note: moment.js must be loaded before vis.js, else vis.js uses its embedded version of moment.js -->
|
16
|
+
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js"></script>
|
17
|
+
|
18
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
19
|
+
<link href="../../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
20
|
+
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<p>
|
25
|
+
Test the performance with a lot of items. The Timeline can load hundreds of thousands of items, but the performance of rendering
|
26
|
+
them in the browser is limited. Rendering typically runs smooth for up to a few hundreds of items at once (you can set
|
27
|
+
a
|
28
|
+
<code>zoomMax</code> to prevent the user from zooming out too far).
|
29
|
+
</p>
|
30
|
+
<p>
|
31
|
+
<label for="count">Number of items</label>
|
32
|
+
<input id="count" value="10000">
|
33
|
+
<input id="draw" type="button" value="draw">
|
34
|
+
</p>
|
35
|
+
<div id="visualization"></div>
|
36
|
+
|
37
|
+
<script>
|
38
|
+
// create a dataset with items
|
39
|
+
var now = moment().minutes(0).seconds(0).milliseconds(0);
|
40
|
+
var items = new vis.DataSet({
|
41
|
+
type: {
|
42
|
+
start: 'ISODate',
|
43
|
+
end: 'ISODate'
|
44
|
+
}
|
45
|
+
});
|
46
|
+
|
47
|
+
// create data
|
48
|
+
function createData() {
|
49
|
+
var count = parseInt(document.getElementById('count').value) || 100;
|
50
|
+
var newData = [];
|
51
|
+
var start = now;
|
52
|
+
for (var i = 0; i < count; i++) {
|
53
|
+
newData.push({
|
54
|
+
id: i,
|
55
|
+
content: 'item ' + i,
|
56
|
+
start: start + 24 * 3600 * 1000 * i
|
57
|
+
}); // much much faster than now.clone add days
|
58
|
+
}
|
59
|
+
items.clear();
|
60
|
+
items.add(newData);
|
61
|
+
}
|
62
|
+
createData();
|
63
|
+
|
64
|
+
document.getElementById('draw').onclick = createData;
|
65
|
+
|
66
|
+
var container = document.getElementById('visualization');
|
67
|
+
var options = {
|
68
|
+
editable: true,
|
69
|
+
start: now.clone().add(-3, 'days'),
|
70
|
+
end: now.clone().add(11, 'days'),
|
71
|
+
zoomMin: 1000 * 60 * 60 * 24, // a day
|
72
|
+
zoomMax: 1000 * 60 * 60 * 24 * 30 * 3 // three months
|
73
|
+
};
|
74
|
+
|
75
|
+
var timeline = new vis.Timeline(container, items, options);
|
76
|
+
</script>
|
77
|
+
</body>
|
78
|
+
|
79
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Timeline require.js demo</title>
|
5
|
+
|
6
|
+
<script data-main="scripts/main" src="scripts/require.js"></script>
|
7
|
+
|
8
|
+
<link href="../../../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
9
|
+
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<p>
|
13
|
+
This example shows how to load the vis.js library using require.js.
|
14
|
+
</p>
|
15
|
+
<div id="visualization"></div>
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require.config({
|
2
|
+
paths: {
|
3
|
+
vis: '../../../../../dist/vis'
|
4
|
+
}
|
5
|
+
});
|
6
|
+
|
7
|
+
require(['vis'], function (vis) {
|
8
|
+
var container = document.getElementById('visualization');
|
9
|
+
var data = new vis.DataSet([
|
10
|
+
{id: 1, content: 'item 1', start: '2013-04-20'},
|
11
|
+
{id: 2, content: 'item 2', start: '2013-04-14'},
|
12
|
+
{id: 3, content: 'item 3', start: '2013-04-18'},
|
13
|
+
{id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19'},
|
14
|
+
{id: 5, content: 'item 5', start: '2013-04-25'},
|
15
|
+
{id: 6, content: 'item 6', start: '2013-04-27'}
|
16
|
+
]);
|
17
|
+
var options = {};
|
18
|
+
var timeline = new vis.Timeline(container, data, options);
|
19
|
+
});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*
|
2
|
+
RequireJS 2.1.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
3
|
+
Available via the MIT or new BSD license.
|
4
|
+
see: http://github.com/jrburke/requirejs for details
|
5
|
+
*/
|
6
|
+
var requirejs,require,define;
|
7
|
+
(function(Y){function H(b){return"[object Function]"===L.call(b)}function I(b){return"[object Array]"===L.call(b)}function x(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function M(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function r(b,c){return da.call(b,c)}function i(b,c){return r(b,c)&&b[c]}function E(b,c){for(var d in b)if(r(b,d)&&c(b[d],d))break}function Q(b,c,d,i){c&&E(c,function(c,h){if(d||!r(b,h))i&&"string"!==typeof c?(b[h]||(b[h]={}),Q(b[h],
|
8
|
+
c,d,i)):b[h]=c});return b}function t(b,c){return function(){return c.apply(b,arguments)}}function Z(b){if(!b)return b;var c=Y;x(b.split("."),function(b){c=c[b]});return c}function J(b,c,d,i){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=i;d&&(c.originalError=d);return c}function ea(b){function c(a,g,v){var e,n,b,c,d,j,f,h=g&&g.split("/");e=h;var l=m.map,k=l&&l["*"];if(a&&"."===a.charAt(0))if(g){e=i(m.pkgs,g)?h=[g]:h.slice(0,h.length-1);g=a=e.concat(a.split("/"));
|
9
|
+
for(e=0;g[e];e+=1)if(n=g[e],"."===n)g.splice(e,1),e-=1;else if(".."===n)if(1===e&&(".."===g[2]||".."===g[0]))break;else 0<e&&(g.splice(e-1,2),e-=2);e=i(m.pkgs,g=a[0]);a=a.join("/");e&&a===g+"/"+e.main&&(a=g)}else 0===a.indexOf("./")&&(a=a.substring(2));if(v&&(h||k)&&l){g=a.split("/");for(e=g.length;0<e;e-=1){b=g.slice(0,e).join("/");if(h)for(n=h.length;0<n;n-=1)if(v=i(l,h.slice(0,n).join("/")))if(v=i(v,b)){c=v;d=e;break}if(c)break;!j&&(k&&i(k,b))&&(j=i(k,b),f=e)}!c&&j&&(c=j,d=f);c&&(g.splice(0,d,
|
10
|
+
c),a=g.join("/"))}return a}function d(a){z&&x(document.getElementsByTagName("script"),function(g){if(g.getAttribute("data-requiremodule")===a&&g.getAttribute("data-requirecontext")===j.contextName)return g.parentNode.removeChild(g),!0})}function y(a){var g=i(m.paths,a);if(g&&I(g)&&1<g.length)return d(a),g.shift(),j.require.undef(a),j.require([a]),!0}function f(a){var g,b=a?a.indexOf("!"):-1;-1<b&&(g=a.substring(0,b),a=a.substring(b+1,a.length));return[g,a]}function h(a,g,b,e){var n,u,d=null,h=g?g.name:
|
11
|
+
null,l=a,m=!0,k="";a||(m=!1,a="_@r"+(L+=1));a=f(a);d=a[0];a=a[1];d&&(d=c(d,h,e),u=i(p,d));a&&(d?k=u&&u.normalize?u.normalize(a,function(a){return c(a,h,e)}):c(a,h,e):(k=c(a,h,e),a=f(k),d=a[0],k=a[1],b=!0,n=j.nameToUrl(k)));b=d&&!u&&!b?"_unnormalized"+(M+=1):"";return{prefix:d,name:k,parentMap:g,unnormalized:!!b,url:n,originalName:l,isDefine:m,id:(d?d+"!"+k:k)+b}}function q(a){var g=a.id,b=i(k,g);b||(b=k[g]=new j.Module(a));return b}function s(a,g,b){var e=a.id,n=i(k,e);if(r(p,e)&&(!n||n.defineEmitComplete))"defined"===
|
12
|
+
g&&b(p[e]);else q(a).on(g,b)}function C(a,g){var b=a.requireModules,e=!1;if(g)g(a);else if(x(b,function(g){if(g=i(k,g))g.error=a,g.events.error&&(e=!0,g.emit("error",a))}),!e)l.onError(a)}function w(){R.length&&(fa.apply(F,[F.length-1,0].concat(R)),R=[])}function A(a,g,b){var e=a.map.id;a.error?a.emit("error",a.error):(g[e]=!0,x(a.depMaps,function(e,c){var d=e.id,h=i(k,d);h&&(!a.depMatched[c]&&!b[d])&&(i(g,d)?(a.defineDep(c,p[d]),a.check()):A(h,g,b))}),b[e]=!0)}function B(){var a,g,b,e,n=(b=1E3*m.waitSeconds)&&
|
13
|
+
j.startTime+b<(new Date).getTime(),c=[],h=[],f=!1,l=!0;if(!T){T=!0;E(k,function(b){a=b.map;g=a.id;if(b.enabled&&(a.isDefine||h.push(b),!b.error))if(!b.inited&&n)y(g)?f=e=!0:(c.push(g),d(g));else if(!b.inited&&(b.fetched&&a.isDefine)&&(f=!0,!a.prefix))return l=!1});if(n&&c.length)return b=J("timeout","Load timeout for modules: "+c,null,c),b.contextName=j.contextName,C(b);l&&x(h,function(a){A(a,{},{})});if((!n||e)&&f)if((z||$)&&!U)U=setTimeout(function(){U=0;B()},50);T=!1}}function D(a){r(p,a[0])||
|
14
|
+
q(h(a[0],null,!0)).init(a[1],a[2])}function G(a){var a=a.currentTarget||a.srcElement,b=j.onScriptLoad;a.detachEvent&&!V?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=j.onScriptError;(!a.detachEvent||V)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function K(){var a;for(w();F.length;){a=F.shift();if(null===a[0])return C(J("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));D(a)}}var T,W,j,N,U,m={waitSeconds:7,
|
15
|
+
baseUrl:"./",paths:{},pkgs:{},shim:{},map:{},config:{}},k={},X={},F=[],p={},S={},L=1,M=1;N={require:function(a){return a.require?a.require:a.require=j.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?a.exports:a.exports=p[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return m.config&&i(m.config,a.map.id)||{}},exports:p[a.map.id]}}};W=function(a){this.events=i(X,a.id)||{};this.map=a;this.shim=
|
16
|
+
i(m.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};W.prototype={init:function(a,b,c,e){e=e||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=t(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=e.ignore;e.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=
|
17
|
+
b)},fetch:function(){if(!this.fetched){this.fetched=!0;j.startTime=(new Date).getTime();var a=this.map;if(this.shim)j.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],t(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;S[a]||(S[a]=!0,j.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var e=this.exports,n=this.factory;
|
18
|
+
if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(H(n)){if(this.events.error)try{e=j.execCb(c,n,b,e)}catch(d){a=d}else e=j.execCb(c,n,b,e);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports));if(a)return a.requireMap=this.map,a.requireModules=[this.map.id],a.requireType="define",C(this.error=a)}else e=n;this.exports=e;if(this.map.isDefine&&
|
19
|
+
!this.ignore&&(p[c]=e,l.onResourceLoad))l.onResourceLoad(j,this.map,this.depMaps);delete k[c];this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=h(a.prefix);this.depMaps.push(d);s(d,"defined",t(this,function(e){var n,d;d=this.map.name;var v=this.map.parentMap?this.map.parentMap.name:null,f=j.makeRequire(a.parentMap,{enableBuildCallback:!0,
|
20
|
+
skipMap:!0});if(this.map.unnormalized){if(e.normalize&&(d=e.normalize(d,function(a){return c(a,v,!0)})||""),e=h(a.prefix+"!"+d,this.map.parentMap),s(e,"defined",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=i(k,e.id)){this.depMaps.push(e);if(this.events.error)d.on("error",t(this,function(a){this.emit("error",a)}));d.enable()}}else n=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),n.error=t(this,function(a){this.inited=!0;this.error=
|
21
|
+
a;a.requireModules=[b];E(k,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&delete k[a.map.id]});C(a)}),n.fromText=t(this,function(e,c){var d=a.name,u=h(d),v=O;c&&(e=c);v&&(O=!1);q(u);r(m.config,b)&&(m.config[d]=m.config[b]);try{l.exec(e)}catch(k){throw Error("fromText eval for "+d+" failed: "+k);}v&&(O=!0);this.depMaps.push(u);j.completeLoad(d);f([d],n)}),e.load(a.name,f,n,m)}));j.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){this.enabling=this.enabled=!0;x(this.depMaps,t(this,function(a,
|
22
|
+
b){var c,e;if("string"===typeof a){a=h(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=i(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;s(a,"defined",t(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&s(a,"error",this.errback)}c=a.id;e=k[c];!r(N,c)&&(e&&!e.enabled)&&j.enable(a,this)}));E(this.pluginMaps,t(this,function(a){var b=i(k,a.id);b&&!b.enabled&&j.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=
|
23
|
+
this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){x(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};j={config:m,contextName:b,registry:k,defined:p,urlFetched:S,defQueue:F,Module:W,makeModuleMap:h,nextTick:l.nextTick,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=m.pkgs,c=m.shim,e={paths:!0,config:!0,map:!0};E(a,function(a,b){e[b]?"map"===b?Q(m[b],a,!0,!0):Q(m[b],a,!0):m[b]=a});a.shim&&(E(a.shim,function(a,
|
24
|
+
b){I(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=j.makeShimExports(a);c[b]=a}),m.shim=c);a.packages&&(x(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||"main").replace(ga,"").replace(aa,"")}}),m.pkgs=b);E(k,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=h(b))});if(a.deps||a.callback)j.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(Y,arguments));
|
25
|
+
return b||a.exports&&Z(a.exports)}},makeRequire:function(a,d){function f(e,c,u){var i,m;d.enableBuildCallback&&(c&&H(c))&&(c.__requireJsBuild=!0);if("string"===typeof e){if(H(c))return C(J("requireargs","Invalid require call"),u);if(a&&r(N,e))return N[e](k[a.id]);if(l.get)return l.get(j,e,a);i=h(e,a,!1,!0);i=i.id;return!r(p,i)?C(J("notloaded",'Module name "'+i+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):p[i]}K();j.nextTick(function(){K();m=q(h(null,a));m.skipMap=d.skipMap;
|
26
|
+
m.init(e,c,u,{enabled:!0});B()});return f}d=d||{};Q(f,{isBrowser:z,toUrl:function(b){var d=b.lastIndexOf("."),g=null;-1!==d&&(g=b.substring(d,b.length),b=b.substring(0,d));return j.nameToUrl(c(b,a&&a.id,!0),g)},defined:function(b){return r(p,h(b,a,!1,!0).id)},specified:function(b){b=h(b,a,!1,!0).id;return r(p,b)||r(k,b)}});a||(f.undef=function(b){w();var c=h(b,a,!0),d=i(k,b);delete p[b];delete S[c.url];delete X[b];d&&(d.events.defined&&(X[b]=d.events),delete k[b])});return f},enable:function(a){i(k,
|
27
|
+
a.id)&&q(a).enable()},completeLoad:function(a){var b,c,d=i(m.shim,a)||{},h=d.exports;for(w();F.length;){c=F.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);D(c)}c=i(k,a);if(!b&&!r(p,a)&&c&&!c.inited){if(m.enforceDefine&&(!h||!Z(h)))return y(a)?void 0:C(J("nodefine","No define call for "+a,null,[a]));D([a,d.deps||[],d.exportsFn])}B()},nameToUrl:function(a,b){var c,d,h,f,j,k;if(l.jsExtRegExp.test(a))f=a+(b||"");else{c=m.paths;d=m.pkgs;f=a.split("/");for(j=f.length;0<j;j-=1)if(k=
|
28
|
+
f.slice(0,j).join("/"),h=i(d,k),k=i(c,k)){I(k)&&(k=k[0]);f.splice(0,j,k);break}else if(h){c=a===h.name?h.location+"/"+h.main:h.location;f.splice(0,j,c);break}f=f.join("/");f+=b||(/\?/.test(f)?"":".js");f=("/"===f.charAt(0)||f.match(/^[\w\+\.\-]+:/)?"":m.baseUrl)+f}return m.urlArgs?f+((-1===f.indexOf("?")?"?":"&")+m.urlArgs):f},load:function(a,b){l.load(j,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ha.test((a.currentTarget||a.srcElement).readyState))P=
|
29
|
+
null,a=G(a),j.completeLoad(a.id)},onScriptError:function(a){var b=G(a);if(!y(b.id))return C(J("scripterror","Script error",a,[b.id]))}};j.require=j.makeRequire();return j}var l,w,A,D,s,G,P,K,ba,ca,ia=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ja=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,aa=/\.js$/,ga=/^\.\//;w=Object.prototype;var L=w.toString,da=w.hasOwnProperty,fa=Array.prototype.splice,z=!!("undefined"!==typeof window&&navigator&&document),$=!z&&"undefined"!==typeof importScripts,ha=z&&
|
30
|
+
"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,V="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),B={},q={},R=[],O=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(H(requirejs))return;q=requirejs;requirejs=void 0}"undefined"!==typeof require&&!H(require)&&(q=require,require=void 0);l=requirejs=function(b,c,d,y){var f,h="_";!I(b)&&"string"!==typeof b&&(f=b,I(c)?(b=c,c=d,d=y):b=[]);f&&f.context&&(h=f.context);(y=i(B,h))||(y=B[h]=l.s.newContext(h));
|
31
|
+
f&&y.configure(f);return y.require(b,c,d)};l.config=function(b){return l(b)};l.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=l);l.version="2.1.2";l.jsExtRegExp=/^\/|:|\?|\.js$/;l.isBrowser=z;w=l.s={contexts:B,newContext:ea};l({});x(["toUrl","undef","defined","specified"],function(b){l[b]=function(){var c=B._;return c.require[b].apply(c,arguments)}});if(z&&(A=w.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))A=
|
32
|
+
w.head=D.parentNode;l.onError=function(b){throw b;};l.load=function(b,c,d){var i=b&&b.config||{},f;if(z)return f=i.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),f.type=i.scriptType||"text/javascript",f.charset="utf-8",f.async=!0,f.setAttribute("data-requirecontext",b.contextName),f.setAttribute("data-requiremodule",c),f.attachEvent&&!(f.attachEvent.toString&&0>f.attachEvent.toString().indexOf("[native code"))&&!V?(O=!0,f.attachEvent("onreadystatechange",
|
33
|
+
b.onScriptLoad)):(f.addEventListener("load",b.onScriptLoad,!1),f.addEventListener("error",b.onScriptError,!1)),f.src=d,K=f,D?A.insertBefore(f,D):A.appendChild(f),K=null,f;$&&(importScripts(d),b.completeLoad(c))};z&&M(document.getElementsByTagName("script"),function(b){A||(A=b.parentNode);if(s=b.getAttribute("data-main"))return q.baseUrl||(G=s.split("/"),ba=G.pop(),ca=G.length?G.join("/")+"/":"./",q.baseUrl=ca,s=ba),s=s.replace(aa,""),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var i,
|
34
|
+
f;"string"!==typeof b&&(d=c,c=b,b=null);I(c)||(d=c,c=[]);!c.length&&H(d)&&d.length&&(d.toString().replace(ia,"").replace(ja,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c));if(O){if(!(i=K))P&&"interactive"===P.readyState||M(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),i=P;i&&(b||(b=i.getAttribute("data-requiremodule")),f=B[i.getAttribute("data-requirecontext")])}(f?f.defQueue:R).push([b,c,d])};define.amd=
|
35
|
+
{jQuery:!0};l.exec=function(b){return eval(b)};l(q)}})(this);
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<title>Timeline | RTL example</title>
|
6
|
+
|
7
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
|
8
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
9
|
+
<link href="../../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
10
|
+
|
11
|
+
</head>
|
12
|
+
|
13
|
+
<body>
|
14
|
+
|
15
|
+
<h1>Timeline RTL support</h1>
|
16
|
+
|
17
|
+
<h2>Using
|
18
|
+
<code>dir = "rtl"</code> in any parent node</h2>
|
19
|
+
<div id="timeline1" dir="rtl"></div>
|
20
|
+
|
21
|
+
<h2>Using
|
22
|
+
<code>options.rtl = true</code>
|
23
|
+
</h2>
|
24
|
+
<div id="timeline2"></div>
|
25
|
+
|
26
|
+
<script>
|
27
|
+
var items = new vis.DataSet();
|
28
|
+
// add items to the DataSet
|
29
|
+
items.add([{
|
30
|
+
id: 1,
|
31
|
+
content: '2014-01-23 <br>start',
|
32
|
+
start: '2014-01-23'
|
33
|
+
},
|
34
|
+
{
|
35
|
+
id: 2,
|
36
|
+
content: '2014-01-18',
|
37
|
+
start: '2014-01-18'
|
38
|
+
},
|
39
|
+
{
|
40
|
+
id: 3,
|
41
|
+
content: '2014-01-21',
|
42
|
+
start: '2014-01-21'
|
43
|
+
},
|
44
|
+
{
|
45
|
+
id: 4,
|
46
|
+
content: '2014-01-19 - 2014-01-24',
|
47
|
+
start: '2014-01-19',
|
48
|
+
end: '2014-01-24'
|
49
|
+
},
|
50
|
+
{
|
51
|
+
id: 5,
|
52
|
+
content: '2014-01-28',
|
53
|
+
start: '2014-01-28',
|
54
|
+
type: 'point'
|
55
|
+
},
|
56
|
+
{
|
57
|
+
id: 6,
|
58
|
+
content: '2014-01-26',
|
59
|
+
start: '2014-01-26'
|
60
|
+
}
|
61
|
+
]);
|
62
|
+
|
63
|
+
var container1 = document.getElementById('timeline1');
|
64
|
+
var container2 = document.getElementById('timeline2');
|
65
|
+
|
66
|
+
var options = {
|
67
|
+
start: '2014-01-10',
|
68
|
+
end: '2014-02-10',
|
69
|
+
height: '300px',
|
70
|
+
};
|
71
|
+
|
72
|
+
var options1 = jQuery.extend(options, {})
|
73
|
+
var timeline1 = new vis.Timeline(container1, items, options1);
|
74
|
+
|
75
|
+
var options2 = jQuery.extend(options, {
|
76
|
+
rtl: true
|
77
|
+
})
|
78
|
+
var timeline2 = new vis.Timeline(container2, items, options2);
|
79
|
+
</script>
|
80
|
+
</body>
|
81
|
+
|
82
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<!--
|
3
|
+
This example is used mainly for developers to test performance issues by controlling number of groups,
|
4
|
+
number of items and their types.
|
5
|
+
-->
|
6
|
+
<html>
|
7
|
+
|
8
|
+
<head>
|
9
|
+
<title>Timeline | Stress Performance example</title>
|
10
|
+
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js"></script>
|
11
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
12
|
+
<link href="../../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body>
|
16
|
+
<div id="visualization"></div>
|
17
|
+
</body>
|
18
|
+
|
19
|
+
<script>
|
20
|
+
var now = moment();
|
21
|
+
var groupCount = 20;
|
22
|
+
var itemCount = 400;
|
23
|
+
|
24
|
+
// create a data set with groups
|
25
|
+
var groups = new vis.DataSet();
|
26
|
+
for (var g = 0; g < groupCount; g++) {
|
27
|
+
groups.add({
|
28
|
+
id: g,
|
29
|
+
content: "group " + g
|
30
|
+
});
|
31
|
+
}
|
32
|
+
|
33
|
+
var types = ['point', 'range', 'box', 'background']
|
34
|
+
// create a dataset with items
|
35
|
+
var items = new vis.DataSet();
|
36
|
+
for (var i = 0; i < itemCount; i++) {
|
37
|
+
var start = now.clone().add(Math.random() * 180, 'days');
|
38
|
+
var end = start.clone().add(Math.random() * 30, 'days');
|
39
|
+
var group = Math.floor(Math.random() * groupCount);
|
40
|
+
items.add({
|
41
|
+
id: i,
|
42
|
+
type: types[Math.floor(Math.random() * types.length)],
|
43
|
+
group: group,
|
44
|
+
content: '' + i,
|
45
|
+
start: start,
|
46
|
+
end: end
|
47
|
+
});
|
48
|
+
}
|
49
|
+
|
50
|
+
// create visualization
|
51
|
+
var container = document.getElementById('visualization');
|
52
|
+
var options = {
|
53
|
+
width: '100%',
|
54
|
+
showCurrentTime: false,
|
55
|
+
stack: true,
|
56
|
+
selectable: true,
|
57
|
+
editable: true,
|
58
|
+
};
|
59
|
+
|
60
|
+
var timeline = new vis.Timeline(container);
|
61
|
+
timeline.setOptions(options);
|
62
|
+
timeline.setGroups(groups);
|
63
|
+
timeline.setItems(items);
|
64
|
+
</script>
|
65
|
+
|
66
|
+
</html>
|
@@ -0,0 +1,98 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<title>Timeline | Time zone</title>
|
6
|
+
|
7
|
+
<style type="text/css">
|
8
|
+
body,
|
9
|
+
html {
|
10
|
+
font-family: sans-serif;
|
11
|
+
max-width: 800px;
|
12
|
+
}
|
13
|
+
</style>
|
14
|
+
|
15
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
16
|
+
<link href="../../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
17
|
+
|
18
|
+
</head>
|
19
|
+
|
20
|
+
<body>
|
21
|
+
|
22
|
+
<h1>Time zone</h1>
|
23
|
+
|
24
|
+
<p>
|
25
|
+
The following demo shows how to display items in local time (default), in UTC, or for a specific time zone offset. By configuring
|
26
|
+
your own
|
27
|
+
<code>moment</code> constructor, you can display items in the time zone that you want. All timelines have the same start and
|
28
|
+
end date.
|
29
|
+
</p>
|
30
|
+
|
31
|
+
<h2>Local time</h2>
|
32
|
+
<div id="local"></div>
|
33
|
+
|
34
|
+
<h2>UTC</h2>
|
35
|
+
<div id="utc"></div>
|
36
|
+
|
37
|
+
<h2>UTC +08:00</h2>
|
38
|
+
<div id="plus8"></div>
|
39
|
+
|
40
|
+
|
41
|
+
<script type="text/javascript">
|
42
|
+
// Create a DataSet (allows two way data-binding)
|
43
|
+
var today = vis.moment(vis.moment.utc().format('YYYY-MM-DDT00:00:00.000Z'));
|
44
|
+
var start = today.clone();
|
45
|
+
var end = today.clone().add(2, 'day');
|
46
|
+
var customTime = today.clone().add(28, 'hour');
|
47
|
+
|
48
|
+
var items = new vis.DataSet([{
|
49
|
+
id: 1,
|
50
|
+
content: 'item 1',
|
51
|
+
start: today.clone().add(8, 'hour')
|
52
|
+
},
|
53
|
+
{
|
54
|
+
id: 2,
|
55
|
+
content: 'item 2',
|
56
|
+
start: today.clone().add(16, 'hour')
|
57
|
+
},
|
58
|
+
{
|
59
|
+
id: 3,
|
60
|
+
content: 'item 3',
|
61
|
+
start: today.clone().add(32, 'hour')
|
62
|
+
}
|
63
|
+
]);
|
64
|
+
|
65
|
+
// Create a timeline displaying in local time (default)
|
66
|
+
var timelineLocal = new vis.Timeline(document.getElementById('local'), items, {
|
67
|
+
editable: true,
|
68
|
+
start: start,
|
69
|
+
end: end
|
70
|
+
});
|
71
|
+
timelineLocal.addCustomTime(customTime);
|
72
|
+
|
73
|
+
// Create a timeline displaying in UTC
|
74
|
+
var timelineUTC = new vis.Timeline(document.getElementById('utc'), items, {
|
75
|
+
editable: true,
|
76
|
+
start: start,
|
77
|
+
end: end,
|
78
|
+
moment: function (date) {
|
79
|
+
return vis.moment(date).utc();
|
80
|
+
}
|
81
|
+
});
|
82
|
+
timelineUTC.addCustomTime(customTime);
|
83
|
+
|
84
|
+
// Create a timeline displaying in UTC +08:00
|
85
|
+
var timelinePlus8 = new vis.Timeline(document.getElementById('plus8'), items, {
|
86
|
+
editable: true,
|
87
|
+
start: start,
|
88
|
+
end: end,
|
89
|
+
moment: function (date) {
|
90
|
+
return vis.moment(date).utcOffset('+08:00');
|
91
|
+
}
|
92
|
+
});
|
93
|
+
timelinePlus8.addCustomTime(customTime);
|
94
|
+
</script>
|
95
|
+
|
96
|
+
</body>
|
97
|
+
|
98
|
+
</html>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<title>React Components in templates</title>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<div id='root'></div>
|
12
|
+
|
13
|
+
<!--
|
14
|
+
For ease of use, we are including the React, ReactDOM and Babel CDN
|
15
|
+
builds to make getting started as fast as possible.
|
16
|
+
|
17
|
+
In production, you'll want to instead look at using something
|
18
|
+
like Gulp, Grunt or WebPack (my personal recommendation)
|
19
|
+
to compile JSX into JavaScript. Also, check out:
|
20
|
+
http://facebook.github.io/react/docs/tooling-integration.html
|
21
|
+
-->
|
22
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.js"></script>
|
23
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.js"></script>
|
24
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
|
25
|
+
|
26
|
+
<script src="../../../vendor/assets/javascripts/vis.js"></script>
|
27
|
+
<link href="../../../vendor/assets/stylesheets/vis.css" rel="stylesheet" type="text/css" />
|
28
|
+
|
29
|
+
<!--
|
30
|
+
This is where you link to your React code. Can be .js or .jsx
|
31
|
+
extension, doesn't really matter.
|
32
|
+
-->
|
33
|
+
<script type="text/babel">
|
34
|
+
var timeline; // create groups var numberOfGroups = 25; var groups = new vis.DataSet() for (var i = 0; i
|
35
|
+
< numberOfGroups;
|
36
|
+
i++) { groups.add({ id: i, content: 'Truck ' + i }) } // create items var numberOfItems=1 000; var items=n ew vis.DataSet();
|
37
|
+
var itemsPerGroup=M ath.round(numberOfItems/numberOfGroups); for (var truck=0 ; truck < numberOfGroups; truck++)
|
38
|
+
{ var date=n ew Date(); for (var order=0 ; order < itemsPerGroup; order++) { date.setHours(date.getHours() + 4 *
|
39
|
+
(Math.random() < 0.2)); var start=n ew Date(date); date.setHours(date.getHours() + 2 + Math.floor(Math.random()*4));
|
40
|
+
var end=n ew Date(date); items.add({ id: order + itemsPerGroup * truck, group: truck, start: start, end: end, content:
|
41
|
+
'Order ' + order }); } } var GroupTemplate=R eact.createClass({ render: function() { var { group }=t his.props; return <div>
|
42
|
+
<label>{group.content}</label>
|
43
|
+
</div>
|
44
|
+
} }) var ItemTemplate = React.createClass({ render: function() { var { item } = this.props; return
|
45
|
+
<div>
|
46
|
+
<label>{item.content}</label>
|
47
|
+
</div>
|
48
|
+
} }) // specify options var options = { orientation: 'top', maxHeight: 400, start: new Date(), end: new Date(1000*60*60*24
|
49
|
+
+ (new Date()).valueOf()), editable: true, template: function (item, element) { if (!item) { return } ReactDOM.unmountComponentAtNode(element);
|
50
|
+
return ReactDOM.render(
|
51
|
+
<ItemTemplate item={item} />, element); }, groupTemplate: function (group, element) { if (!group) { return } ReactDOM.unmountComponentAtNode(element);
|
52
|
+
return ReactDOM.render(
|
53
|
+
<GroupTemplate group={group} />, element); } } var VisTimeline = React.createClass({ componentDidMount: function() { return initTimeline();
|
54
|
+
}, render: function() { return
|
55
|
+
<div>
|
56
|
+
<h1>Vis timline with React</h1>
|
57
|
+
<h2>Using react components for items and group templates</h2>
|
58
|
+
|
59
|
+
<div id="mytimeline"></div>
|
60
|
+
</div>
|
61
|
+
} }); function initTimeline() { var container = document.getElementById('mytimeline'); timeline = new vis.Timeline(container,
|
62
|
+
items, groups, options); } ReactDOM.render(
|
63
|
+
|
64
|
+
<VisTimeline />, document.getElementById('root'));
|
65
|
+
</script>
|
66
|
+
</body>
|
67
|
+
|
68
|
+
</html>
|