| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| `cutoutPercentage` | `number` | `50` - for doughnut, `0` - for pie | The percentage of the chart that is cut out of the middle.
-| `rotation` | `number` | `-0.5 * Math.PI` | Starting angle to draw arcs from.
-| `circumference` | `number` | `2 * Math.PI` | Sweep to allow arcs to cover.
+| `rotation` | `number` | 0 | Starting angle to draw arcs from.
+| `circumference` | `number` | 360 | Sweep to allow arcs to cover.
| `animation.animateRotate` | `boolean` | `true` | If true, the chart will animate in with a rotation animation. This property is in the `options.animation` object.
| `animation.animateScale` | `boolean` | `false` | If true, will animate scaling the chart from the center outwards.
* Polar area `elements.arc.angle` is now configured in degrees instead of radians.
* Polar area `startAngle` option is now consistent with `Radar`, 0 is at top and value is in degrees. Default is changed from `-½π` to `0`.
* Doughnut `rotation` option is now in degrees and 0 is at top. Default is changed from `-½π` to `0`.
-* Doughnut `circumference` option is now in degrees. Default is changed from `2π` to `0`.
+* Doughnut `circumference` option is now in degrees. Default is changed from `2π` to `360`.
* `scales.[x/y]Axes` arrays were removed. Scales are now configured directly to `options.scales` object with the object key being the scale Id.
* `scales.[x/y]Axes.barPercentage` was moved to dataset option `barPercentage`
* `scales.[x/y]Axes.barThickness` was moved to dataset option `barThickness`
});
document.getElementById('changeCircleSize').addEventListener('click', function() {
- if (window.myDoughnut.options.circumference === Math.PI) {
- window.myDoughnut.options.circumference = 2 * Math.PI;
- window.myDoughnut.options.rotation = -Math.PI / 2;
+ if (window.myDoughnut.options.circumference === 180) {
+ window.myDoughnut.options.circumference = 360;
+ window.myDoughnut.options.rotation = -45;
} else {
- window.myDoughnut.options.circumference = Math.PI;
- window.myDoughnut.options.rotation = -Math.PI;
+ window.myDoughnut.options.circumference = 180;
+ window.myDoughnut.options.rotation = -90;
}
window.myDoughnut.update();
/**
* Sweep to allow arcs to cover.
- * @default 2 * Math.PI
+ * @default 360
*/
circumference: number;
/**
* Starting angle to draw this dataset from.
- * @default -0.5 * Math.PI
+ * @default 0
*/
rotation: number;
/**
* Starting angle to draw arcs from.
- * @default -0.5 * Math.PI
+ * @default 0
*/
rotation: number;
/**
* Sweep to allow arcs to cover.
- * @default 2 * Math.PI
+ * @default 360
*/
circumference: number;