Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows a single pie segment to be used for Android stock browser #163

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions flotr2.amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,6 @@ Graph.prototype = {
Flotr.Graph = Graph;

})();

/**
* Flotr Axis Library
*/
Expand Down Expand Up @@ -3381,8 +3380,8 @@ Flotr.addType('pie', {
value = data[0][1],
html = [],
vScale = 1,//Math.cos(series.pie.viewAngle);
measure = Math.PI * 2 * value / this.total,
startAngle = this.startAngle || (2 * Math.PI * options.startAngle), // TODO: this initial startAngle is already in radians (fixing will be test-unstable)
measure = Math.PI * 2 * (value / this.total),
startAngle = measure === (Math.PI * 2) ? 0 : this.startAngle || (2 * Math.PI * options.startAngle), // TODO: this initial startAngle is already in radians (fixing will be test-unstable)
endAngle = startAngle + measure,
bisection = startAngle + measure / 2,
label = options.labelFormatter(this.total, value),
Expand Down
2 changes: 1 addition & 1 deletion flotr2.ie.min.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions flotr2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3044,7 +3044,6 @@ Graph.prototype = {
Flotr.Graph = Graph;

})();

/**
* Flotr Axis Library
*/
Expand Down Expand Up @@ -4708,8 +4707,8 @@ Flotr.addType('pie', {
value = data[0][1],
html = [],
vScale = 1,//Math.cos(series.pie.viewAngle);
measure = Math.PI * 2 * value / this.total,
startAngle = this.startAngle || (2 * Math.PI * options.startAngle), // TODO: this initial startAngle is already in radians (fixing will be test-unstable)
measure = Math.PI * 2 * (value / this.total),
startAngle = measure === (Math.PI * 2) ? 0 : this.startAngle || (2 * Math.PI * options.startAngle), // TODO: this initial startAngle is already in radians (fixing will be test-unstable)
endAngle = startAngle + measure,
bisection = startAngle + measure / 2,
label = options.labelFormatter(this.total, value),
Expand Down
6 changes: 3 additions & 3 deletions flotr2.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -749,4 +749,4 @@ Graph.prototype = {

Flotr.Graph = Graph;

})();
})();
4 changes: 2 additions & 2 deletions js/types/pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Flotr.addType('pie', {
value = data[0][1],
html = [],
vScale = 1,//Math.cos(series.pie.viewAngle);
measure = Math.PI * 2 * value / this.total,
startAngle = this.startAngle || (2 * Math.PI * options.startAngle), // TODO: this initial startAngle is already in radians (fixing will be test-unstable)
measure = Math.PI * 2 * (value / this.total),
startAngle = measure === (Math.PI * 2) ? 0 : this.startAngle || (2 * Math.PI * options.startAngle), // TODO: this initial startAngle is already in radians (fixing will be test-unstable)
endAngle = startAngle + measure,
bisection = startAngle + measure / 2,
label = options.labelFormatter(this.total, value),
Expand Down