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 : 11593  
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 AND DEVELOPMENT.


Related Posts

How to use the endsWith method in JavaScript

In this short tutorial, we are going to see what the endsWith method, introduced in JavaScript ES6, is and how it is used with strings in JavaScript. The endsWith method is…

What are javascript symbols and how can they help you?

Symbols are a new primitive value introduced by ES6. Their purpose is to provide us unique identifiers. In this article, we tell you how they work, in which way they…

Callbacks in JavaScript

Callback functions are the same old JavaScript functions. They have no special syntax, as they are simply functions that are passed as an argument to another function. The function that receives…

How to create PDF with JavaScript and jsPDF

Creating dynamic PDF files directly in the browser is possible thanks to the jsPDF JavaScript library. In the last part of this article we have prepared a practical tutorial where I…

How to make your own custom cursor for your website

When I started browsing different and original websites to learn from them, one of the first things that caught my attention was that some of them had their own cursors,…

Node.js and npm: introductory tutorial

In this tutorial we will see how to install and use both Node.js and the npm package manager. In addition, we will also create a small sample application. If you…

How to connect to MySQL with Node.js

Let's see how you can connect to a MySQL database using Node.js, the popular JavaScript runtime environment. Before we start, it is important to note that you must have Node.js installed…

JavaScript Programming Styles: Best Practices

When programming with JavaScript there are certain conventions that you should apply, especially when working in a team environment. In fact, it is common to have meetings to discuss standards…

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…

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