Personal tools

Template:PeakCountPerSample: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
No edit summary
No edit summary
Line 185: Line 185:
     var tmp = peakscount[i];
     var tmp = peakscount[i];
     var num = parseFloat(tmp);
     var num = parseFloat(tmp);
     options.series[0].data.push(num);
    var col = getColor(num);
     options.series[0].data.push({
                y:num,
                color: col,
                fillColor: col
                      });
     }
     }
    
    
Line 192: Line 197:
var chart = new Highcharts.Chart(options);
var chart = new Highcharts.Chart(options);
});
});
function getColor(d) {
    return d > 100 ? '#800026' :
          d > 80  ? '#BD0026' :
          d > 70  ? '#E31A1C' :
          d > 50  ? '#FC4E2A' :
          d > 30  ? '#FD8D3C' :
          d > 20  ? '#FEB24C' :
          d > 10  ? '#FED976':
                      '#FFEDA0';
}


</script>
</script>

Revision as of 10:23, 24 September 2013