Skip to content

Instantly share code, notes, and snippets.

@acrymble
Created October 13, 2012 10:27
Show Gist options
  • Save acrymble/3884083 to your computer and use it in GitHub Desktop.
Save acrymble/3884083 to your computer and use it in GitHub Desktop.
Matt Price
// array of ExtendedData elements to look for extendedData: ["category", "theme"], // Transform Function to do some magic: // read the category and use it to set the "theme" // property of the object, which will change the color // and icons used to display it. transformFunction: function(item) { // item is the raw loaded data from the spreadsheet record. // the magic is done in the getThemeFromData function // defined earlier: var theme = getThemeFromData(item); // now asociate the theme permanently with the // item by setting its options.theme attribue item.options.theme = theme; // we're finished with the transform -- now we have to give // our modified item back to TimeMap to make use of: return item; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment