Here's an example
    http://simile.mit.edu/axo/Disasters
although its HTML source will be hard to read.

An icon coder maps a string to an icon URL. In the above example, it 
maps "Earthquake" to
    
http://www.americanfamilysafety.com/media/be-ready-library/icons/icon-earthquakes.gif

There is some more documentation here
    http://simile.mit.edu/wiki/Exhibit/2.0/Coders

If you just want to display a colored ball, then try
    <img ex:src-subcontent="ball-{{.phealth}}.png" />
and then have 3 images on your site called ball-1.png, ball-2.png, and 
ball-3.png.

David

Stephen Martino wrote:
> David,
>  
> I was actually trying to use an icon coder (perhaps I do not 
> understand what one is), but what I wanted to do was the below, and it 
> was suggested that I use an icon coder?
>  
> I have a value of 1, 2, or 3 that I read it from my json data
> >>>> (.phealth) and I want to display a colored ball based on the value it
> >>>> is set to, can this be done?
>  
> Does an example of an icon coder exist that I can take a look at?
>  
> thanks?
>  
> Steve
>
>
> On Wed, Jan 14, 2009 at 10:24 PM, David Huynh <[email protected] 
> <mailto:[email protected]>> wrote:
>
>
>     Steve,
>
>     I think your coder is an icon coder, not a color coder. In any
>     case, the
>     tabular view actually doesn't understand coders of any kind... One way
>     to color-code its rows is to use a rowStyler, e.g., see the HTML
>     source of
>
>        http://simile.mit.edu/exhibit/examples/presidents/presidents.html
>
>     You can also use row templates--see
>
>     
> http://groups.google.com/group/simile-widgets/browse_thread/thread/c04645e9069decad/9180f9c59e07d7fd
>
>     David
>
>     Steve wrote:
>     > Any thoughts on why the below is not working and will it work with a
>     > Tabular view?
>     >
>     > On Jan 13, 8:48 am, Steve <[email protected]
>     <mailto:[email protected]>> wrote:
>     >
>     >> Eric,
>     >>
>     >> Thanks I started down this road, but can't seem to get it to
>     >> work...here is my colorcoder
>     >>
>     >> <div ex:role="coder" ex:coderClass="Icon" id="health-icons">
>     >>    <span
>     ex:icon="http://ora253.dce.harvard.edu:7779/~smartino/final/
>     <http://ora253.dce.harvard.edu:7779/%7Esmartino/final/>
>     >> images/StephenMartino.gif">1</span>
>     >>    <span
>     ex:icon="http://ora253.dce.harvard.edu:7779/~smartino/final/
>     <http://ora253.dce.harvard.edu:7779/%7Esmartino/final/>
>     >> images/GlennFull.gif">2</span>
>     >>    <span
>     ex:icon="http://ora253.dce.harvard.edu:7779/~smartino/final/
>     <http://ora253.dce.harvard.edu:7779/%7Esmartino/final/>
>     >> images/JohnBatista.gif">3</span>
>     >>  </div>
>     >>
>     >> And here is the View I am trying to implement it in...
>     >>
>     >> ex:role="view"
>     >>            ex:viewClass="Tabular"
>     >>            ex:colorCoder="health-icons"
>     >>            ex:phealth=".phealth"
>     >>            ex:colorKey=".phealth"
>     >>            ex:label="Table"
>     >>
>     >> ex:columns=".icon, .pstartdate, .penddate, .ppriority,
>     .staffname, .pstatus, .budget, .pdescription, .DetailBio,
>     >> phealth"
>     >>            ex:columnLabels="Photo, Project Start Date, Project End
>     >> Date, Priority, Project Manager, Project Status, Project Budget,
>     >> Project Name, Project Administration, Project Health"
>     >>            ex:formats="date { mode: medium; show: date }"
>     >>            ex:columnFormats="list, date, date, list, list,
>     list, list,
>     >> list, ,list, list"
>     >>            ex:sortColumn="1"
>     >>            ex:sortAscending="true"
>     >>            ex:showToolbox="false"
>     >>
>     >> But I do not see anything changing????  Can this be used in a
>     Tabular
>     >> view?
>     >>
>     >> thanks
>     >>
>     >> Steve
>     >>
>     >> On Jan 12, 11:50 am, Eric Pugh <[email protected]
>     <mailto:[email protected]>>
>     >> wrote:
>     >>
>     >>
>     >>> If you are using Exhibit, then look at the iconCoder stuff to pick
>     >>> what image to use.
>     >>>
>     >>> Eric
>     >>>
>     >>> On Jan 11, 2009, at 8:31 AM, Steve wrote:
>     >>>
>     >>>> to the group,
>     >>>>
>     >>>> I remember that the blue.png ball would display for certain
>     events
>     >>>> (start and end date were equal in timeline view?), but mine
>     do not see
>     >>>> to work...any suggestions would help.
>     >>>>
>     >>>> the second part is can I always make this ball appear and
>     change the
>     >>>> color of it based on one of my values that in my json data?
>     >>>>
>     >>>> I have a value of 1, 2, or 3 that I read it from my json data
>     >>>> (.phealth) and I want to display a colored ball based on the
>     value it
>     >>>> is set to, can this be done?
>     >>>>
>     >>>> thanks
>     >>>>
>     >>>> Steve
>     >>>>
>     >>> -----------------------------------------------------
>     >>> Eric Pugh | Principal | OpenSource Connections, LLC |
>     434.466.1467 |http://www.opensourceconnections.com
>     <http://www.opensourceconnections.com/>
>     >>>
>     > >
>     >
>
>
>
>     >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to