title: Dynamically change background colour of a Dashing widget
body: <p>I've built a dashboard using the ruby based Dashing framework and all seems to be running well but I'd like to be able to change the background colour of one of my List widgets (<em>mywidget</em>) based on one of the values in the list.</p>
  
  <p>My updatelist.rb job file currently looks like:</p>
  
  <pre><code>hashdata = Hash.new({ value: 0 })
  
  SCHEDULER.every '10s' do
  
    File.open('xxx.txt').each do |line|
      field = line.split(;).first
      value = line.split(;).last
  
      if ['Status', 'Active', 'Duration].include? field
       hashdata[field] = { label: field, value: value }
      end
    end
    send_event('mywidget', { items: hashdata.values })
  end
  </code></pre>
  
  <p>The file it is reading (<em>xxx.txt</em>) is formatted like:</p>
  
  <pre><code>Status; Good
  Active; No
  Duration; 1000
  </code></pre>
  
  <p>I'd like change the background colour of the list widget based on the value of Status i.e. Good=green, Average=yellow, Poor=red.</p>
  
  <p>How can I do this? Adding something to the coffee script seems the obvious solution but I can't see how to achieve it</p>