Vis.js – 基于浏览器的动态 JavaScript 可视化库
2014-09-02 20:01
821 查看
Vis.js is a dynamic, browser based visualization library. The library is designed to be easy to use,
to handle large amounts of dynamic data, and to enable manipulation of and interaction with the data. The library consists of the components DataSet, Timeline, Network, Graph2d, and Graph3d.
The vis.js library is developed by Almende B.V, as part of CHAP.
Vis.js runs fine on Chrome, Firefox, Opera, Safari, IE9+, and most mobile browsers (with full touch support).
Click here to download vis.js (version 3.3.0)
A basic example demonstrating how to use the vis.js timeline is shown below. See thegallery below for more examples.
This gallery gives an idea of the features and possibilities of the library. The source code of the examples can be found in the examples
directory.
The timeline from vis.js displays different types of data on a timeline.
![](http://visjs.org/img/gallery/timeline/01_basic.png)
basic usage
![](http://visjs.org/img/gallery/timeline/02_interactive.png)
interactive
![](http://visjs.org/img/gallery/timeline/03_a_lot_of_data.png)
a lot of data
![](http://visjs.org/img/gallery/timeline/04_html_data.png)
html data
![](http://visjs.org/img/gallery/timeline/05_groups.png)
groups
![](http://visjs.org/img/gallery/timeline/06_event_listeners.png)
event listeners
![](http://visjs.org/img/gallery/timeline/07_custom_time_bar.png)
custom time bar
![](http://visjs.org/img/gallery/timeline/08_edit_items.png)
edit items
![](http://visjs.org/img/gallery/timeline/09_order_groups.png)
order groups
![](http://visjs.org/img/gallery/timeline/10_limit_move_and_zoom.png)
limit move and zoom
![](http://visjs.org/img/gallery/timeline/11_points.png)
points
![](http://visjs.org/img/gallery/timeline/12_custom_styling.png)
custom styling
![](http://visjs.org/img/gallery/timeline/13_past_and_future.png)
past and future
![](http://visjs.org/img/gallery/timeline/14_a_lot_of_grouped_data.png)
a lot of grouped data
![](http://visjs.org/img/gallery/timeline/15_item_class_names.png)
item class names
![](http://visjs.org/img/gallery/timeline/16_navigation_menu.png)
navigation menu
![](http://visjs.org/img/gallery/timeline/17_data_serialization.png)
data serialization
![](http://visjs.org/img/gallery/timeline/18_range_overflow.png)
range overflow
![](http://visjs.org/img/gallery/timeline/19_localization.png)
localization
![](http://visjs.org/img/gallery/timeline/20_click_to_use.png)
click to use
![](http://visjs.org/img/gallery/timeline/21_set_selection.png)
set selection
![](http://visjs.org/img/gallery/timeline/22_window_adjustment.png)
window adjustment
The Network visualization visualizes graphs and networks with customizable styles.
![](http://visjs.org/img/gallery/network/01_basic_usage.png)
basic usage
![](http://visjs.org/img/gallery/network/02_random_nodes.png)
random nodes
![](http://visjs.org/img/gallery/network/03_images.png)
images
![](http://visjs.org/img/gallery/network/04_shapes.png)
shapes
![](http://visjs.org/img/gallery/network/05_social_network.png)
social network
![](http://visjs.org/img/gallery/network/06_groups.png)
groups
![](http://visjs.org/img/gallery/network/07_selections.png)
selections
![](http://visjs.org/img/gallery/network/08_mobile_friendly.png)
mobile friendly
![](http://visjs.org/img/gallery/network/09_sizing.png)
sizing
![](http://visjs.org/img/gallery/network/10_multiline_text.png)
multiline text
![](http://visjs.org/img/gallery/network/11_custom_style.png)
custom style
![](http://visjs.org/img/gallery/network/12_scalable_images.png)
scalable images
![](http://visjs.org/img/gallery/network/13_dashed_lines.png)
dashed lines
![](http://visjs.org/img/gallery/network/14_dot_language.png)
dot language
![](http://visjs.org/img/gallery/network/15_dot_language_playground.png)
playground
![](http://visjs.org/img/gallery/network/16_dynamic_data.png)
dynamic data
![](http://visjs.org/img/gallery/network/17_network_info.png)
network info
![](http://visjs.org/img/gallery/network/18_fully_random_nodes_clustering.png)
fully random nodes clustering
![](http://visjs.org/img/gallery/network/19_scale_free_graph_clustering.png)
scale free graph clustering
![](http://visjs.org/img/gallery/network/20_navigation.png)
navigation
![](http://visjs.org/img/gallery/network/21_data_manipulation.png)
data manipulation
![](http://visjs.org/img/gallery/network/22_les_miserables.png)
les miserables
![](http://visjs.org/img/gallery/network/23_hierarchical_layout.png)
hierarchical layout
![](http://visjs.org/img/gallery/network/24_hierarchical_layout_userdefined.png)
hierarchical layout userdefined
![](http://visjs.org/img/gallery/network/25_physics_configuration.png)
physics configuration
![](http://visjs.org/img/gallery/network/26_staticSmoothCurves.png)
static smooth curves
![](http://visjs.org/img/gallery/network/27_world_cup_network.png)
world cup network
![](http://visjs.org/img/gallery/network/28_world_cup_network_performance.png)
world cup network performance
![](http://visjs.org/img/gallery/network/29_neighbourhood_highlight.png)
neighborhood highlight
![](http://visjs.org/img/gallery/network/30_importing_from_gephi.png)
importing from gephi
![](http://visjs.org/img/gallery/network/31_localization.png)
localization
![](http://visjs.org/img/gallery/network/graphviz_gallery.png)
graphviz gallery
The Graph2d visualizes bars and lines in time.
![](http://visjs.org/img/gallery/graph2d/01_basic.png)
basic
![](http://visjs.org/img/gallery/graph2d/02_bars.png)
bars
![](http://visjs.org/img/gallery/graph2d/03_groups.png)
groups
![](http://visjs.org/img/gallery/graph2d/04_rightAxis.png)
right axis
![](http://visjs.org/img/gallery/graph2d/05_bothAxis.png)
both axis
![](http://visjs.org/img/gallery/graph2d/06_interpolation.png)
interpolation
![](http://visjs.org/img/gallery/graph2d/07_scrollingAndSorting.png)
scrolling and sorting
![](http://visjs.org/img/gallery/graph2d/08_performance.png)
performance
![](http://visjs.org/img/gallery/graph2d/09_external_legend.png)
external legend
![](http://visjs.org/img/gallery/graph2d/10_barsSideBySide.png)
bars side by side
![](http://visjs.org/img/gallery/graph2d/11_barsSideBySideGroups.png)
bars side by side groups
![](http://visjs.org/img/gallery/graph2d/12_customRange.html.png)
custom range
![](http://visjs.org/img/gallery/graph2d/13_localization.png)
localization
![](http://visjs.org/img/gallery/graph2d/14_toggleGroups.png)
toggle groups
The Graph3d from vis.js visualizes three and four dimensional data.
![](http://visjs.org/img/gallery/graph3d/example01_basis.png)
basis
![](http://visjs.org/img/gallery/graph3d/example02_camera.png)
camera
![](http://visjs.org/img/gallery/graph3d/example03_filter.png)
filter
![](http://visjs.org/img/gallery/graph3d/example04_animate.png)
animate
![](http://visjs.org/img/gallery/graph3d/example05_line.png)
line
![](http://visjs.org/img/gallery/graph3d/example06_moving_dots.png)
moving dots
![](http://visjs.org/img/gallery/graph3d/example07_dot_cloud_colors.png)
dot cloud colors
![](http://visjs.org/img/gallery/graph3d/example08_dot_cloud_size.png)
dot cloud size
![](http://visjs.org/img/gallery/graph3d/example09_mobile.png)
mobile
![](http://visjs.org/img/gallery/graph3d/example10_styles.png)
styles
![](http://visjs.org/img/gallery/graph3d/example11_tooltips.png)
tooltips
![](http://visjs.org/img/gallery/graph3d/playground.png)
playground
Documentation is available here: Documentation
Copyright (C) 2010-2014 Almende B.V.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing
permissions and limitations under the License.
to handle large amounts of dynamic data, and to enable manipulation of and interaction with the data. The library consists of the components DataSet, Timeline, Network, Graph2d, and Graph3d.
The vis.js library is developed by Almende B.V, as part of CHAP.
Vis.js runs fine on Chrome, Firefox, Opera, Safari, IE9+, and most mobile browsers (with full touch support).
Install
npm
npm install vis
bower
bower install vis
download
Click here to download vis.js (version 3.3.0)
Example
A basic example demonstrating how to use the vis.js timeline is shown below. See thegallery below for more examples.<!doctype html> <html> <head> <link href="http://visjs.org/dist/vis.css" rel="stylesheet" type="text/css" /> <script src="http://visjs.org/dist/vis.js"></script> </head> <body> <div id="mytimeline"></div> <script type="text/javascript"> // DOM element where the Timeline will be attached var container = document.getElementById('mytimeline'); // Create a DataSet with data (enables two way data binding) var data = new vis.DataSet([ {id: 1, content: 'item 1', start: '2013-04-20'}, {id: 2, content: 'item 2', start: '2013-04-14'}, {id: 3, content: 'item 3', start: '2013-04-18'}, {id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19'}, {id: 5, content: 'item 5', start: '2013-04-25'}, {id: 6, content: 'item 6', start: '2013-04-27'} ]); // Configuration for the Timeline var options = {}; // Create a Timeline var timeline = new vis.Timeline(container, data, options); </script> </body> </html>
Gallery
This gallery gives an idea of the features and possibilities of the library. The source code of the examples can be found in the examplesdirectory.
Timeline
The timeline from vis.js displays different types of data on a timeline.![](http://visjs.org/img/gallery/timeline/01_basic.png)
basic usage
![](http://visjs.org/img/gallery/timeline/02_interactive.png)
interactive
![](http://visjs.org/img/gallery/timeline/03_a_lot_of_data.png)
a lot of data
![](http://visjs.org/img/gallery/timeline/04_html_data.png)
html data
![](http://visjs.org/img/gallery/timeline/05_groups.png)
groups
![](http://visjs.org/img/gallery/timeline/06_event_listeners.png)
event listeners
![](http://visjs.org/img/gallery/timeline/07_custom_time_bar.png)
custom time bar
![](http://visjs.org/img/gallery/timeline/08_edit_items.png)
edit items
![](http://visjs.org/img/gallery/timeline/09_order_groups.png)
order groups
![](http://visjs.org/img/gallery/timeline/10_limit_move_and_zoom.png)
limit move and zoom
![](http://visjs.org/img/gallery/timeline/11_points.png)
points
![](http://visjs.org/img/gallery/timeline/12_custom_styling.png)
custom styling
![](http://visjs.org/img/gallery/timeline/13_past_and_future.png)
past and future
![](http://visjs.org/img/gallery/timeline/14_a_lot_of_grouped_data.png)
a lot of grouped data
![](http://visjs.org/img/gallery/timeline/15_item_class_names.png)
item class names
![](http://visjs.org/img/gallery/timeline/16_navigation_menu.png)
navigation menu
![](http://visjs.org/img/gallery/timeline/17_data_serialization.png)
data serialization
![](http://visjs.org/img/gallery/timeline/18_range_overflow.png)
range overflow
![](http://visjs.org/img/gallery/timeline/19_localization.png)
localization
![](http://visjs.org/img/gallery/timeline/20_click_to_use.png)
click to use
![](http://visjs.org/img/gallery/timeline/21_set_selection.png)
set selection
![](http://visjs.org/img/gallery/timeline/22_window_adjustment.png)
window adjustment
Network
The Network visualization visualizes graphs and networks with customizable styles.![](http://visjs.org/img/gallery/network/01_basic_usage.png)
basic usage
![](http://visjs.org/img/gallery/network/02_random_nodes.png)
random nodes
![](http://visjs.org/img/gallery/network/03_images.png)
images
![](http://visjs.org/img/gallery/network/04_shapes.png)
shapes
![](http://visjs.org/img/gallery/network/05_social_network.png)
social network
![](http://visjs.org/img/gallery/network/06_groups.png)
groups
![](http://visjs.org/img/gallery/network/07_selections.png)
selections
![](http://visjs.org/img/gallery/network/08_mobile_friendly.png)
mobile friendly
![](http://visjs.org/img/gallery/network/09_sizing.png)
sizing
![](http://visjs.org/img/gallery/network/10_multiline_text.png)
multiline text
![](http://visjs.org/img/gallery/network/11_custom_style.png)
custom style
![](http://visjs.org/img/gallery/network/12_scalable_images.png)
scalable images
![](http://visjs.org/img/gallery/network/13_dashed_lines.png)
dashed lines
![](http://visjs.org/img/gallery/network/14_dot_language.png)
dot language
![](http://visjs.org/img/gallery/network/15_dot_language_playground.png)
playground
![](http://visjs.org/img/gallery/network/16_dynamic_data.png)
dynamic data
![](http://visjs.org/img/gallery/network/17_network_info.png)
network info
![](http://visjs.org/img/gallery/network/18_fully_random_nodes_clustering.png)
fully random nodes clustering
![](http://visjs.org/img/gallery/network/19_scale_free_graph_clustering.png)
scale free graph clustering
![](http://visjs.org/img/gallery/network/20_navigation.png)
navigation
![](http://visjs.org/img/gallery/network/21_data_manipulation.png)
data manipulation
![](http://visjs.org/img/gallery/network/22_les_miserables.png)
les miserables
![](http://visjs.org/img/gallery/network/23_hierarchical_layout.png)
hierarchical layout
![](http://visjs.org/img/gallery/network/24_hierarchical_layout_userdefined.png)
hierarchical layout userdefined
![](http://visjs.org/img/gallery/network/25_physics_configuration.png)
physics configuration
![](http://visjs.org/img/gallery/network/26_staticSmoothCurves.png)
static smooth curves
![](http://visjs.org/img/gallery/network/27_world_cup_network.png)
world cup network
![](http://visjs.org/img/gallery/network/28_world_cup_network_performance.png)
world cup network performance
![](http://visjs.org/img/gallery/network/29_neighbourhood_highlight.png)
neighborhood highlight
![](http://visjs.org/img/gallery/network/30_importing_from_gephi.png)
importing from gephi
![](http://visjs.org/img/gallery/network/31_localization.png)
localization
![](http://visjs.org/img/gallery/network/graphviz_gallery.png)
graphviz gallery
Graph2d
The Graph2d visualizes bars and lines in time.![](http://visjs.org/img/gallery/graph2d/01_basic.png)
basic
![](http://visjs.org/img/gallery/graph2d/02_bars.png)
bars
![](http://visjs.org/img/gallery/graph2d/03_groups.png)
groups
![](http://visjs.org/img/gallery/graph2d/04_rightAxis.png)
right axis
![](http://visjs.org/img/gallery/graph2d/05_bothAxis.png)
both axis
![](http://visjs.org/img/gallery/graph2d/06_interpolation.png)
interpolation
![](http://visjs.org/img/gallery/graph2d/07_scrollingAndSorting.png)
scrolling and sorting
![](http://visjs.org/img/gallery/graph2d/08_performance.png)
performance
![](http://visjs.org/img/gallery/graph2d/09_external_legend.png)
external legend
![](http://visjs.org/img/gallery/graph2d/10_barsSideBySide.png)
bars side by side
![](http://visjs.org/img/gallery/graph2d/11_barsSideBySideGroups.png)
bars side by side groups
![](http://visjs.org/img/gallery/graph2d/12_customRange.html.png)
custom range
![](http://visjs.org/img/gallery/graph2d/13_localization.png)
localization
![](http://visjs.org/img/gallery/graph2d/14_toggleGroups.png)
toggle groups
Graph3d
The Graph3d from vis.js visualizes three and four dimensional data.![](http://visjs.org/img/gallery/graph3d/example01_basis.png)
basis
![](http://visjs.org/img/gallery/graph3d/example02_camera.png)
camera
![](http://visjs.org/img/gallery/graph3d/example03_filter.png)
filter
![](http://visjs.org/img/gallery/graph3d/example04_animate.png)
animate
![](http://visjs.org/img/gallery/graph3d/example05_line.png)
line
![](http://visjs.org/img/gallery/graph3d/example06_moving_dots.png)
moving dots
![](http://visjs.org/img/gallery/graph3d/example07_dot_cloud_colors.png)
dot cloud colors
![](http://visjs.org/img/gallery/graph3d/example08_dot_cloud_size.png)
dot cloud size
![](http://visjs.org/img/gallery/graph3d/example09_mobile.png)
mobile
![](http://visjs.org/img/gallery/graph3d/example10_styles.png)
styles
![](http://visjs.org/img/gallery/graph3d/example11_tooltips.png)
tooltips
![](http://visjs.org/img/gallery/graph3d/playground.png)
playground
Docs
Documentation is available here: Documentation
License
Copyright (C) 2010-2014 Almende B.V.Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing
permissions and limitations under the License.
相关文章推荐
- Vis.js – 基于浏览器的动态 JavaScript 可视化库
- Vis.js – 基于浏览器的动态 JavaScript 可视化库
- javascript修改浏览器title方法 JS动态修改浏览器标题
- 分享一个快速开发动态互动HTML5可视化图形效果的Javascript类库 - Envision.js
- JavaScript 的性能优化:加载和执行(以及动态引入的外部 JS 文件在各浏览器中的加载顺序不一致)
- 动态可视化库Vis.js
- 分享一个快速开发动态互动HTML5可视化图形效果的Javascript类库 - Envision.js
- javascript中动态加载js、vbs脚本或者css样式表
- 跨浏览器javascript的使用-动态的更新页面内容
- 使用javascript动态加载外部css或js文件
- 多浏览器兼容的动态加载 JavaScript 与 CSS第1/2页
- 多浏览器兼容的动态加载 JavaScript 与 CSS第1/2页
- XLoadTree 基于AJAX + XML动态加载的JS树组件的文档翻译
- 基于对象的JavaScript实现无刷新页面发送和获取数据Ajax.js
- 不同浏览器基于javascript测试结果
- 不同浏览器基于javascript测试结果
- 动态创建表格js文件,javascript,Ajax,DHTML动态实现表格的创建,动态读取XML中的文件,读取dom节点的例子。
- javascript实例教程(8) 利用javascript基于浏览器类型的重定向
- JavaScript:全面解析各种浏览器网页中的JS代码的执行顺序
- 文盲的 JavaScript 经验谈之二:了解一下浏览器对 JS 的处理