Skip to content

Commit

Permalink
Complete Budget Stats view with translations and charts
Browse files Browse the repository at this point in the history
  • Loading branch information
bertocq committed Jun 30, 2017
1 parent 4c1a617 commit b9dce7d
Show file tree
Hide file tree
Showing 7 changed files with 3,913 additions and 57 deletions.
Binary file added app/assets/images/budgets/stats/gender.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions app/assets/javascripts/budgets-stats-charts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Chart gender
var doughnutDataGender = [
{
value: 23038,
color:"#FF6600",
highlight: "#fc9550",
label: "Hombres"
},
{
value: 22244,
color: "#FF9E01",
highlight: "#fbc56d",
label: "Mujeres"
},
];


var load_charts = function(){
var sex = document.getElementById("sps-chart-gender").getContext("2d");
window.myDoughnut = new Chart(sex).Doughnut(doughnutDataGender, {responsive : true});
};

$(function(){
$(document).ready(load_charts);
$(document).on('page:load', load_charts);
$(document).on('ajax:complete', load_charts);
});
Loading

0 comments on commit b9dce7d

Please sign in to comment.