diff --git a/.circleci/config.yml b/.circleci/config.yml index d703cf7d46..65eec95adf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,6 +50,10 @@ jobs: root: . paths: - 'dist' + - 'esnext' + - 'peer' + - 'standalone' + - 'styles' examples: executor: node @@ -113,7 +117,7 @@ jobs: - run: name: Publish GitHub Pages command: | - npx gh-pages --dist . --message "chore: update to $(git rev-parse HEAD) [ci skip]" --repo "$(node -e 'process.stdout.write(require("./package.json").repository.url)')" --src '{{coverage,dist,docs,examples}/**/*,LICENSE*,*.{html,md}}' + npx gh-pages --dist . --message "chore: update to $(git rev-parse HEAD) [ci skip]" --repo "$(node -e 'process.stdout.write(require("./package.json").repository.url)')" --src '{{coverage,dist,docs,esnext,examples,peer,standalone,styles,types}/**/*,LICENSE*,*.{html,md}}' release: executor: node diff --git a/.gitignore b/.gitignore index 44c5e70789..362a2afcc8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,12 +14,16 @@ npm-debug.log .*.sw[op] .commits.tmp .nyc_output/ +/coverage/ +/dist/ +/esnext/ /examples/graph2d-generated/ /examples/graph2d/examples.css /examples/graph2d/index.html /examples/timeline-generated/ /examples/timeline/examples.css /examples/timeline/index.html -coverage/ -dist/ -gen/ +/gen/ +/peer/ +/standalone/ +/styles/ diff --git a/README.md b/README.md index 0c14eda76d..3f6a4d804f 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,11 @@ of the project. - Network - - + Timeline + + - - + +

Graph2d | Basic Example

diff --git a/examples/graph2d/02_bars.html b/examples/graph2d/02_bars.html index 7b7873fe5e..ae6e20b717 100644 --- a/examples/graph2d/02_bars.html +++ b/examples/graph2d/02_bars.html @@ -9,8 +9,8 @@ } - - + +

Graph2d | Bar Graph Example

@@ -54,4 +54,4 @@

Graph2d | Bar Graph Example

- \ No newline at end of file + diff --git a/examples/graph2d/03_groups.html b/examples/graph2d/03_groups.html index 15fc3a0272..168cf9ef2e 100644 --- a/examples/graph2d/03_groups.html +++ b/examples/graph2d/03_groups.html @@ -10,8 +10,8 @@ } - - + +

Graph2d | Groups Example

diff --git a/examples/graph2d/04_rightAxis.html b/examples/graph2d/04_rightAxis.html index 6270c1026f..bc326d5d9c 100644 --- a/examples/graph2d/04_rightAxis.html +++ b/examples/graph2d/04_rightAxis.html @@ -23,8 +23,8 @@ } - - + +

Graph2d | Right Axis Example

@@ -123,4 +123,4 @@

Graph2d | Right Axis Example

- \ No newline at end of file + diff --git a/examples/graph2d/05_bothAxis.html b/examples/graph2d/05_bothAxis.html index c7bdb8ec14..2345224ed5 100644 --- a/examples/graph2d/05_bothAxis.html +++ b/examples/graph2d/05_bothAxis.html @@ -2,8 +2,8 @@ Graph2d | Both Axis Example - - + + - + @@ -98,4 +98,4 @@

Graph2d | Interpolation

- \ No newline at end of file + diff --git a/examples/graph2d/07_scrollingAndSorting.html b/examples/graph2d/07_scrollingAndSorting.html index 70fa331fd5..b1403d50ea 100644 --- a/examples/graph2d/07_scrollingAndSorting.html +++ b/examples/graph2d/07_scrollingAndSorting.html @@ -9,8 +9,8 @@ } - - + +

Graph2d | Scrolling and Sorting

@@ -71,4 +71,4 @@

Graph2d | Scrolling and Sorting

- \ No newline at end of file + diff --git a/examples/graph2d/08_performance.html b/examples/graph2d/08_performance.html index 6f1a49b167..add2f79561 100644 --- a/examples/graph2d/08_performance.html +++ b/examples/graph2d/08_performance.html @@ -17,8 +17,8 @@ - - + +

Graph2d | Performance

diff --git a/examples/graph2d/09_external_legend.html b/examples/graph2d/09_external_legend.html index 2c22343805..0bd1bea134 100644 --- a/examples/graph2d/09_external_legend.html +++ b/examples/graph2d/09_external_legend.html @@ -2,7 +2,7 @@ Graph2d | External legend Example - + - + diff --git a/examples/graph2d/10_barsSideBySide.html b/examples/graph2d/10_barsSideBySide.html index 70ff4a3059..d1250ec51d 100644 --- a/examples/graph2d/10_barsSideBySide.html +++ b/examples/graph2d/10_barsSideBySide.html @@ -9,8 +9,8 @@ } - - + +

Graph2d | Bar Graphs Side by Side Example

@@ -72,4 +72,4 @@

Graph2d | Bar Graphs Side by Side Example

- \ No newline at end of file + diff --git a/examples/graph2d/11_barsSideBySideGroups.html b/examples/graph2d/11_barsSideBySideGroups.html index 59ded43fd3..17d4eccc22 100644 --- a/examples/graph2d/11_barsSideBySideGroups.html +++ b/examples/graph2d/11_barsSideBySideGroups.html @@ -9,8 +9,8 @@ } - - + +

Graph2d | Bar Graphs Side by Side Example with Groups

@@ -85,4 +85,4 @@

Graph2d | Bar Graphs Side by Side Example with Groups

- \ No newline at end of file + diff --git a/examples/graph2d/12_customRange.html b/examples/graph2d/12_customRange.html index 03cb6c5f77..1df96ca91e 100644 --- a/examples/graph2d/12_customRange.html +++ b/examples/graph2d/12_customRange.html @@ -9,8 +9,8 @@ } - - + +

Graph2d | Custom axis range

@@ -89,4 +89,4 @@

Graph2d | Custom axis range

- \ No newline at end of file + diff --git a/examples/graph2d/13_localization.html b/examples/graph2d/13_localization.html index 9a55e95b21..8d7f41cbe9 100644 --- a/examples/graph2d/13_localization.html +++ b/examples/graph2d/13_localization.html @@ -13,8 +13,8 @@ } - - + +

Graph2d | Localization

diff --git a/examples/graph2d/14_toggleGroups.html b/examples/graph2d/14_toggleGroups.html index 25ca5c65ca..39978c74d9 100644 --- a/examples/graph2d/14_toggleGroups.html +++ b/examples/graph2d/14_toggleGroups.html @@ -18,8 +18,8 @@ } - - + +

Graph2d | Groups Example

diff --git a/examples/graph2d/15_streaming_data.html b/examples/graph2d/15_streaming_data.html index af6db842f6..fd6473285d 100644 --- a/examples/graph2d/15_streaming_data.html +++ b/examples/graph2d/15_streaming_data.html @@ -12,8 +12,8 @@ } - - + +

Graph2d | Streaming data

@@ -119,4 +119,4 @@

Graph2d | Streaming data

addDataPoint(); - \ No newline at end of file + diff --git a/examples/graph2d/16_bothAxisTitles.html b/examples/graph2d/16_bothAxisTitles.html index 1325d1e16a..efe8f6b22b 100644 --- a/examples/graph2d/16_bothAxisTitles.html +++ b/examples/graph2d/16_bothAxisTitles.html @@ -2,8 +2,8 @@ Graph2d | Axis Titles and Styling - - + + - - + +

Graph2d | Dynamic Styling Example

diff --git a/examples/graph2d/18_scatterplot.html b/examples/graph2d/18_scatterplot.html index 1c93617009..38696a242f 100644 --- a/examples/graph2d/18_scatterplot.html +++ b/examples/graph2d/18_scatterplot.html @@ -9,8 +9,8 @@ } - - + +

Graph2d | Scatterplot

@@ -60,4 +60,4 @@

Graph2d | Scatterplot

- \ No newline at end of file + diff --git a/examples/graph2d/19_labels.html b/examples/graph2d/19_labels.html index e8caf25ba7..93b0396bc8 100644 --- a/examples/graph2d/19_labels.html +++ b/examples/graph2d/19_labels.html @@ -16,8 +16,8 @@ } - - + +

Graph2d | Label Example

@@ -132,4 +132,4 @@

Graph2d | Label Example

- \ No newline at end of file + diff --git a/examples/graph2d/20_shading.html b/examples/graph2d/20_shading.html index dd93d7370e..dfd0f50bb5 100644 --- a/examples/graph2d/20_shading.html +++ b/examples/graph2d/20_shading.html @@ -10,8 +10,8 @@ } - - + +

Graph2d | Shading Example

diff --git a/examples/graph2d/21_barsWithEnd.html b/examples/graph2d/21_barsWithEnd.html index a3b6be24b7..9b899d8c8a 100644 --- a/examples/graph2d/21_barsWithEnd.html +++ b/examples/graph2d/21_barsWithEnd.html @@ -9,8 +9,8 @@ } - - + +

Graph2d | Bar Graph With End Example

@@ -48,4 +48,4 @@

Graph2d | Bar Graph With End Example

- \ No newline at end of file + diff --git a/examples/timeline/basicUsage.html b/examples/timeline/basicUsage.html index 1095c2127e..66143f2fb3 100644 --- a/examples/timeline/basicUsage.html +++ b/examples/timeline/basicUsage.html @@ -9,8 +9,8 @@ } - - + + diff --git a/examples/timeline/dataHandling/dataSerialization.html b/examples/timeline/dataHandling/dataSerialization.html index abf4b2b4f9..6057166715 100644 --- a/examples/timeline/dataHandling/dataSerialization.html +++ b/examples/timeline/dataHandling/dataSerialization.html @@ -23,8 +23,8 @@ } - - + + diff --git a/examples/timeline/dataHandling/loadExternalData.html b/examples/timeline/dataHandling/loadExternalData.html index 0862795dc6..b38474ac6d 100644 --- a/examples/timeline/dataHandling/loadExternalData.html +++ b/examples/timeline/dataHandling/loadExternalData.html @@ -14,8 +14,8 @@ - - + + diff --git a/examples/timeline/editing/customSnappingOfItems.html b/examples/timeline/editing/customSnappingOfItems.html index cd3d1bab6c..6226956d74 100644 --- a/examples/timeline/editing/customSnappingOfItems.html +++ b/examples/timeline/editing/customSnappingOfItems.html @@ -3,8 +3,8 @@ Timeline | editing | Custom snapping - - + + @@ -52,4 +52,4 @@ var timeline = new vis.Timeline(container, items, options); - \ No newline at end of file + diff --git a/examples/timeline/editing/editingItems.html b/examples/timeline/editing/editingItems.html index 207b1fb1e3..7ff1780e1f 100644 --- a/examples/timeline/editing/editingItems.html +++ b/examples/timeline/editing/editingItems.html @@ -10,8 +10,8 @@ } - - + + @@ -74,4 +74,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/editing/editingItemsCallbacks.html b/examples/timeline/editing/editingItemsCallbacks.html index ba12ea9c58..f849727b08 100644 --- a/examples/timeline/editing/editingItemsCallbacks.html +++ b/examples/timeline/editing/editingItemsCallbacks.html @@ -12,8 +12,8 @@ - - + + @@ -137,4 +137,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/editing/individualEditableItems.html b/examples/timeline/editing/individualEditableItems.html index 21efe29c76..eb77661368 100644 --- a/examples/timeline/editing/individualEditableItems.html +++ b/examples/timeline/editing/individualEditableItems.html @@ -23,8 +23,8 @@ } - - + + diff --git a/examples/timeline/editing/itemsAlwaysDraggable.html b/examples/timeline/editing/itemsAlwaysDraggable.html index 9820d4687a..cf8f106848 100644 --- a/examples/timeline/editing/itemsAlwaysDraggable.html +++ b/examples/timeline/editing/itemsAlwaysDraggable.html @@ -2,8 +2,8 @@ Timeline | editing | itemsAlwaysDraggable Option - - + +

The itemsAlwaysDraggable option allows to drag items around without first selecting them. When itemsAlwaysDraggable.range is set to true, the range can be changed without selection as well.

diff --git a/examples/timeline/editing/overrideEditingItems.html b/examples/timeline/editing/overrideEditingItems.html index fa09a1a548..492dc23a85 100644 --- a/examples/timeline/editing/overrideEditingItems.html +++ b/examples/timeline/editing/overrideEditingItems.html @@ -23,8 +23,8 @@ } - - + + diff --git a/examples/timeline/editing/tooltipOnItemChange.html b/examples/timeline/editing/tooltipOnItemChange.html index d1e30262ec..2013ef06ad 100644 --- a/examples/timeline/editing/tooltipOnItemChange.html +++ b/examples/timeline/editing/tooltipOnItemChange.html @@ -5,8 +5,8 @@ - - + + - - + + diff --git a/examples/timeline/groups/groups.html b/examples/timeline/groups/groups.html index e1db4c7ba3..cb296ae830 100644 --- a/examples/timeline/groups/groups.html +++ b/examples/timeline/groups/groups.html @@ -19,8 +19,8 @@ - - + + diff --git a/examples/timeline/groups/groupsEditable.html b/examples/timeline/groups/groupsEditable.html index ecda166922..665a9dfdc7 100644 --- a/examples/timeline/groups/groupsEditable.html +++ b/examples/timeline/groups/groupsEditable.html @@ -22,8 +22,8 @@ .vis-item.endurance { background-color: #FFFFCC; } - - + + @@ -335,4 +335,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/groups/groupsOrdering.html b/examples/timeline/groups/groupsOrdering.html index d5d85747a9..5729b61a65 100644 --- a/examples/timeline/groups/groupsOrdering.html +++ b/examples/timeline/groups/groupsOrdering.html @@ -16,8 +16,8 @@ } - - + + @@ -65,4 +65,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/groups/nestedGroups.html b/examples/timeline/groups/nestedGroups.html index a2dfc8579e..3afe996af5 100644 --- a/examples/timeline/groups/nestedGroups.html +++ b/examples/timeline/groups/nestedGroups.html @@ -19,8 +19,8 @@ - - + +

diff --git a/examples/timeline/groups/nestedThreeLevels.html b/examples/timeline/groups/nestedThreeLevels.html index f37fc73a05..9b9a96a60c 100644 --- a/examples/timeline/groups/nestedThreeLevels.html +++ b/examples/timeline/groups/nestedThreeLevels.html @@ -21,8 +21,8 @@ - - + + diff --git a/examples/timeline/groups/subgroups.html b/examples/timeline/groups/subgroups.html index 3d40347a71..4fb2308fe6 100644 --- a/examples/timeline/groups/subgroups.html +++ b/examples/timeline/groups/subgroups.html @@ -3,8 +3,8 @@ Timeline | groups | Subgroups - - + + - - + + @@ -93,4 +93,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/interaction/clickToUse.html b/examples/timeline/interaction/clickToUse.html index 2628cd031b..9d56c43900 100644 --- a/examples/timeline/interaction/clickToUse.html +++ b/examples/timeline/interaction/clickToUse.html @@ -19,8 +19,8 @@ } - - + + diff --git a/examples/timeline/interaction/eventListeners.html b/examples/timeline/interaction/eventListeners.html index 34d754f87c..48e0a3b6c9 100644 --- a/examples/timeline/interaction/eventListeners.html +++ b/examples/timeline/interaction/eventListeners.html @@ -9,8 +9,8 @@ } - - + + @@ -122,4 +122,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/interaction/limitMoveAndZoom.html b/examples/timeline/interaction/limitMoveAndZoom.html index 04ed316f3d..50aa794a1f 100644 --- a/examples/timeline/interaction/limitMoveAndZoom.html +++ b/examples/timeline/interaction/limitMoveAndZoom.html @@ -10,8 +10,8 @@ } - - + + @@ -50,4 +50,4 @@ timeline.setItems(items); - \ No newline at end of file + diff --git a/examples/timeline/interaction/navigationMenu.html b/examples/timeline/interaction/navigationMenu.html index 617c02755f..9ae878854c 100755 --- a/examples/timeline/interaction/navigationMenu.html +++ b/examples/timeline/interaction/navigationMenu.html @@ -22,8 +22,8 @@ } - - + + diff --git a/examples/timeline/interaction/rollingMode.html b/examples/timeline/interaction/rollingMode.html index d4208ce75c..e08a496163 100644 --- a/examples/timeline/interaction/rollingMode.html +++ b/examples/timeline/interaction/rollingMode.html @@ -2,8 +2,8 @@ Timeline | interaction | rolling mode Option - - + + diff --git a/examples/timeline/interaction/sequentialSelection.html b/examples/timeline/interaction/sequentialSelection.html index 6c12fe0ea8..83d9874cc8 100644 --- a/examples/timeline/interaction/sequentialSelection.html +++ b/examples/timeline/interaction/sequentialSelection.html @@ -3,8 +3,8 @@ Timeline | interaction | Sequential Selection - - + + - - + + @@ -171,4 +171,4 @@

Set selection

}, 500); - \ No newline at end of file + diff --git a/examples/timeline/interaction/specificItemSelectable.html b/examples/timeline/interaction/specificItemSelectable.html index 919a72de8f..4e95009f6a 100644 --- a/examples/timeline/interaction/specificItemSelectable.html +++ b/examples/timeline/interaction/specificItemSelectable.html @@ -3,8 +3,8 @@ Timeline | interaction | Specific Item Selectability - - + + - - + + @@ -47,4 +47,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/items/backgroundAreasWithGroups.html b/examples/timeline/items/backgroundAreasWithGroups.html index 0edb08f15b..17ee9cc123 100644 --- a/examples/timeline/items/backgroundAreasWithGroups.html +++ b/examples/timeline/items/backgroundAreasWithGroups.html @@ -10,8 +10,8 @@ } - - + + @@ -54,4 +54,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/items/expectedVsActualTimesItems.html b/examples/timeline/items/expectedVsActualTimesItems.html index 026e23d3a4..8c41ee6541 100644 --- a/examples/timeline/items/expectedVsActualTimesItems.html +++ b/examples/timeline/items/expectedVsActualTimesItems.html @@ -3,8 +3,8 @@ Timeline | items | expected vs actual times items - - + + - - + + diff --git a/examples/timeline/items/itemOrdering.html b/examples/timeline/items/itemOrdering.html index ee78fe0922..b9ad8cce14 100644 --- a/examples/timeline/items/itemOrdering.html +++ b/examples/timeline/items/itemOrdering.html @@ -12,8 +12,8 @@ } - - + + @@ -79,4 +79,4 @@

Item ordering

}; - \ No newline at end of file + diff --git a/examples/timeline/items/pointItems.html b/examples/timeline/items/pointItems.html index 5b5203d14e..9d78fb5d7f 100755 --- a/examples/timeline/items/pointItems.html +++ b/examples/timeline/items/pointItems.html @@ -9,8 +9,8 @@ } - - + + diff --git a/examples/timeline/items/rangeOverflowItem.html b/examples/timeline/items/rangeOverflowItem.html index 26c7584cff..ae88bbf152 100644 --- a/examples/timeline/items/rangeOverflowItem.html +++ b/examples/timeline/items/rangeOverflowItem.html @@ -3,8 +3,8 @@ Timeline | items | Range overflow - - + + - - + + diff --git a/examples/timeline/items/tooltipTemplate.html b/examples/timeline/items/tooltipTemplate.html index d818c16764..4f05312691 100644 --- a/examples/timeline/items/tooltipTemplate.html +++ b/examples/timeline/items/tooltipTemplate.html @@ -10,8 +10,8 @@ } - - + + diff --git a/examples/timeline/items/visibleFrameTemplateContent.html b/examples/timeline/items/visibleFrameTemplateContent.html index d2264e31c6..32b702a2b8 100644 --- a/examples/timeline/items/visibleFrameTemplateContent.html +++ b/examples/timeline/items/visibleFrameTemplateContent.html @@ -3,8 +3,8 @@ Timeline | items | Dynamic Content - - + + - - + + @@ -47,4 +47,4 @@ }); - \ No newline at end of file + diff --git a/examples/timeline/markers/customTimeMarkersEditable.html b/examples/timeline/markers/customTimeMarkersEditable.html index 849f3db4d3..2d16115a25 100644 --- a/examples/timeline/markers/customTimeMarkersEditable.html +++ b/examples/timeline/markers/customTimeMarkersEditable.html @@ -10,8 +10,8 @@ } - - + + @@ -38,4 +38,4 @@ timeline.setCustomTimeMarker("This is not editable", id2, false); - \ No newline at end of file + diff --git a/examples/timeline/markers/markerEvents.html b/examples/timeline/markers/markerEvents.html index 2fb0340c38..74a6a813db 100644 --- a/examples/timeline/markers/markerEvents.html +++ b/examples/timeline/markers/markerEvents.html @@ -10,8 +10,8 @@ } - - + + @@ -56,4 +56,4 @@ } - \ No newline at end of file + diff --git a/examples/timeline/other/clustering.html b/examples/timeline/other/clustering.html index 5b04013949..3ca5a4bf94 100644 --- a/examples/timeline/other/clustering.html +++ b/examples/timeline/other/clustering.html @@ -34,8 +34,8 @@ - - + + diff --git a/examples/timeline/other/customTimeBars.html b/examples/timeline/other/customTimeBars.html index 0a17fa9d51..d699c2af46 100644 --- a/examples/timeline/other/customTimeBars.html +++ b/examples/timeline/other/customTimeBars.html @@ -10,8 +10,8 @@ } - - + + @@ -86,4 +86,4 @@ - \ No newline at end of file + diff --git a/examples/timeline/other/customTimeBarsTooltip.html b/examples/timeline/other/customTimeBarsTooltip.html index b1fa8d4871..fb21b90542 100644 --- a/examples/timeline/other/customTimeBarsTooltip.html +++ b/examples/timeline/other/customTimeBarsTooltip.html @@ -10,8 +10,8 @@ } - - + + diff --git a/examples/timeline/other/dataAttributes.html b/examples/timeline/other/dataAttributes.html index 50bc5afb51..a295d0c12d 100644 --- a/examples/timeline/other/dataAttributes.html +++ b/examples/timeline/other/dataAttributes.html @@ -9,8 +9,8 @@ } - - + + diff --git a/examples/timeline/other/dataAttributesAll.html b/examples/timeline/other/dataAttributesAll.html index 7de93a79da..61963631a4 100644 --- a/examples/timeline/other/dataAttributesAll.html +++ b/examples/timeline/other/dataAttributesAll.html @@ -9,8 +9,8 @@ } - - + + diff --git a/examples/timeline/other/drag_drop.html b/examples/timeline/other/drag_drop.html index e81ebee7c1..02b44a6232 100644 --- a/examples/timeline/other/drag_drop.html +++ b/examples/timeline/other/drag_drop.html @@ -4,8 +4,8 @@ Timeline | other | Drag & Drop - - + + diff --git a/examples/timeline/other/functionLabelFormats.html b/examples/timeline/other/functionLabelFormats.html index 9696713eaf..8b79456a20 100644 --- a/examples/timeline/other/functionLabelFormats.html +++ b/examples/timeline/other/functionLabelFormats.html @@ -19,8 +19,8 @@ - - + + diff --git a/examples/timeline/other/groupsPerformance.html b/examples/timeline/other/groupsPerformance.html index ed95e487a7..d6766f163f 100644 --- a/examples/timeline/other/groupsPerformance.html +++ b/examples/timeline/other/groupsPerformance.html @@ -2,8 +2,8 @@ Timeline | other | A lot of grouped data - - + + - - + + @@ -50,4 +50,4 @@ timeline.addCustomTime("2014-04-18 13:00:00"); - \ No newline at end of file + diff --git a/examples/timeline/other/horizontalScroll.html b/examples/timeline/other/horizontalScroll.html index 062fffc375..6287fe237f 100644 --- a/examples/timeline/other/horizontalScroll.html +++ b/examples/timeline/other/horizontalScroll.html @@ -2,8 +2,8 @@ Timeline | other | Horizontal Scroll Option - - + + diff --git a/examples/timeline/other/loadingScreen.html b/examples/timeline/other/loadingScreen.html index 176e4ed179..3733b7f26b 100644 --- a/examples/timeline/other/loadingScreen.html +++ b/examples/timeline/other/loadingScreen.html @@ -4,8 +4,8 @@ Timeline | other | Loading screen example - - + + diff --git a/examples/timeline/other/localization.html b/examples/timeline/other/localization.html index d4d71b39d7..21c73b688f 100644 --- a/examples/timeline/other/localization.html +++ b/examples/timeline/other/localization.html @@ -10,8 +10,8 @@ } - - + + diff --git a/examples/timeline/other/localizationCustom.html b/examples/timeline/other/localizationCustom.html index 1760a5f512..2401ab8706 100644 --- a/examples/timeline/other/localizationCustom.html +++ b/examples/timeline/other/localizationCustom.html @@ -15,8 +15,8 @@ - - + + diff --git a/examples/timeline/other/onTimeout.html b/examples/timeline/other/onTimeout.html index 678802b7bf..1b91de2e3f 100644 --- a/examples/timeline/other/onTimeout.html +++ b/examples/timeline/other/onTimeout.html @@ -8,8 +8,8 @@ Timeline | other | onTimeout example - - + + diff --git a/examples/timeline/other/performance.html b/examples/timeline/other/performance.html index 5d83853f6e..ac566de3f4 100644 --- a/examples/timeline/other/performance.html +++ b/examples/timeline/other/performance.html @@ -13,8 +13,8 @@ - - + + diff --git a/examples/timeline/other/requirejs/requirejs_example.html b/examples/timeline/other/requirejs/requirejs_example.html index 9c66215fbb..e7f0b8d8be 100644 --- a/examples/timeline/other/requirejs/requirejs_example.html +++ b/examples/timeline/other/requirejs/requirejs_example.html @@ -5,7 +5,7 @@ - + diff --git a/examples/timeline/other/requirejs/scripts/main.js b/examples/timeline/other/requirejs/scripts/main.js index 26f6605862..352c7d2c85 100644 --- a/examples/timeline/other/requirejs/scripts/main.js +++ b/examples/timeline/other/requirejs/scripts/main.js @@ -1,6 +1,6 @@ require.config({ paths: { - vis: '../../../../../dist/vis-timeline-graph2d.min' + vis: '../../../../../standalone/umd/vis-timeline-graph2d.min' } }); diff --git a/examples/timeline/other/rtl.html b/examples/timeline/other/rtl.html index 672032eb9e..3707af7848 100644 --- a/examples/timeline/other/rtl.html +++ b/examples/timeline/other/rtl.html @@ -6,8 +6,8 @@ - - + + diff --git a/examples/timeline/other/stressPerformance.html b/examples/timeline/other/stressPerformance.html index 9cd80a27b2..5779d76bf1 100644 --- a/examples/timeline/other/stressPerformance.html +++ b/examples/timeline/other/stressPerformance.html @@ -8,8 +8,8 @@ Timeline | other | Stress Performance example - - + + diff --git a/examples/timeline/other/timezone.html b/examples/timeline/other/timezone.html index 445059d5ea..51e8ea3537 100644 --- a/examples/timeline/other/timezone.html +++ b/examples/timeline/other/timezone.html @@ -12,8 +12,8 @@ } - - + + diff --git a/examples/timeline/other/usingReact.html b/examples/timeline/other/usingReact.html index 60acf6879b..132cc4b143 100644 --- a/examples/timeline/other/usingReact.html +++ b/examples/timeline/other/usingReact.html @@ -23,8 +23,8 @@ - - + + + + + + + + + +
+

Timeline

+

Peer Build

+
+ +

+ A basic timeline. You can move and zoom the timeline, and select items. +

+ +
+ +

+ Peer build is designed to work well with other packages from the Vis + family. Compared to the standalone or legacy builds it doesn't include + dependencies which allows the same DataSet (and other dependencies) to be + used in Timeline and other packages (e.g. Network). In UMD version this + build doesn't suffer from the bug where exported members from different + packages get overwritten rendering some functionality unusable. +

+ +

When to use

+

+ When you need multiple packages from the Vis family on the same page or + finer control over what gets loaded to for example reduce bundle size by + omitting unneeded locales or want to reuse a single copy of Moment + throughout your app. +

+ +

How to use

+ +
Browser UMD
+

+<!--
+  In the following URLs you may want to replace @latest by @version
+  to prevent unexpected potentionally breaking updates.
+  For example vis-data@1.0.0 instead of vis-data@latest.
+-->
+<script type="text/javascript" src="https://unpkg.com/moment@latest"></script>
+<script type="text/javascript" src="https://unpkg.com/vis-data@latest"></script>
+<script type="text/javascript" src="https://unpkg.com/vis-timeline@latest/peer/umd/vis-timeline-graph2d.min.js"></script>
+<link rel="stylesheet" type="text/css" href="https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css" />
+<!-- You may include other packages like Vis Network or Vis Graph3D here. -->
+<!-- You can optionally include locales for Moment if you need any. -->
+
+<div id="visualization"></div>
+<script type="text/javascript">
+  // DOM element where the Timeline will be attached
+  const container = document.getElementById("visualization");
+
+  // Create a DataSet (allows two way data-binding)
+  const items = new vis.DataSet([
+    { id: 1, content: "item 1", start: "2014-04-20" },
+    { id: 2, content: "item 2", start: "2014-04-14" },
+    { id: 3, content: "item 3", start: "2014-04-18" },
+    { id: 4, content: "item 4", start: "2014-04-16", end: "2014-04-19" },
+    { id: 5, content: "item 5", start: "2014-04-25" },
+    { id: 6, content: "item 6", start: "2014-04-27", type: "point" }
+  ]);
+
+  // Configuration for the Timeline
+  const options = {};
+
+  // Create a Timeline
+  const timeline = new vis.Timeline(container, items, options);
+</script>
+      
+ +
Bundled ESM
+

+import { DataSet } from "vis-data";
+import { Timeline } from "vis-timeline/peer";
+import "vis-timeline/styles/vis-timeline-graph2d.css";
+// You may import from other packages like Vis Network or Vis Graph3D here.
+// You can optionally include locales for Moment if you need any.
+
+// DOM element where the Timeline will be attached
+const container = document.getElementById("visualization");
+
+// Create a DataSet (allows two way data-binding)
+const items = new DataSet([
+  { id: 1, content: "item 1", start: "2014-04-20" },
+  { id: 2, content: "item 2", start: "2014-04-14" },
+  { id: 3, content: "item 3", start: "2014-04-18" },
+  { id: 4, content: "item 4", start: "2014-04-16", end: "2014-04-19" },
+  { id: 5, content: "item 5", start: "2014-04-25" },
+  { id: 6, content: "item 6", start: "2014-04-27", type: "point" }
+]);
+
+// Configuration for the Timeline
+const options = {};
+
+// Create a Timeline
+const timeline = new Timeline(container, items, options);
+      
+ + The code above has to be injected into a page which contains an element with + visualization id. Like for example: +
<div id="visualization"></div>
+ + + + diff --git a/examples/timeline/standalone-build.html b/examples/timeline/standalone-build.html new file mode 100644 index 0000000000..1988a2f09a --- /dev/null +++ b/examples/timeline/standalone-build.html @@ -0,0 +1,124 @@ + + + + + + Timeline | Standalone Build + + + + + + + +
+

Timeline

+

Standalone Build

+
+ +

+ A basic timeline. You can move and zoom the timeline, and select items. +

+ +
+ +

+ Standalone build doesn't work with other packages from the Vis family + because it bundles all dependencies. This leads to situation where + DataSets (and other dependencies) from one package (e.g. Network) don't + work in Timeline because Timeline expects it's own bundled DataSets to be + used. It is inteded as a convenience build for cases where multiple + packages are not necessary but ease of use is (like JSFiddle MWEs or + examples). This build is available in ESM and UMD versions each of them + has minified and unminified variant. +

+ +

When to use

+

+ When the only thing you need is Timeline (no Network, Graph3D etc.) and + don't want to deal with dependencies (all are bundled in this build ready + to use). +

+ +

How to use

+ +
Browser UMD
+
<script type="text/javascript" src="https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js"></script>
+<!--
+  Including other packages like Vis Network or Vis Graph3D here won't work.
+  You need the peer build to do that.
+-->
+
+<script type="text/javascript">
+// DOM element where the Timeline will be attached
+const container = document.getElementById("visualization");
+
+// Create a DataSet (allows two way data-binding)
+const items = new vis.DataSet([
+  { id: 1, content: "item 1", start: "2014-04-20" },
+  { id: 2, content: "item 2", start: "2014-04-14" },
+  { id: 3, content: "item 3", start: "2014-04-18" },
+  { id: 4, content: "item 4", start: "2014-04-16", end: "2014-04-19" },
+  { id: 5, content: "item 5", start: "2014-04-25" },
+  { id: 6, content: "item 6", start: "2014-04-27", type: "point" }
+]);
+
+// Configuration for the Timeline
+const options = {};
+
+// Create a Timeline
+const timeline = new vis.Timeline(container, items, options);
+</script>
+ +
Bundled ESM
+
import { DataSet, Timeline } from "vis-timeline/standalone";
+import "vis-timeline/styles/vis-timeline-graph2d.css";
+
+// DOM element where the Timeline will be attached
+const container = document.getElementById("visualization");
+
+// Create a DataSet (allows two way data-binding)
+const items = new DataSet([
+  { id: 1, content: "item 1", start: "2014-04-20" },
+  { id: 2, content: "item 2", start: "2014-04-14" },
+  { id: 3, content: "item 3", start: "2014-04-18" },
+  { id: 4, content: "item 4", start: "2014-04-16", end: "2014-04-19" },
+  { id: 5, content: "item 5", start: "2014-04-25" },
+  { id: 6, content: "item 6", start: "2014-04-27", type: "point" }
+]);
+
+// Configuration for the Timeline
+const options = {};
+
+// Create a Timeline
+const timeline = new Timeline(container, items, options);
+ + + + diff --git a/examples/timeline/styling/axisOrientation.html b/examples/timeline/styling/axisOrientation.html index 31181950e2..a0ab24fe14 100644 --- a/examples/timeline/styling/axisOrientation.html +++ b/examples/timeline/styling/axisOrientation.html @@ -9,8 +9,8 @@ } - - + + @@ -73,4 +73,4 @@ }; - \ No newline at end of file + diff --git a/examples/timeline/styling/customCss.html b/examples/timeline/styling/customCss.html index 41a64694ae..c53fa4a890 100644 --- a/examples/timeline/styling/customCss.html +++ b/examples/timeline/styling/customCss.html @@ -3,8 +3,8 @@ Timeline | styling | Custom styling - - + +