Pie chart: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 39: | Line 39: | ||
*/ | */ | ||
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],200); | ||
}; | }; | ||
Line 55: | Line 55: | ||
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.coords = new JXG.Coords(JXG.COORDS_BY_USER, | this.point2.coords = new JXG.Coords(JXG.COORDS_BY_USER, | ||
[this.midpoint.coords.usrCoords[1]+dx*(z-ddx)/z, | [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], | ||
this.board); | this.board); | ||
*/ | |||
this.prepareUpdate().update().updateRenderer(); | this.prepareUpdate().update().updateRenderer(); | ||
this.point2.moveTo([this.midpoint.coords.usrCoords[1]+dx*(z-ddx)/z, | |||
this.midpoint.coords.usrCoords[2]+dy*(z-ddy)/z],200); | |||
}; | }; | ||
} | } |
Revision as of 15:48, 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 ...