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,122 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
6
|
+
<meta content="utf-8" http-equiv="encoding">
|
7
|
+
<title>Graph2d | Streaming data</title>
|
8
|
+
|
9
|
+
<style type="text/css">
|
10
|
+
body, html, select {
|
11
|
+
font: 10pt sans-serif;
|
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
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<h2>Graph2d | Streaming data</h2>
|
20
|
+
<p style="max-width: 700px;">
|
21
|
+
This example demonstrates how to apply streaming data input to the Graph2d. The example shows two different ways to let the window move along with the new data, and there are more strategies for that. Note also that it is possible to disable moving and/or zooming the graph by setting options <code>moveable</code> and <code>zoomable</code> false.
|
22
|
+
</p>
|
23
|
+
|
24
|
+
<p>
|
25
|
+
<label for="strategy">Strategy:</label>
|
26
|
+
<select id="strategy">
|
27
|
+
<option value="continuous" selected>Continuous (CPU intensive)</option>
|
28
|
+
<option value="discrete">Discrete</option>
|
29
|
+
<option value="static">Static</option>
|
30
|
+
</select>
|
31
|
+
</p>
|
32
|
+
|
33
|
+
<div id="visualization"></div>
|
34
|
+
|
35
|
+
<script type="text/javascript">
|
36
|
+
var DELAY = 1000; // delay in ms to add new data points
|
37
|
+
|
38
|
+
var strategy = document.getElementById('strategy');
|
39
|
+
|
40
|
+
// create a graph2d with an (currently empty) dataset
|
41
|
+
var container = document.getElementById('visualization');
|
42
|
+
var dataset = new vis.DataSet();
|
43
|
+
|
44
|
+
var options = {
|
45
|
+
start: vis.moment().add(-30, 'seconds'), // changed so its faster
|
46
|
+
end: vis.moment(),
|
47
|
+
dataAxis: {
|
48
|
+
left: {
|
49
|
+
range: {
|
50
|
+
min:-10, max: 10
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
drawPoints: {
|
55
|
+
style: 'circle' // square, circle
|
56
|
+
},
|
57
|
+
shaded: {
|
58
|
+
orientation: 'bottom' // top, bottom
|
59
|
+
}
|
60
|
+
};
|
61
|
+
var graph2d = new vis.Graph2d(container, dataset, options);
|
62
|
+
|
63
|
+
// a function to generate data points
|
64
|
+
function y(x) {
|
65
|
+
return (Math.sin(x / 2) + Math.cos(x / 4)) * 5;
|
66
|
+
}
|
67
|
+
|
68
|
+
function renderStep() {
|
69
|
+
// move the window (you can think of different strategies).
|
70
|
+
var now = vis.moment();
|
71
|
+
var range = graph2d.getWindow();
|
72
|
+
var interval = range.end - range.start;
|
73
|
+
switch (strategy.value) {
|
74
|
+
case 'continuous':
|
75
|
+
// continuously move the window
|
76
|
+
graph2d.setWindow(now - interval, now, {animation: false});
|
77
|
+
requestAnimationFrame(renderStep);
|
78
|
+
break;
|
79
|
+
|
80
|
+
case 'discrete':
|
81
|
+
graph2d.setWindow(now - interval, now, {animation: false});
|
82
|
+
setTimeout(renderStep, DELAY);
|
83
|
+
break;
|
84
|
+
|
85
|
+
default: // 'static'
|
86
|
+
// move the window 90% to the left when now is larger than the end of the window
|
87
|
+
if (now > range.end) {
|
88
|
+
graph2d.setWindow(now - 0.1 * interval, now + 0.9 * interval);
|
89
|
+
}
|
90
|
+
setTimeout(renderStep, DELAY);
|
91
|
+
break;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
renderStep();
|
95
|
+
|
96
|
+
/**
|
97
|
+
* Add a new datapoint to the graph
|
98
|
+
*/
|
99
|
+
function addDataPoint() {
|
100
|
+
// add a new data point to the dataset
|
101
|
+
var now = vis.moment();
|
102
|
+
dataset.add({
|
103
|
+
x: now,
|
104
|
+
y: y(now / 1000)
|
105
|
+
});
|
106
|
+
|
107
|
+
// remove all data points which are no longer visible
|
108
|
+
var range = graph2d.getWindow();
|
109
|
+
var interval = range.end - range.start;
|
110
|
+
var oldIds = dataset.getIds({
|
111
|
+
filter: function (item) {
|
112
|
+
return item.x < range.start - interval;
|
113
|
+
}
|
114
|
+
});
|
115
|
+
dataset.remove(oldIds);
|
116
|
+
|
117
|
+
setTimeout(addDataPoint, DELAY);
|
118
|
+
}
|
119
|
+
addDataPoint();
|
120
|
+
</script>
|
121
|
+
</body>
|
122
|
+
</html>
|
@@ -0,0 +1,201 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Graph2d | Axis Titles and Styling</title>
|
5
|
+
<link href="../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
6
|
+
<script src="../../vendor/assets/javascripts/vis.js"></script>
|
7
|
+
|
8
|
+
<style type="text/css">
|
9
|
+
body, html {
|
10
|
+
font-family: sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
.custom-style1 {
|
14
|
+
fill: #f2ea00;
|
15
|
+
fill-opacity:0;
|
16
|
+
stroke-width:2px;
|
17
|
+
stroke: #b3ab00;
|
18
|
+
}
|
19
|
+
|
20
|
+
.custom-style2 {
|
21
|
+
fill: #00a0f2;
|
22
|
+
fill-opacity:0;
|
23
|
+
stroke-width:2px;
|
24
|
+
stroke: #050092;
|
25
|
+
}
|
26
|
+
|
27
|
+
.custom-style3 {
|
28
|
+
fill: #00f201;
|
29
|
+
fill-opacity:0;
|
30
|
+
stroke-width:2px;
|
31
|
+
stroke: #029200;
|
32
|
+
}
|
33
|
+
path.custom-style3.vis-fill {
|
34
|
+
fill-opacity:0.5 !important;
|
35
|
+
stroke: none;
|
36
|
+
}
|
37
|
+
</style>
|
38
|
+
|
39
|
+
</head>
|
40
|
+
<body>
|
41
|
+
<h2>Graph2d | Axis Titles and Styling</h2>
|
42
|
+
<div style="width:800px; font-size:14px; text-align: justify;">
|
43
|
+
<table>
|
44
|
+
<tr>
|
45
|
+
<td>
|
46
|
+
This example shows setting a title for the left and right axis. Optionally the example allows the user
|
47
|
+
to show icons and labels on the left and right axis.
|
48
|
+
</td>
|
49
|
+
<td>
|
50
|
+
<table>
|
51
|
+
<tr>
|
52
|
+
<td><input type="button" onclick="showIcons(true)" value="Show Icons" /></td>
|
53
|
+
<td><input type="button" onclick="showIcons(false)" value="Hide Icons" /></td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<td><input type="button" onclick="showTitle('left', true)" value="Show Left Title" /></td>
|
57
|
+
<td><input type="button" onclick="showTitle('left', false)" value="Hide Left Title" /></td>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<td><input type="button" onclick="showTitle('right', true)" value="Show Right Title" /></td>
|
61
|
+
<td><input type="button" onclick="showTitle('right', false)" value="Hide Right Title" /></td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td><input type="button" onclick="styleTitle('left')" value="Color Left Title" /></td>
|
65
|
+
<td><input type="button" onclick="styleTitle('right')" value="Color Right Title" /></td>
|
66
|
+
</tr>
|
67
|
+
</table>
|
68
|
+
</td>
|
69
|
+
</tr>
|
70
|
+
</table>
|
71
|
+
</div>
|
72
|
+
<br />
|
73
|
+
<div id="visualization"></div>
|
74
|
+
|
75
|
+
<script type="text/javascript">
|
76
|
+
// create a dataSet with groups
|
77
|
+
var names = ['SquareShaded', 'Bargraph', 'Blank', 'CircleShaded'];
|
78
|
+
var groups = new vis.DataSet();
|
79
|
+
groups.add({
|
80
|
+
id: 0,
|
81
|
+
content: names[0],
|
82
|
+
className: 'custom-style1',
|
83
|
+
options: {
|
84
|
+
drawPoints: {
|
85
|
+
style: 'square' // square, circle
|
86
|
+
},
|
87
|
+
shaded: {
|
88
|
+
orientation: 'bottom' // top, bottom
|
89
|
+
}
|
90
|
+
}});
|
91
|
+
|
92
|
+
groups.add({
|
93
|
+
id: 1,
|
94
|
+
content: names[1],
|
95
|
+
className: 'custom-style2',
|
96
|
+
options: {
|
97
|
+
style:'bar',
|
98
|
+
drawPoints: {style: 'circle',
|
99
|
+
size: 10
|
100
|
+
}
|
101
|
+
}});
|
102
|
+
|
103
|
+
groups.add({
|
104
|
+
id: 2,
|
105
|
+
content: names[2],
|
106
|
+
options: {
|
107
|
+
yAxisOrientation: 'right', // right, left
|
108
|
+
drawPoints: false
|
109
|
+
}
|
110
|
+
});
|
111
|
+
|
112
|
+
groups.add({
|
113
|
+
id: 3,
|
114
|
+
content: names[3],
|
115
|
+
className: 'custom-style3',
|
116
|
+
options: {
|
117
|
+
yAxisOrientation: 'right', // right, left
|
118
|
+
drawPoints: {
|
119
|
+
style: 'circle' // square, circle
|
120
|
+
},
|
121
|
+
shaded: {
|
122
|
+
orientation: 'top' // top, bottom
|
123
|
+
}
|
124
|
+
}});
|
125
|
+
|
126
|
+
var container = document.getElementById('visualization');
|
127
|
+
var items = [
|
128
|
+
{x: '2014-06-12', y: 0 , group: 0},
|
129
|
+
{x: '2014-06-13', y: 30, group: 0},
|
130
|
+
{x: '2014-06-14', y: 10, group: 0},
|
131
|
+
{x: '2014-06-15', y: 15, group: 1},
|
132
|
+
{x: '2014-06-16', y: 30, group: 1},
|
133
|
+
{x: '2014-06-17', y: 10, group: 1},
|
134
|
+
{x: '2014-06-18', y: 15, group: 1},
|
135
|
+
{x: '2014-06-19', y: 52, group: 1},
|
136
|
+
{x: '2014-06-20', y: 10, group: 1},
|
137
|
+
{x: '2014-06-21', y: 20, group: 2},
|
138
|
+
{x: '2014-06-22', y: 600, group: 2},
|
139
|
+
{x: '2014-06-23', y: 100, group: 2},
|
140
|
+
{x: '2014-06-24', y: 250, group: 2},
|
141
|
+
{x: '2014-06-25', y: 300, group: 2},
|
142
|
+
{x: '2014-06-26', y: 200, group: 3},
|
143
|
+
{x: '2014-06-27', y: 600, group: 3},
|
144
|
+
{x: '2014-06-28', y: 1000, group: 3},
|
145
|
+
{x: '2014-06-29', y: 250, group: 3},
|
146
|
+
{x: '2014-06-30', y: 300, group: 3}
|
147
|
+
];
|
148
|
+
|
149
|
+
var dataset = new vis.DataSet(items);
|
150
|
+
var options = {
|
151
|
+
dataAxis: {
|
152
|
+
showMinorLabels: false,
|
153
|
+
right: {
|
154
|
+
title: {
|
155
|
+
text: 'Title (right axis)'
|
156
|
+
}
|
157
|
+
}
|
158
|
+
},
|
159
|
+
legend: {left:{position:"bottom-left"}},
|
160
|
+
start: '2014-06-09',
|
161
|
+
end: '2014-07-03'
|
162
|
+
};
|
163
|
+
var graph2d = new vis.Graph2d(container, items, groups, options);
|
164
|
+
|
165
|
+
function showIcons(show) {
|
166
|
+
graph2d.setOptions({dataAxis: {icons: show}});
|
167
|
+
}
|
168
|
+
|
169
|
+
function showTitle(axis, show) {
|
170
|
+
var title;
|
171
|
+
if(show == true) {
|
172
|
+
title = {text: "Title (" + axis + " axis)"};
|
173
|
+
}
|
174
|
+
else {
|
175
|
+
title = undefined;
|
176
|
+
}
|
177
|
+
|
178
|
+
if(axis == 'left') {
|
179
|
+
graph2d.setOptions({dataAxis: {left: {title: title}}});
|
180
|
+
}
|
181
|
+
else {
|
182
|
+
graph2d.setOptions({dataAxis: {right: {title: title}}});
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
var colors=['red','green','blue','black','yellow','purple','pink'];
|
187
|
+
function styleTitle(axis) {
|
188
|
+
var title;
|
189
|
+
title = {style: "color: " + colors[Math.floor(Math.random() * colors.length) + 1]};
|
190
|
+
|
191
|
+
if(axis == 'left') {
|
192
|
+
graph2d.setOptions({dataAxis: {left: {title: title}}});
|
193
|
+
}
|
194
|
+
else {
|
195
|
+
graph2d.setOptions({dataAxis: {right: {title: title}}});
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
</script>
|
200
|
+
</body>
|
201
|
+
</html>
|
@@ -0,0 +1,281 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
6
|
+
<meta content="utf-8" http-equiv="encoding">
|
7
|
+
<title>Graph2d | Dynamic Styling</title>
|
8
|
+
|
9
|
+
<style type="text/css">
|
10
|
+
body,
|
11
|
+
html {
|
12
|
+
font-family: sans-serif;
|
13
|
+
}
|
14
|
+
</style>
|
15
|
+
|
16
|
+
<script src="../../vendor/assets/javascripts/vis.js"></script>
|
17
|
+
<link href="../../vendor/assets/stylesheets/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
|
18
|
+
</head>
|
19
|
+
|
20
|
+
<body>
|
21
|
+
<h2>Graph2d | Dynamic Styling Example</h2>
|
22
|
+
|
23
|
+
<div style="width:800px; font-size:14px; text-align: justify;">
|
24
|
+
This example shows how to programmatically change the styling of a group. While this can also be done in CSS, this must be
|
25
|
+
statically defined, and the programmatic interface allows the user to define the look of the graph at runtime.
|
26
|
+
</div>
|
27
|
+
<br/>
|
28
|
+
|
29
|
+
|
30
|
+
<table>
|
31
|
+
<col width="600">
|
32
|
+
<col width="220">
|
33
|
+
<tr>
|
34
|
+
<td style="padding-right: 20px; border-right: 1px solid;">
|
35
|
+
<div id="visualization"></div>
|
36
|
+
</td>
|
37
|
+
<td style="padding-left: 5px;">
|
38
|
+
<table style="font-size: 12px;">
|
39
|
+
<col width="150">
|
40
|
+
<col width="50">
|
41
|
+
<tr>
|
42
|
+
<td>Line Color</td>
|
43
|
+
<td>
|
44
|
+
<select id="color" onchange="updateStyle()">
|
45
|
+
<option value="stroke:green;">green</option>
|
46
|
+
<option value="stroke:red;">red</option>
|
47
|
+
<option value="stroke:blue;" selected="selected">blue</option>
|
48
|
+
<option value="stroke:black;">black</option>
|
49
|
+
</select>
|
50
|
+
</td>
|
51
|
+
</tr>
|
52
|
+
<tr>
|
53
|
+
<td>Line Style</td>
|
54
|
+
<td>
|
55
|
+
<select id="line" onchange="updateStyle()">
|
56
|
+
<option value="stroke-dasharray:1 0;" selected="selected">line</option>
|
57
|
+
<option value="stroke-dasharray:10 10;">dash</option>
|
58
|
+
<option value="stroke-dasharray:2 2;">dot</option>
|
59
|
+
<option value="stroke-dasharray:10 5 2 5;">dash-dot</option>
|
60
|
+
</select>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Line thickness</td>
|
65
|
+
<td>
|
66
|
+
<select id="thickness" onchange="updateStyle()">
|
67
|
+
<option value="stroke-width:0;">0</option>
|
68
|
+
<option value="stroke-width:1;">1</option>
|
69
|
+
<option value="stroke-width:2;" selected="selected">2</option>
|
70
|
+
<option value="stroke-width:3;">3</option>
|
71
|
+
<option value="stroke-width:4;">4</option>
|
72
|
+
<option value="stroke-width:5;">5</option>
|
73
|
+
<option value="stroke-width:6;">6</option>
|
74
|
+
</select>
|
75
|
+
</td>
|
76
|
+
</tr>
|
77
|
+
<tr>
|
78
|
+
<td>Fill Position</td>
|
79
|
+
<td>
|
80
|
+
<select id="fill" onchange="updateStyle()">
|
81
|
+
<option value="">none</option>
|
82
|
+
<option value="top">top</option>
|
83
|
+
<option value="bottom">bottom</option>
|
84
|
+
<option value="zero" selected="selected">zero</option>
|
85
|
+
</select>
|
86
|
+
</td>
|
87
|
+
</tr>
|
88
|
+
<tr>
|
89
|
+
<td>Fill Color</td>
|
90
|
+
<td>
|
91
|
+
<select id="fillcolor" onchange="updateStyle()">
|
92
|
+
<option value="fill:green;">green</option>
|
93
|
+
<option value="fill:red;">red</option>
|
94
|
+
<option value="fill:blue;" selected="selected">blue</option>
|
95
|
+
<option value="fill:black;">black</option>
|
96
|
+
</select>
|
97
|
+
</td>
|
98
|
+
</tr>
|
99
|
+
<tr>
|
100
|
+
<td>Fill Opacity</td>
|
101
|
+
<td>
|
102
|
+
<select id="fillopacity" onchange="updateStyle()">
|
103
|
+
<option value="fill-opacity:0.1;">0.1</option>
|
104
|
+
<option value="fill-opacity:0.2;">0.2</option>
|
105
|
+
<option value="fill-opacity:0.3;">0.3</option>
|
106
|
+
<option value="fill-opacity:0.4;">0.4</option>
|
107
|
+
<option value="fill-opacity:0.5;">0.5</option>
|
108
|
+
<option value="fill-opacity:0.6;" selected="selected">0.6</option>
|
109
|
+
<option value="fill-opacity:0.7;">0.7</option>
|
110
|
+
<option value="fill-opacity:0.8;">0.8</option>
|
111
|
+
<option value="fill-opacity:0.9;">0.9</option>
|
112
|
+
<option value="fill-opacity:1;">1</option>
|
113
|
+
</select>
|
114
|
+
</td>
|
115
|
+
</tr>
|
116
|
+
<tr>
|
117
|
+
<td>Points Shape</td>
|
118
|
+
<td>
|
119
|
+
<select id="points" onchange="updateStyle()">
|
120
|
+
<option value="">none</option>
|
121
|
+
<option value="circle">circle</option>
|
122
|
+
<option value="square" selected="selected">square</option>
|
123
|
+
</select>
|
124
|
+
</td>
|
125
|
+
</tr>
|
126
|
+
<tr>
|
127
|
+
<td>Points Size</td>
|
128
|
+
<td>
|
129
|
+
<select id="pointsize" onchange="updateStyle()">
|
130
|
+
<option value="1">1</option>
|
131
|
+
<option value="2">2</option>
|
132
|
+
<option value="3">3</option>
|
133
|
+
<option value="4">4</option>
|
134
|
+
<option value="5">5</option>
|
135
|
+
<option value="6" selected="selected">6</option>
|
136
|
+
<option value="8">8</option>
|
137
|
+
<option value="10">10</option>
|
138
|
+
<option value="15">15</option>
|
139
|
+
<option value="20">20</option>
|
140
|
+
</select>
|
141
|
+
</td>
|
142
|
+
</tr>
|
143
|
+
<tr>
|
144
|
+
<td>Points Color</td>
|
145
|
+
<td>
|
146
|
+
<select id="pointcolor" onchange="updateStyle()">
|
147
|
+
<option value="stroke:green;">green</option>
|
148
|
+
<option value="stroke:red;">red</option>
|
149
|
+
<option value="stroke:blue;" selected="selected">blue</option>
|
150
|
+
<option value="stroke:black;">black</option>
|
151
|
+
</select>
|
152
|
+
</td>
|
153
|
+
</tr>
|
154
|
+
<tr>
|
155
|
+
<td>Point Line Thickness</td>
|
156
|
+
<td>
|
157
|
+
<select id="pointthickness" onchange="updateStyle()">
|
158
|
+
<option value="stroke-width:0;">0</option>
|
159
|
+
<option value="stroke-width:1;">1</option>
|
160
|
+
<option value="stroke-width:2;" selected="selected">2</option>
|
161
|
+
<option value="stroke-width:3;">3</option>
|
162
|
+
<option value="stroke-width:4;">4</option>
|
163
|
+
<option value="stroke-width:5;">5</option>
|
164
|
+
<option value="stroke-width:6;">6</option>
|
165
|
+
</select>
|
166
|
+
</td>
|
167
|
+
<tr>
|
168
|
+
</tr>
|
169
|
+
<td>Points Fill Color</td>
|
170
|
+
<td>
|
171
|
+
<select id="pointfill" onchange="updateStyle()">
|
172
|
+
<option value="fill:green;">green</option>
|
173
|
+
<option value="fill:red;">red</option>
|
174
|
+
<option value="fill:blue;" selected="selected">blue</option>
|
175
|
+
<option value="fill:black;">black</option>
|
176
|
+
</select>
|
177
|
+
</td>
|
178
|
+
</tr>
|
179
|
+
</table>
|
180
|
+
</td>
|
181
|
+
</tr>
|
182
|
+
</table>
|
183
|
+
|
184
|
+
|
185
|
+
<script type="text/javascript">
|
186
|
+
var container = document.getElementById('visualization');
|
187
|
+
var items = [{
|
188
|
+
x: '2014-06-11',
|
189
|
+
y: 10,
|
190
|
+
group: 0
|
191
|
+
},
|
192
|
+
{
|
193
|
+
x: '2014-06-12',
|
194
|
+
y: 25,
|
195
|
+
group: 0
|
196
|
+
},
|
197
|
+
{
|
198
|
+
x: '2014-06-13',
|
199
|
+
y: 30,
|
200
|
+
group: 0
|
201
|
+
},
|
202
|
+
{
|
203
|
+
x: '2014-06-14',
|
204
|
+
y: -10,
|
205
|
+
group: 0
|
206
|
+
},
|
207
|
+
{
|
208
|
+
x: '2014-06-15',
|
209
|
+
y: 15,
|
210
|
+
group: 0
|
211
|
+
},
|
212
|
+
{
|
213
|
+
x: '2014-06-16',
|
214
|
+
y: 30,
|
215
|
+
group: 0
|
216
|
+
}
|
217
|
+
];
|
218
|
+
|
219
|
+
var dataset = new vis.DataSet(items);
|
220
|
+
var options = {
|
221
|
+
start: '2014-06-10',
|
222
|
+
end: '2014-06-18',
|
223
|
+
dataAxis: {
|
224
|
+
showMinorLabels: false,
|
225
|
+
icons: true
|
226
|
+
}
|
227
|
+
};
|
228
|
+
|
229
|
+
var groupData = {
|
230
|
+
id: 0,
|
231
|
+
content: "Group Name",
|
232
|
+
options: {
|
233
|
+
drawPoints: {
|
234
|
+
style: 'square' // square, circle
|
235
|
+
},
|
236
|
+
shaded: {
|
237
|
+
orientation: 'zero' // top, bottom
|
238
|
+
}
|
239
|
+
}
|
240
|
+
};
|
241
|
+
|
242
|
+
var groups = new vis.DataSet();
|
243
|
+
groups.add(groupData);
|
244
|
+
|
245
|
+
var graph2d = new vis.Graph2d(container, dataset, groups, options);
|
246
|
+
updateStyle();
|
247
|
+
|
248
|
+
function updateStyle() {
|
249
|
+
groupData.style = "";
|
250
|
+
groupData.style += document.getElementById("color").value;
|
251
|
+
groupData.style += document.getElementById("line").value;
|
252
|
+
groupData.style += document.getElementById("thickness").value;
|
253
|
+
|
254
|
+
groupData.options.drawPoints = {};
|
255
|
+
groupData.options.drawPoints.styles = "";
|
256
|
+
groupData.options.drawPoints.style = document.getElementById("points").value;
|
257
|
+
groupData.options.drawPoints.styles += document.getElementById("pointcolor").value;
|
258
|
+
groupData.options.drawPoints.styles += document.getElementById("pointthickness").value;
|
259
|
+
groupData.options.drawPoints.styles += document.getElementById("pointfill").value;
|
260
|
+
groupData.options.drawPoints.size = Number(document.getElementById("pointsize").value);
|
261
|
+
if (groupData.options.drawPoints.style == "") {
|
262
|
+
groupData.options.drawPoints = false;
|
263
|
+
}
|
264
|
+
|
265
|
+
groupData.options.shaded = {};
|
266
|
+
groupData.options.shaded.style = "";
|
267
|
+
groupData.options.shaded.style += document.getElementById("fillcolor").value;
|
268
|
+
groupData.options.shaded.style += document.getElementById("fillopacity").value;
|
269
|
+
groupData.options.shaded.orientation = document.getElementById("fill").value;
|
270
|
+
if (groupData.options.shaded.orientation == "") {
|
271
|
+
groupData.options.shaded = false;
|
272
|
+
}
|
273
|
+
|
274
|
+
var groups = new vis.DataSet();
|
275
|
+
groups.add(groupData);
|
276
|
+
graph2d.setGroups(groups);
|
277
|
+
}
|
278
|
+
</script>
|
279
|
+
</body>
|
280
|
+
|
281
|
+
</html>
|