bio-vis-expression-bar
Version:
Simple barchart to show expression levels across experiments
27 lines (23 loc) • 930 B
JavaScript
var container_div="bar_expression_viewer";
var parentWidth = $("#bar_expression_viewer").parent().width();
var parentHeight = $(window).height();
var eb = new ExpressionBar({
target: container_div,
data: window.location.href + "/../data/3genes.json",
groupBy: ["High level stress-disease", "High level age","High level tissue","High level variety"],
renderProperty: 'count',
width: parentWidth,
fontFamily:'Palatino Linotype, Book Antiqua, Palatino, serif',
barHeight: (parentHeight * 0.02),
headerOffset: 180,
plot:'HeatMap'
}
);
// rescaling the bar chart after a 1.5 second delay of resizing the window ****************REMOVE THIS NOW!!!!!!!!!!!!!!!
var resizeTimer;
$(window).on('resize', function(e){
clearTimeout(resizeTimer); // Making sure that the reload doesn't happen if the window is resized within 1.5 seconds
resizeTimer = setTimeout(function(){
eb.resizeChart();
}, 1500);
});