deno.land / x / billboardjs@3.6.0 / config / Options / shape / pie.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/** * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license *//** * x Axis config options */export default { /** * Set pie options * @name pie * @memberof Options * @type {object} * @property {object} pie Pie object * @property {boolean} [pie.label.show=true] Show or hide label on each pie piece. * @property {Function} [pie.label.format] Set formatter for the label on each pie piece. * @property {number} [pie.label.threshold=0.05] Set threshold ratio to show/hide labels. * @property {number|Function} [pie.label.ratio=undefined] Set ratio of labels position. * @property {boolean|object} [pie.expand=true] Enable or disable expanding pie pieces. * @property {number} [pie.expand.rate=0.98] Set expand rate. * @property {number} [pie.expand.duration=50] Set expand transition time in ms. * @property {number|object} [pie.innerRadius=0] Sets the inner radius of pie arc. * @property {number|object|undefined} [pie.outerRadius=undefined] Sets the outer radius of pie arc. * @property {number} [pie.padAngle=0] Set padding between data. * @property {number} [pie.padding=0] Sets the gap between pie arcs. * @property {number} [pie.startingAngle=0] Set starting angle where data draws. * @see [Demo: expand.rate](https://naver.github.io/billboard.js/demo/#PieChartOptions.ExpandRate) * @see [Demo: innerRadius](https://naver.github.io/billboard.js/demo/#PieChartOptions.InnerRadius) * @see [Demo: outerRadius](https://naver.github.io/billboard.js/demo/#PieChartOptions.OuterRadius) * @see [Demo: startingAngle](https://naver.github.io/billboard.js/demo/#PieChartOptions.StartingAngle) * @example * pie: { * label: { * show: false, * format: function(value, ratio, id) { * return d3.format("$")(value); * * // to multiline, return with '\n' character * // return value +"%\nLine1\n2Line2"; * }, * * // 0.1(10%) ratio value means, the minimum ratio to show text label relative to the total value. * // if data value is below than 0.1, text label will be hidden. * threshold: 0.1, * * // set ratio callback. Should return ratio value * ratio: function(d, radius, h) { * ... * return ratio; * }, * // or set ratio number * ratio: 0.5 * }, * * // disable expand transition for interaction * expand: false, * * expand: { * // set duration of expand transition to 500ms. * duration: 500, * * // set expand area rate * rate: 1 * }, * * innerRadius: 0, * * // set different innerRadius for each data * innerRadius: { * data1: 10, * data2: 0 * }, * * outerRadius: 100, * * // set different outerRadius for each data * outerRadius: { * data1: 50, * data2: 100 * } * * padAngle: 0.1, * padding: 0, * startingAngle: 1 * } */ pie_label_show: true, pie_label_format: <(() => number|string)|undefined> undefined, pie_label_threshold: 0.05, pie_label_ratio: <(() => number)|undefined> undefined, pie_expand: <boolean|{rate?: number; duration?: number;}> {}, pie_expand_rate: 0.98, pie_expand_duration: 50, pie_innerRadius: <number|{[key: string]: number}> 0, pie_outerRadius: <number|{[key: string]: number}|undefined> undefined, pie_padAngle: 0, pie_padding: 0, pie_startingAngle: 0};
billboardjs

Version Info

Tagged at
2 years ago