Skip to content

Commit

Permalink
pieChart can now go up to 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Poignet committed Jan 19, 2012
1 parent c7f943d commit b795a83
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/main/resources/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@
if (isNaN(progress_oss) || progress_oss == 0) {
progress_oss = 0.001;
}
if (progress_oss == 100) {
progress_oss = 99.999;
}
var json = {
'color' : [ '#1BA2FF', '#e6e6e6' ],
'label' : [ 'Files' ],
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/webapp/js/introCharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function pieChart(json,offset) {
if(progress_oss==0.001){
uprogress_oss=0;
}
if(progress_oss==99.999){
uprogress_oss=100;
}
tip.innerHTML = "<b>Open source</b>: " +uprogress_oss+"%";
}
}
Expand Down
7 changes: 5 additions & 2 deletions src/main/resources/webapp/result.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,12 @@
bindButtons();
var json = ${treemapData};
drawTreemap(json,true,${modelData.nodeLevel});
var iprogress_oss=progress_oss;
if(progress_oss==0){
iprogress_oss=0.001
progress_oss=0.001
}
if (progress_oss >= 100) {
progress_oss = 99.999;
}
pieChart({
'color' : [ '#1BA2FF', '#e6e6e6' ],
Expand Down

0 comments on commit b795a83

Please sign in to comment.