Skip to content

Commit

Permalink
Merge pull request #98 from bradmbaker/patch-1
Browse files Browse the repository at this point in the history
Change Scaling to Operate on SVG instead of Div
  • Loading branch information
mistercrunch committed Jan 6, 2016
2 parents 4f12e78 + 9959d26 commit 1b7725b
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 1b7725b

Please sign in to comment.