-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
3,040 additions
and
1,125 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<title>Timeline | Tooltip Template</title> | ||
|
||
<style type="text/css"> | ||
body, html { | ||
font-family: sans-serif; | ||
max-width: 800px; | ||
} | ||
</style> | ||
|
||
<script src="../../../dist/vis-timeline-graph2d.min.js"></script> | ||
<link href="../../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" /> | ||
|
||
</head> | ||
<body> | ||
|
||
<h1>Tooltip Templates</h1> | ||
|
||
<div id="tooltips"></div> | ||
<script type="text/javascript"> | ||
var items = new vis.DataSet([{ | ||
id: 1, | ||
content: 'Item with custom tooltip', | ||
start: '2016-01-02', | ||
end: '2016-01-03', | ||
title: 'IN_PROGRESS' | ||
}]); | ||
|
||
var options = { | ||
start: '2016-01-01', | ||
end: '2016-01-04', | ||
tooltip: { | ||
template: function(originalItemData, parsedItemData) { | ||
var color = originalItemData.title == 'IN_PROGRESS' ? 'red' : 'green'; | ||
return `<span style="color:${color}">${originalItemData.title}</span>`; | ||
} | ||
} | ||
}; | ||
|
||
var element = document.getElementById('tooltips'); | ||
|
||
// Timeline object | ||
var timelineTooltips = new vis.Timeline(element, items, options); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.