Follow

Use TimelineJS without iFrame?

Can I put a timeline directly into an HTML page without embedding the iFrame?

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

4 Comments

  • 0
    Avatar
    Joe Germuska

    Yes, you can definitely put a Timeline into a page without an iFrame.

    The "Republican Run-up" example shows a very simple way to do it using a Google Spreadsheet as the data source; the "Revolutionary User Interfaces" example demonstrates how to do it by loading a JSON file externally.

    More information about how to configure TimelineJS without an iFrame is on the Github site: https://github.com/NUKnightLab/TimelineJS

    Hope this helps.

     

  • 0
    Avatar
    Joe Germuska

    You can tell Google Spreadsheet that it should treat the date column as text -- that is, not reformat it -- but if you use a variety of time representations in the Google spreadsheet, Timeline will probably have trouble organizing the events.

    If your entire timeline is on the scale of a single day, then it will automatically use hours instead of dates. 

    If you simply want to format dates differently, you can do that with a variant of a language translation file -- the authoring tool at http://timeline.knightlab.com/#make has an example. Language options are under "more options" in step 3; the second menu item is "English (24-hour-time)". It's possible to specify a single alternate date format that would be used for all slides, like this one does. It's kind of involved to explain, so I'll wait until it's clear that's what you're looking for!

     

     

     

     

  • 0
    Avatar
    Mark

    Thanks for the quick answer, Joe. To be more plain, I am not a journalist but someone who writes about books, and my thinking is to use your tool to create timelines of fictional plots. That said, a novel might be set across days, weeks, months or years, but the year(s) might not be specified. I'd like to use TimelineJS to display such a sequence of events chronologically without having to use a year.

    From your answer above, I believe that for any multi-day time period displayed, I would have to specify a year. So let me ask a different question: can I somehow remove the display of the date (perhaps via CSS or another means) so that while I use a year to satisfy the coding requirements and achieve a chronological order, I don't show that year, since it is not actually relevant to the plot?

    Does that make sense?

  • 0
    Avatar
    Mark

    Thanks Joe! 

    One more question for you. I see other examples in which timelines use an alternate date format. The Radiolab one for instance uses a time of day, and there is another that just uses year. I'd like the option to use time of day, day of week, months or years, but when I try to use anything but a standard dd/mm/yyyy format, the Google Spreadsheet reformats it. How do I get around this?

    Mark

Please sign in to leave a comment.
Powered by Zendesk