Look more closely: you forgot the ".raw" suffix for dewpoint.

On Sun, Sep 2, 2018 at 12:56 PM <[email protected]> wrote:

> Hello,
>
> I have been trying, with no luck, to add colors do various levels of the
> current dewpoint which post in the table on index.html. It works fine for
> UV but not for dewpoint. Steve helped me with the html code for UV but when
> I try the same thing for dewpoint it doesn't work. It gives the correct
> data but shows the color violet rather than red which it should display for
> the range  71 to 80. It's probably something simple but  I've tried
> everything I can think of at this point. Could someone help on this?
> My <tr class = "odd"> is for odd/even shading on the display.  Thanks.
> Bob
>
> My attempt at coloring dewpoint (from index.html.tmpl)
>
>            #if $current.dewpoint.has_data
>                 <tr class = "odd">
>                 <td class="stats_label">Dewpoint</td>
>                   #if $current.dewpoint <= 55
>                     <td class="stats_dewpoint_data"
> style="background-color: limegreen">$current.dewpoint </td>
>                   #else if $current.dewpoint >= 56 and $current.dewpoint
> <= 64
>                     <td class="stats_dewpoint_data"
> style="background-color: yellow">$current.dewpoint </td>
>                   #else if $current.dewpoint >= 65 and $current.dewpoint
> <= 70
>                     <td class="stats_dewpoint_data"
> style="background-color: orange">$current.dewpoint </td>
>                   #else if $current.dewpoint >= 71 and $current.dewpoint
> <= 80
>                     <td class="stats_dewpoint_data"
> style="background-color: red">$current.dewpoint </td>
>                   #else if $current.dewpoint >= 81
>                     <td class="stats_dewpoint_data"
> style="background-color: violet">$current.dewpoint</td>
>                   #end if
>
>
> Code for UV color level which works fine:
>
>            #if $day.UV.has_data
>                 <tr class = "even">
>                 <td class="stats_label">UV Index</td>
>                   #if $current.UV.raw <= 2.4
>                     <td class="stats_uv_data" style="background-color:
> limegreen">$current.UV</td>
>                   #else if $current.UV.raw >= 2.5 and $current.UV.raw <=
> 5.4
>                     <td class="stats_uv_data" style="background-color:
> yellow">$current.UV</td>
>                   #else if $current.UV.raw >= 5.5 and $current.UV.raw <=
> 7.4
>                     <td class="stats_uv_data" style="background-color:
> orange">$current.UV</td>
>                   #else if $current.UV.raw >= 7.5 and $current.UV.raw <=
> 10.4
>                     <td class="stats_uv_data" style="background-color:
> red">$current.UV</td>
>                   #else if $current.UV.raw > 10.5
>                     <td class="stats_uv_data" style="background-color:
> violet">$current.UV</td>
>                   #end if
>                 </tr>
>                 #end if
>
> My site: *grattans.org/wx <http://grattans.org/wx>*
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to