Skip to content

Commit

Permalink
Change Scaling to Operate on SVG instead of Div
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmbaker committed Jan 6, 2016
1 parent 4f12e78 commit 9959d26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions panoramix/static/panoramix.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ var px = (function() {
});

// this makes the whole chart fit within the dashboard div
$("div.chart").each(function() {
$(this).css('height', '95%');
$(".slice_container > svg").each(function(index){
w = $( this ).width();
h = $( this ).height();
$( this ).get(0).setAttribute('viewBox', '0 0 '+w+' '+(h+30));
});
}

Expand Down

0 comments on commit 9959d26

Please sign in to comment.