Created
March 29, 2013 13:05
-
-
Save SkyKOG/5270711 to your computer and use it in GitHub Desktop.
Still the prob ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div class="span4"> | |
<table class="table table-bordered"> | |
<thead> | |
<tr> | |
<th>Specialization</th> | |
<th>Number of Employees</th> | |
</tr> | |
</thead> | |
<tbody> | |
<% @emp_spec_views.each do |emp_spec_view| %> | |
<tr> | |
<td><%= emp_spec_view.specialization_name %></td> | |
<td><%= emp_spec_view.number_of_employees %></td> | |
</tr> | |
<% end %> | |
</tbody> | |
</table> | |
</div> | |
<div class="span8"> | |
</div> | |
</div> | |
<script> | |
window.onload = function () { | |
Morris.Bar({ | |
element: 'genders_chart', | |
data: $("#genders_chart").data("emp_spec_views"), | |
xkey: 'specialization_name', | |
ykeys: ['number_of_employees'], | |
labels: ['Number Of Employees'], | |
hideHover: 'true', | |
barColors: function (row, series, type) { | |
if (type === 'bar') { | |
var blue = Math.floor(255 * row.y / this.ymax); | |
return 'rgb(' + blue + ',0,0)'; | |
} | |
else { | |
return '#000'; | |
} | |
} | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment