Skip to content

Commit

Permalink
chart fix
Browse files Browse the repository at this point in the history
  • Loading branch information
George committed Oct 13, 2020
1 parent b8e1861 commit be603d0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion shell/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ python3 ./manage_unit_test.py test solr_helpers google_helpers.bigquery --noinpu

echo "Running module unit tests with unittest..."

#python3 -m unittest solr_helpers
#python3 -m unittest solr_helpers
20 changes: 16 additions & 4 deletions static/js/image_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,18 @@ require([
.domain(nonZeroLabels)
.range(d3.schemeCategory10);

// don't color last pie slice the same as first
var colorPie = function(lbl){
var col="";
if ( (nonZeroLabels.length>1) & (lbl === nonZeroLabels[nonZeroLabels.length-1]) && (color(nonZeroLabels[0])===color(lbl)) ){
col=color(nonZeroLabels[5]);
}
else{
col=color(lbl);
}
return col;
}

// Compute the position of each group on the pie:
var pie = d3.pie()
.value(function(d) {return d.value; }).sort(null);
Expand All @@ -1715,7 +1727,7 @@ require([
.outerRadius(radius)
)
.attr('fill', function(d){ return(
color(d.data.key) )
colorPie(d.data.key) )
})
.attr("stroke", "black")
.style("stroke-width", "0px")
Expand Down Expand Up @@ -2449,7 +2461,7 @@ require([
max = 100;
} */
//var max = Math.ceil($(this).data('attr-max') * 1000)/1000;
mkSlider($(this).prop('id'),min, max,1,true,false,'', $(this).data('filter-attr-id'), $(this).data('filter-display-attr'));
// mkSlider($(this).prop('id'),min, max,1,true,true,'', $(this).data('filter-attr-id'), $(this).data('filter-display-attr'));
});
};

Expand Down Expand Up @@ -2481,8 +2493,8 @@ require([
tableSortBindings('studies_table_head');
tableSortBindings('series_table_head');

mkSlider('age_at_diagnosis',0, parseInt($('#age_at_diagnosis').data('attr-max')),1,true,true, 'tcga_clinical.',
$('#age_at_diagnosis').data('filter-attr-id'), $('#age_at_diagnosis').data('filter-display-attr'));
/* mkSlider('age_at_diagnosis',0, parseInt($('#age_at_diagnosis').data('attr-max')),1,true,true, 'tcga_clinical.',
$('#age_at_diagnosis').data('filter-attr-id'), $('#age_at_diagnosis').data('filter-display-attr')); */

addSliders('quantitative');

Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h4 class="modal-title" id="gov_warning-header">Warning</h4>
possible evidence of criminal activity, NIH may provide that evidence to law enforcement officials</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">OK</button>
<button type="button" class="btn btn-primary btn-warn">OK</button>
</div>
</div>
</div>
Expand Down

0 comments on commit be603d0

Please sign in to comment.