Create stunning timelines with Timeline.js

by Janeth Kent Date: 04-05-2021 javascript timeline coding


Timelines are complicated but effective tools for showing large amounts of data. TimelineJS removes the pain

TimelineJS  is an easy-to-use JavaScript library, both for user and developer. It can be as easy as embedding an iframe onto your page using the embed generator with a Google Doc spreadsheet, or as complicated as dynamically adding in your own events based on external sources; we’re going to opt for the latter..

If you’re looking for an easy way to include a timeline in your site, this may well be perfect. 

Beginners can create a timeline using nothing more than a Google spreadsheet. Experts can use their JSON skills to create custom installations, while keeping TimelineJS's core functionality.

TimelineJS can pull in media from a variety of sources. Twitter, Flickr, YouTube, Vimeo, Vine, Dailymotion, Google Maps, Wikipedia, SoundCloud, Document Cloud and more!

Why you might use Timeline JS to Teach: 

  • Timeline can integrate images, text, websites, and more to clearly communicate concepts and stories.  
  • Timeline JS can present information chronologically or can be used to create non-chronological narratives in the form of storybooks or virtual museums.  

Tips & tricks

  1. Keep it short. We recommend not having more than 20 slides for a reader to click through.
  2. Pick stories that have a strong chronological narrative. It does not work well for stories that need to jump around in the timeline.
  3. Write each event as a part of a larger narrative.
  4. Include events that build up to major occurrences — not just the major events.

How to use it (Make a Timeline):

You’ll need: 

  • A google account  
  • A rough outline of your timeline with dates, brief text, and sources (images, maps, video, etc.) Knight Lab recommends users limit their timelines to approximately 20 slides to not overwhelm viewers.  
  • See the Timeline JS  giude on supported media types for guidance. [Note: Timeline JS does not like pdfs] 

Let’s Begin: 

  • Start at the Timeline JS page on the Knight Lab site.
  • Click “Make a Timeline” on the main site 
  • Click “Get the spreadsheet template.” Timeline JS will require you to make a copy of their Google spreadsheet to proceed.  
  • Click “make a copy” 
  • The spreadsheet will appear with sample information. Highlight these cells and click “delete.” Do not delete row 1 which includes headings you will need to organize your timeline (Year, Month, Day, . . . Headline, Text, etc.).
  • Understand categories and plan your timeline:
    • The first row in blue represents the title page of your timeline and need not have an associated date.  
    • Year/Month/Date/Time represent boxes to input the dates of events.   
    • The “Display Date” heading represents the date as you would like to appear. For example if you enter the date in the Year/Month/Date headings as 2006/1/1 but would like the date to appear on your slide as “January 1st, 2006” enter it as such in the “Display Date.” Text entered in the “Display Date” will supersede any dates entered in the Year/Month/Date/Categories.  
    • “Display Date” is also the heading where users can enter “Page 1” or other organizing terms to use Timeline to make a non-chronological story.   
  • Under media, you can add Google Maps, URLs [ Flickr, Instagram, Spotify, Twitter, Vimeo, YouTube, Wikipedia], etc. 
    • To find images that comply with usage rights, do a google image search for a desired subject. When the search produces results, click “Tools” and then “Usage Rights” in the toolbar to filter for images labelled for reuse.  
    • To streamline the process of adding images, you can right click on an image, and select “copy image address” and add that to the related box. Be sure to credit the image source in the “Media Credit” box.  
  • When you’ve completed your entries, select “File” and then “Publish to the Web.
  • In the next window, change the menu that reads “entire document” to “od1.” Then, click the blue “publish” button. When asked, “Are you sure…?” click OK. Ignore the URL that appears in the center of the window. Just close the window using the X in the top right corner. 
  • After you close the window, copy the URL in your browser’s address bar. You’ll use this in the next step. 
  • Return to the Timeline page and proceed to Step 3, “Generate Your Timeline.”  Paste your URL into the box labelled “Google Spreadsheet URL.”
  • Scroll down to Step 4 and select “Preview” to see you Timeline. You will find the link and embed code to share your work there.  
  • To see these instruction in practice, check out this video tutorial from Knight Lab.  

 
by Janeth Kent Date: 04-05-2021 javascript timeline coding hits : 9282  
 
Janeth Kent

Janeth Kent

Licenciada en Bellas Artes y programadora por pasión. Cuando tengo un rato retoco fotos, edito vídeos y diseño cosas. El resto del tiempo escribo en MA-NO WEB DESIGN END DEVELOPMENT.

 
 
 

Related Posts

Difference between arrow and normal functions in JavaScript

In this tutorial we are going to see how arrow functions differ from normal JavaScript functions. We will also see when you should use one and when you should use…

JavaScript Arrow functions: What they are and how to use them

In this article we are going to see what they are and how to use JavaScript Arrow Functions, a new feature introduced with the ES6 standard (ECMAScript 6). What are Arrow…

How to insert an element into an array with JavaScript

In this brief tutorial you will learn how to insert one or more elements into an array with JavaScript. For this we will use the splice function. The splice function will not…

What is the difference between primitives types and objects in JavaScript?

In this short tutorial we are going to look at the differences between primitive types and objects in JavaScript. To start with, we're going to look at what primitive types…

How to get DOM elements with JavaScript

When you access any element of the DOM, it is usual to save it in a variable. This is something that at first might seem very simple, but if you…

How to reverse an array in JavaScript

In this tutorial we are going to see how you can change the order of the elements of an array so that they are inverted. You could use a loop…

How synchronize the scroll of two divs with JavaScript

In case you have two divs of different sizes you may sometimes want to scroll both at the same time but at different speeds depending on their size. For example,…

How to use the codePointAt method in JavaScript

The JavaScript codePointAt method has more or less the same function as the charCodeAt method, used to get the 16-bit Unicode representation of the character at a certain position in…

How to check if a value is a number in JavaScript

In this short tutorial we are going to look at the various methods that exist to find out if a value is a number in JavaScript.   1. Using the isNaN() function   One…

How to use the charCodeAt method in JavaScript

The charCodeAt method is accepted by strings in JavaScript, returning the 16-bit Unicode code of the character at the position we pass as a parameter to the method. The charCodeAt method…

How to use the charAt method in JavaScript

The charAt method is accepted by strings in JavaScript, returning the position of the character passed as a parameter within the string. If the string contains multiple occurrences of the character…

Strings in JavaScript: What they are and how to use them

In this tutorial we are going to explain what strings are and how they are used in JavaScript. The tutorial is intended for people who are learning to program in…

We use our own and third-party cookies to improve our services, compile statistical information and analyze your browsing habits. This allows us to personalize the content we offer and to show you advertisements related to your preferences. By clicking "Accept all" you agree to the storage of cookies on your device to improve website navigation, analyse traffic and assist our marketing activities. You can also select "System Cookies Only" to accept only the cookies required for the website to function, or you can select the cookies you wish to activate by clicking on "settings".

Accept All Only sistem cookies Configuration