Created
October 13, 2012 10:27
-
-
Save acrymble/3884083 to your computer and use it in GitHub Desktop.
Matt Price
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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