123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <html>
- <head>
- <title>Timeline demo</title>
- <script type="text/javascript" src="http://www.google.com/jsapi"></script>
- <script type="text/javascript" src="../timeline.js"></script>
- <link rel="stylesheet" type="text/css" href="../timeline.css">
- <style>
- body {font: 10pt arial;}
- div.timeline-frame {
- border-color: purple;
- border-width: 2px;
- }
- div.timeline-canvas {
- background-color: #FFF4F7;
- }
- div.timeline-event {
- border-color: #F991A3;
- background-color: pink;
- }
- div.timeline-event-selected {
- border-color: orange;
- background-color: yellow;
- }
- div.timeline-event-box {
- font-size: 12pt;
- font-family: purisa, cursive;
- color: purple;
- border-width: 3px;
- }
- div.timeline-event-line {
- border-width: 3px;
- }
- div.timeline-event-dot {
- border-width: 8px;
- border-radius: 8px;
- -moz-border-radius: 8px;
- }
- div.timeline-event-range {
- font-size: 12pt;
- font-family: purisa, cursive;
- color: purple;
- border-width: 3px;
- }
- div.timeline-axis {
- border-color: purple;
- border-width: 2px;
- }
- div.timeline-axis-grid {
- border-width: 2px;
- }
- div.timeline-axis-grid-minor {
- border-color: #FFD7DD;
- }
- div.timeline-axis-grid-major {
- border-color: pink;
- }
-
- div.timeline-axis-text {
- font-family: purisa, cursive;
- font-size: 15px;
- color: purple;
- }
- div.timeline-axis-text-minor {
- padding-top: 15px;
- }
- div.timeline-axis-text-major {
- font-weight: bold;
- padding-top: 5px;
- padding-bottom: 10px;
- }
- </style>
-
- <script type="text/javascript">
- google.load("visualization", "1");
-
- // Set callback to run when API is loaded
- google.setOnLoadCallback(drawVisualization);
-
- var timeline;
-
- // Called when the Visualization API is loaded.
- function drawVisualization() {
- // Create and populate a data table.
- var data = new google.visualization.DataTable();
- data.addColumn('datetime', 'startdate');
- data.addColumn('datetime', 'enddate');
- data.addColumn('string', 'content');
- data.addRows([
- [new Date(2010,07,23), , '<div>Conversation</div><img src="img/community-users-icon.png" style="width:32px; height:32px;">'],
- [new Date(2010,07,23,23,00,00), , '<div>Mail from boss</div><img src="img/mail-icon.png" style="width:32px; height:32px;">'],
- [new Date(2010,07,24,16,00,00), , 'Report'],
- [new Date(2010,07,26), new Date(2010,08,02), 'Traject A'],
- [new Date(2010,07,28), , '<div>Memo</div><img src="img/notes-edit-icon.png" style="width:48px; height:48px;">'],
- [new Date(2010,07,29), , '<div>Phone call</div><img src="img/Hardware-Mobile-Phone-icon.png" style="width:32px; height:32px;">'],
- [new Date(2010,07,31), new Date(2010,08,03), 'Traject B'],
- [new Date(2010,08,04,12,00,00), , '<div>Report</div><img src="img/attachment-icon.png" style="width:32px; height:32px;">']
- ]);
- // specify options
- options = {
- width: "100%",
- height: "400px",
- editable: true, // make the events dragable
- enableKeys: true,
- eventMargin: 15,
- showButtonAdd: false,
- style: "box"
- };
- // Instantiate our timeline object.
- timeline = new links.Timeline(document.getElementById('mytimeline'));
- // Draw our timeline with the created data and options
- timeline.draw(data, options);
- }
-
- </script>
- </head>
- <body>
- <p>This page demonstrates the timeline visualization with custom css.</p>
- <div id="mytimeline"></div>
- <!-- Information about where the used icons come from -->
- <p style="color:gray; font-size:10px; font-style:italic;">
- Icons by <a href="http://dryicons.com" target="_blank" title="Aesthetica 2 Icons by DryIcons" style="color:gray;" >DryIcons</a>
- and <a href="http://www.tpdkdesign.net" target="_blank" title="Refresh Cl Icons by TpdkDesign.net" style="color:gray;" >TpdkDesign.net</a>
- </p>
-
- </body>
- </html>
|