Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1012 from comzeradd/kpi-tooltip
Browse files Browse the repository at this point in the history
Fix contribution levels order on KPI
  • Loading branch information
ppapadeas committed Apr 23, 2015
2 parents e51145e + 80d830d commit e723684
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
20 changes: 18 additions & 2 deletions remo/dashboard/static/dashboard/css/kpi.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,31 @@
font-size: 12px;
}

.people-core {
color: #ff4f32;
}

.people-active {
color: #ff725a;
}

.people-casual {
color: #ff9584;
}

.people-inactive {
color: #ffb8ad;
}

.area-people-core {
fill: #ff4f32;
}

.area-people-casual {
.area-people-active {
fill: #ff725a;
}

.area-people-active {
.area-people-casual {
fill: #ff9584;
}

Expand Down
21 changes: 10 additions & 11 deletions remo/dashboard/static/dashboard/js/kpi.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,15 @@ $(document).ready(function() {
.attr('class', 'd3-tip')
.offset([35, 0])
.html(function(d) {
return '<strong>Inactive:</strong> <span style="color:red">' +
d.inactive + '</span><br>' +
'<strong>Active:</strong> <span style="color:red">' +
return '<strong>Core:</strong> <span class="people-core">' +
d.core + '</span><br>' +
'<strong>Active:</strong> <span class="people-active">' +
d.active + '</span><br>' +
'<strong>Casual:</strong> <span style="color:red">' +
'<strong>Casual:</strong> <span class="people-active">' +
d.casual + '</span><br>' +
'<strong>Core:</strong> <span style="color:red">' +
d.core + '</span><br>' +
'<strong>Total:</strong> <span style="color:red">' +
d.active_total + '</span>';
'<strong>Inactive:</strong> <span class="people-casual">' +
d.inactive + '</span><br>' +
'<strong>Total: ' + d.active_total + '</strong>';
});

svg.call(tip);
Expand All @@ -112,9 +111,9 @@ $(document).ready(function() {
d.active = +d.active;
d.casual = +d.casual;
d.inactive = +d.inactive;
d.active_stack = d.active + d.inactive;
d.casual_stack = d.casual + d.active_stack;
d.core_stack = d.core + d.casual_stack;
d.casual_stack = d.casual + d.inactive;
d.active_stack = d.active + d.casual_stack;
d.core_stack = d.core + d.active_stack;
d.active_total = d.core + d.active + d.casual + d.inactive;
});

Expand Down

0 comments on commit e723684

Please sign in to comment.