Pie chart: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 31: | Line 31: | ||
var z = Math.sqrt(dx*dx+dy*dy); | var z = Math.sqrt(dx*dx+dy*dy); | ||
this.point2.moveTo([this.midpoint.coords.usrCoords[1]+dx*(z+ddx)/z, | this.point2.moveTo([this.midpoint.coords.usrCoords[1]+dx*(z+ddx)/z, | ||
this.midpoint.coords.usrCoords[2]+dy*(z+ddy)/z]); | this.midpoint.coords.usrCoords[2]+dy*(z+ddy)/z]); | ||
Line 55: | Line 48: | ||
var ddy = 20/(this.board.stretchY); | var ddy = 20/(this.board.stretchY); | ||
var z = Math.sqrt(dx*dx+dy*dy); | var z = Math.sqrt(dx*dx+dy*dy); | ||
this.point2.moveTo([this.midpoint.coords.usrCoords[1]+dx*(z-ddx)/z, | this.point2.moveTo([this.midpoint.coords.usrCoords[1]+dx*(z-ddx)/z, | ||
this.midpoint.coords.usrCoords[2]+dy*(z-ddy)/z]); | this.midpoint.coords.usrCoords[2]+dy*(z-ddy)/z]); |
Revision as of 15:52, 30 June 2010
A pie chart with highlight on the whole sector, enlarging labels on highlight and a gradient fill.
JavaScript code to produce this chart
Soon ...