title: Highcharts Change Bar Color Based on Value
body: <p>I'm using Highcharts and was wondering if it was possible to have the top 3 results in a bar chart to have a different color bar then the rest of the chart?  I'm populating the chart from a CSV file.</p>
  
  <p>Here is my javascript:</p>
  
  <pre><code>$(document).ready(function() {
  
          var options = {
              chart: {
                  renderTo: 'container',
                  defaultSeriesType: 'bar'
              },
              title: {
                  text: 'Spiritual Gifts Results'
              },
              colors: [
                  '#3BBEE3'
              ],
              xAxis: {
                  categories: []
              },
  
              yAxis: {
                  title: {
                      text: 'Service'
                  }
              },
              series: []
          };
  
          var data = document.getElementById("&lt;%= hdn_Data.ClientID %&gt;");
          // Split the lines
          if (data.value != "") {
              var lines = data.value.split('\n');
  
              // Iterate over the lines and add categories or series
              $.each(lines, function(lineNo, line) {
                  var items = line.split(',');
                  // header line containes categories
                  if (lineNo == 0) {
                      $.each(items, function(itemNo, item) {
                          if (itemNo &gt; 0) options.xAxis.categories.push(item);
                      });
                  }
                  // the rest of the lines contain data with their name in the first position
                  else {
                      var series = {
                          data: []
                      };
                      $.each(items, function(itemNo, item) {
                          if (itemNo == 0) {
                              series.name = item;
                          } else {
                              series.data.push(parseFloat(item));
                          }
                      });
  
                      options.series.push(series);
  
                  }
  
              });
  
              // Create the chart
              var chart1 = new Highcharts.Chart(options);
          }
      });
  </code></pre>
  
  <p>Here is a sample CSV:</p>
  
  <pre><code>Categories,Administration,Evangelism,Mercy,Shepherding,Leadership,Wisdom,Teaching
  Total Points,11,5,4,4,3,2,1
  </code></pre>
  
  <p>So in this example I'd like for 'Administration', 'Evangelism', and 'Mercy' to have a 'blue bar color' while the 'Shepherding', 'Leadership' etc. have a 'red bar color'.</p>
  
  <p>Is this possible?</p>
  
  <p>Here's <a href="http://jsfiddle.net/vP2rM/6/" rel="noreferrer">fiddle</a></p>