Exhibit FAQ

From SIMILE Widgets
Revision as of 21:26, 4 November 2015 by Tullyhansen (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


I've tried to customize my Tile view like shown in the Getting_Started_with_Exhibit but all the tiles show up empty. What did I do wrong?

You must be referring to the part of the tutorial where the author asks you to add the following table:

<table ex:role="exhibit-lens" class="nobelist">
           <td><img ex:src-content=".imageURL" /></td>
               <div ex:content=".label" class="name"></div>
                   <span ex:content=".discipline" class="discipline"></span>, 
                   <span ex:content=".nobel-year" class="year"></span>
               <div ex:if-exists=".co-winner" class="co-winners">Co-winners: 
                   <span ex:content=".co-winner"></span>
               <div ex:content=".relationship-detail" class="relationship"></div>

Make sure the element that is going to be populated by Exhibit is empty:

<div ex:content=".label" class="name"></div>

and not:

<div ex:content=".label" class="name">

In the second case the <div> element contains a space which apparently prevents Exhibit from doing its work. If you use an automatic code beautifier, make sure that beautification does not add spaces.

Exhibit does not display all the items in the timeline. What did I do wrong?

Exhibit will do its best to display all your items but sometimes you can get the following message above your timeline: "Only X can be plotted on the timeline" where X is a number like 6, 7, or 10. This means that Exhibit was not able to get dates for all your items. Because of the way Exhibit works and the way Javascript works make sure of the of following:

  1. The properties that contain your start and end dates are treated as strings. Do not define them with a valueType of "number" and put them in double quotes.
  2. Your years must be normalized to 4 digits. So if you want to represent 35CE, you must represent it as "0035". This is due to what Exhibit expects as a date. The regular expression used to parse dates is encoded as follows:
SimileAjax.DateTime._dateRegexp = new RegExp(
    "^(-?)([0-9]{4})(" + [
        "(-?([0-9]{2})(-?([0-9]{2}))?)", // -month-dayOfMonth
        "(-?([0-9]{3}))",                // -dayOfYear
        "(-?W([0-9]{2})(-?([1-7]))?)"    // -Wweek-dayOfWeek
    ].join("|") + ")?$"

Here are some example dates and how to encode them to be recognized by Exhibit:

124BCE: "-0124"
35CE: "0035"
Day 300 of the year 1984: "1984-300"
August 6th 1984: "1984-08-06"
Day 2 of Week 23 of the year 1984BCE: "-1984-W23-2"
Personal tools