Skip to content

Commit

Permalink
Closes #34
Browse files Browse the repository at this point in the history
  • Loading branch information
benkeen committed Dec 14, 2014
1 parent a4205e4 commit 602933e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Lots! A big thanks to the developers of these scripts.

### Changelog

- `0.1.5` - Work in progress.
- `0.1.5` - Dec 14, 2014. placeholderParser option added for tooltips; bug fixes.
- `0.1.4` - Nov 16, 2014, Tooltips added, bug fixes.
- `0.1.3` - July 2, 2014. Small segment grouping option added; jQuery dependency dropped.
- `0.1.2` - June 7, 2014. Assorted bug fixes.
Expand Down
13 changes: 8 additions & 5 deletions d3pie-source/_math.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ var math = {
var h = size.canvasHeight - canvasPadding.top - canvasPadding.bottom;

// now factor in the footer, title & subtitle
h -= pie.textComponents.headerHeight;
if (pie.textComponents.footer.exists) {
h -= pie.textComponents.footer.h;
}
if (pie.options.header.location !== "pie-center") {
h -= pie.textComponents.headerHeight;
}

if (pie.textComponents.footer.exists) {
h -= pie.textComponents.footer.h;
}

// for really teeny pies, h may be < 0. Adjust it back
h = (h < 0) ? 0 : h;
Expand Down Expand Up @@ -202,4 +205,4 @@ var math = {
return (r1 * r1 <= dist) && (dist <= r2 * r2) &&
(theta1 <= angle) && (angle <= theta2);
}
};
};
12 changes: 8 additions & 4 deletions d3pie/d3pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,13 @@ var math = {
var h = size.canvasHeight - canvasPadding.top - canvasPadding.bottom;

// now factor in the footer, title & subtitle
h -= pie.textComponents.headerHeight;
if (pie.textComponents.footer.exists) {
h -= pie.textComponents.footer.h;
}
if (pie.options.header.location !== "pie-center") {
h -= pie.textComponents.headerHeight;
}

if (pie.textComponents.footer.exists) {
h -= pie.textComponents.footer.h;
}

// for really teeny pies, h may be < 0. Adjust it back
h = (h < 0) ? 0 : h;
Expand Down Expand Up @@ -776,6 +779,7 @@ var math = {
(theta1 <= angle) && (angle <= theta2);
}
};

//// --------- labels.js -----------
var labels = {

Expand Down
4 changes: 2 additions & 2 deletions d3pie/d3pie.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion website/pages/generator/examplePies.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ define([], function() {
canvasWidth: 590,
canvasHeight: 500,
pieInnerRadius: "95%",
pieOuterRadius: "80%"
pieOuterRadius: "70%"
},
data: {
sortOrder: "label-desc",
Expand Down

0 comments on commit 602933e

Please sign in to comment.