/home/desid573/public_html/family/pdd/app/webroot/admin/plugins/morris/examples
NameSizeModeActions
lib/-0755rm
area-as-line.html10250644editdlrm
area.html10980644editdlrm
bar-colors.html12530644editdlrm
bar-no-axes.html10010644editdlrm
bar.html10420644editdlrm
days.html15530644editdlrm
decimal-custom-hover.html11920644editdlrm
diagonal-xlabels-bar.html15860644editdlrm
diagonal-xlabels.html15750644editdlrm
donut-colors.html11170644editdlrm
donut-formatter.html10640644editdlrm
donut.html9970644editdlrm
dst.html10330644editdlrm
events.html25090644editdlrm
goals.html10060644editdlrm
months-no-smooth.html15460644editdlrm
negative.html11860644editdlrm
no-grid.html15680644editdlrm
non-continuous.html17780644editdlrm
non-date.html12160644editdlrm
quarters.html25310644editdlrm
resize.html16440644editdlrm
stacked_bars.html10110644editdlrm
timestamps.html16250644editdlrm
updating.html13690644editdlrm
weeks.html24790644editdlrm
years.html14890644editdlrm
_template.html7080644editdlrm
Edit: /home/desid573/public_html/family/pdd/app/webroot/admin/plugins/morris/examples/bar-colors.html (1253B)

Bar charts

// Use Morris.Bar
Morris.Bar({
  element: 'graph',
  data: [
    {x: '2011 Q1', y: 0},
    {x: '2011 Q2', y: 1},
    {x: '2011 Q3', y: 2},
    {x: '2011 Q4', y: 3},
    {x: '2012 Q1', y: 4},
    {x: '2012 Q2', y: 5},
    {x: '2012 Q3', y: 6},
    {x: '2012 Q4', y: 7},
    {x: '2013 Q1', y: 8}
  ],
  xkey: 'x',
  ykeys: ['y'],
  labels: ['Y'],
  barColors: function (row, series, type) {
    if (type === 'bar') {
      var red = Math.ceil(255 * row.y / this.ymax);
      return 'rgb(' + red + ',0,0)';
    }
    else {
      return '#000';
    }
  }
});