playbook_ui_docs 14.22.0.pre.alpha.PLAY22958843 → 14.22.0.pre.alpha.customheaderat8564
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +8 -10
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +15 -33
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +72 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +6 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +15 -33
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +22 -52
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +16 -12
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +15 -31
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +16 -39
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +38 -86
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +15 -32
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +22 -72
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +15 -31
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +16 -37
- data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +26 -71
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +16 -29
- data/app/pb_kits/playbook/pb_circle_chart/docs/{_circle_chart_colors_rails.md → _circle_chart_colors.md} +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +16 -28
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +2 -4
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +15 -23
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +51 -81
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +75 -103
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +6 -3
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +13 -19
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +38 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +17 -30
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +20 -34
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +20 -29
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +20 -28
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +8 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +12 -12
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +3 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +12 -12
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +3 -3
- data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -1
- data/dist/playbook-doc.js +2 -2
- metadata +11 -14
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_sort.jsx +0 -65
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_sort.md +0 -5
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.html.erb +0 -14
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open_rails.md +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.html.erb +0 -18
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input_rails.md +0 -1
- /data/app/pb_kits/playbook/pb_tooltip/docs/{_tooltip_click_open_react.md → _tooltip_click_open.md} +0 -0
- /data/app/pb_kits/playbook/pb_typeahead/docs/{_typeahead_preserve_input_react.md → _typeahead_preserve_input.md} +0 -0
@@ -1,44 +1,31 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
|
3
|
-
import
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
5
|
-
import colors from '../../tokens/exports/_colors.module.scss'
|
2
|
+
|
3
|
+
import CircleChart from '../_circle_chart'
|
6
4
|
|
7
5
|
const dataWithColors = [
|
8
6
|
{
|
9
7
|
name: 'Waiting for Calls',
|
10
|
-
|
8
|
+
value: 41,
|
11
9
|
},
|
12
10
|
{
|
13
11
|
name: 'On Call',
|
14
|
-
|
12
|
+
value: 49,
|
15
13
|
},
|
16
14
|
{
|
17
15
|
name: 'After Call',
|
18
|
-
|
16
|
+
value: 10,
|
19
17
|
},
|
20
18
|
]
|
21
19
|
|
22
|
-
const CircleChartColors = () =>
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
colors
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
const options = Highcharts.merge({}, circleChartTheme, chartOptions)
|
33
|
-
|
34
|
-
return (
|
35
|
-
<div>
|
36
|
-
<HighchartsReact
|
37
|
-
highcharts={Highcharts}
|
38
|
-
options={options}
|
39
|
-
/>
|
40
|
-
</div>
|
41
|
-
)
|
42
|
-
}
|
20
|
+
const CircleChartColors = (props) => (
|
21
|
+
<div>
|
22
|
+
<CircleChart
|
23
|
+
chartData={dataWithColors}
|
24
|
+
colors={['data-6', 'data-4', 'data-2']}
|
25
|
+
id="colors-example"
|
26
|
+
{...props}
|
27
|
+
/>
|
28
|
+
</div>
|
29
|
+
)
|
43
30
|
|
44
|
-
export default CircleChartColors
|
31
|
+
export default CircleChartColors
|
@@ -1,2 +1,2 @@
|
|
1
1
|
Custom data colors allow for color customization to match the needs of business requirements.
|
2
|
-
Pass the prop `colors` and use desired values `data-1 | data-2 | data-3 | data-4 | data-5 | data-6 | data-7 | data-8` in an array. Hex colors are also available `eg: #CA0095
|
2
|
+
Pass the prop `colors` and use desired values `data-1 | data-2 | data-3 | data-4 | data-5 | data-6 | data-7 | data-8` in an array. Hex colors are also available `eg: #CA0095`
|
@@ -1,43 +1,31 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
|
3
|
-
import
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
2
|
+
|
3
|
+
import CircleChart from '../_circle_chart'
|
5
4
|
|
6
5
|
const data = [
|
7
6
|
{
|
8
7
|
name: 'Waiting for Calls',
|
9
|
-
|
8
|
+
value: 41,
|
10
9
|
},
|
11
10
|
{
|
12
11
|
name: 'On Call',
|
13
|
-
|
12
|
+
value: 49,
|
14
13
|
},
|
15
14
|
{
|
16
15
|
name: 'After Call',
|
17
|
-
|
16
|
+
value: 10,
|
18
17
|
},
|
19
18
|
]
|
20
19
|
|
21
|
-
const CircleChartCustomTooltip = () =>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
const options = Highcharts.merge({}, circleChartTheme, chartOptions)
|
32
|
-
|
33
|
-
return (
|
34
|
-
<div>
|
35
|
-
<HighchartsReact
|
36
|
-
highcharts={Highcharts}
|
37
|
-
options={options}
|
38
|
-
/>
|
39
|
-
</div>
|
40
|
-
)
|
41
|
-
}
|
20
|
+
const CircleChartCustomTooltip = (props) => (
|
21
|
+
<div>
|
22
|
+
<CircleChart
|
23
|
+
chartData={data}
|
24
|
+
id="circle-chart-default"
|
25
|
+
tooltipHtml= '<p>Custom tooltip for {point.name} <br/>with value: {point.y}</p>'
|
26
|
+
{...props}
|
27
|
+
/>
|
28
|
+
</div>
|
29
|
+
)
|
42
30
|
|
43
|
-
export default CircleChartCustomTooltip
|
31
|
+
export default CircleChartCustomTooltip
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
`pointFormat` **Type**: String | defines the HTML template for each data point and supports custom HTML when `useHTML` is enabled.
|
4
|
-
`useHTML` **Type**: boolean (default false) | enables HTML rendering in tooltips.
|
1
|
+
A custom tooltip format can be specified. The desired format can be passed as a `string` of custom HTML to the `tooltipHtml` prop.
|
2
|
+
|
5
3
|
`{point.name}` and `{point.y}` are useful values that can be referenced for each point in the graph.
|
@@ -1,38 +1,30 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
|
3
|
-
import
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
2
|
+
|
3
|
+
import CircleChart from '../_circle_chart'
|
5
4
|
|
6
5
|
const data = [
|
7
6
|
{
|
8
7
|
name: 'Waiting for Calls',
|
9
|
-
|
8
|
+
value: 41,
|
10
9
|
},
|
11
10
|
{
|
12
11
|
name: 'On Call',
|
13
|
-
|
12
|
+
value: 49,
|
14
13
|
},
|
15
14
|
{
|
16
15
|
name: 'After Call',
|
17
|
-
|
16
|
+
value: 10,
|
18
17
|
},
|
19
18
|
]
|
20
19
|
|
21
|
-
const
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
<HighchartsReact
|
31
|
-
highcharts={Highcharts}
|
32
|
-
options={options}
|
33
|
-
/>
|
34
|
-
</div>
|
35
|
-
);
|
36
|
-
};
|
20
|
+
const CircleChartDefault = (props) => (
|
21
|
+
<div>
|
22
|
+
<CircleChart
|
23
|
+
chartData={data}
|
24
|
+
id="circle-chart-default"
|
25
|
+
{...props}
|
26
|
+
/>
|
27
|
+
</div>
|
28
|
+
)
|
37
29
|
|
38
|
-
export default CircleChartDefault
|
30
|
+
export default CircleChartDefault
|
@@ -1,152 +1,122 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
|
3
|
-
import
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
2
|
+
|
3
|
+
import CircleChart from '../_circle_chart'
|
5
4
|
|
6
5
|
const dataFirst = [
|
7
6
|
{
|
8
7
|
name: 'Bugs',
|
9
|
-
|
8
|
+
value: 8,
|
10
9
|
},
|
11
10
|
{
|
12
11
|
name: 'Chores',
|
13
|
-
|
12
|
+
value: 1,
|
14
13
|
},
|
15
14
|
{
|
16
15
|
name: 'Stories',
|
17
|
-
|
16
|
+
value: 12,
|
18
17
|
},
|
19
18
|
]
|
20
19
|
|
21
20
|
const dataSecond = [
|
22
21
|
{
|
23
22
|
name: 'Queued',
|
24
|
-
|
23
|
+
value: 7,
|
25
24
|
},
|
26
25
|
{
|
27
26
|
name: 'In Progress',
|
28
|
-
|
27
|
+
value: 6,
|
29
28
|
},
|
30
29
|
{
|
31
30
|
name: 'Validation',
|
32
|
-
|
31
|
+
value: 3,
|
33
32
|
},
|
34
33
|
{
|
35
34
|
name: 'Done',
|
36
|
-
|
35
|
+
value: 6,
|
37
36
|
},
|
38
37
|
]
|
39
38
|
|
40
39
|
const dataThird = [
|
41
40
|
{
|
42
41
|
name: '1 Point Tickets',
|
43
|
-
|
42
|
+
value: 2,
|
44
43
|
},
|
45
44
|
{
|
46
45
|
name: '3 Point Tickets',
|
47
|
-
|
46
|
+
value: 5,
|
48
47
|
},
|
49
48
|
{
|
50
49
|
name: '5 Point Tickets',
|
51
|
-
|
50
|
+
value: 6,
|
52
51
|
},
|
53
52
|
{
|
54
53
|
name: '8 Point Tickets',
|
55
|
-
|
54
|
+
value: 3,
|
56
55
|
},
|
57
56
|
{
|
58
57
|
name: '13 Point Tickets',
|
59
|
-
|
58
|
+
value: 1,
|
60
59
|
},
|
61
60
|
]
|
62
|
-
|
63
61
|
const dataFourth = [
|
64
62
|
{
|
65
63
|
name: 'Facebook',
|
66
|
-
|
64
|
+
value: 2498,
|
67
65
|
},
|
68
66
|
{
|
69
67
|
name: 'YouTube',
|
70
|
-
|
68
|
+
value: 2000,
|
71
69
|
},
|
72
70
|
{
|
73
71
|
name: 'WhatsApp',
|
74
|
-
|
72
|
+
value: 2000,
|
75
73
|
},
|
76
74
|
{
|
77
75
|
name: 'Facebook Messenger',
|
78
|
-
|
76
|
+
value: 1300,
|
79
77
|
},
|
80
78
|
{
|
81
79
|
name: 'WeChat',
|
82
|
-
|
80
|
+
value: 1165,
|
83
81
|
},
|
84
82
|
{
|
85
83
|
name: 'Instagram',
|
86
|
-
|
84
|
+
value: 1000,
|
87
85
|
},
|
88
86
|
{
|
89
87
|
name: 'Tik Tok',
|
90
|
-
|
88
|
+
value: 800,
|
91
89
|
},
|
92
90
|
]
|
93
91
|
|
94
|
-
const CircleChartInnerSizes = () =>
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
const optionsSmall = Highcharts.merge({}, circleChartTheme, chartOptionsSmall)
|
124
|
-
const optionsMedium = Highcharts.merge({}, circleChartTheme, chartOptionsMedium)
|
125
|
-
const optionsLarge = Highcharts.merge({}, circleChartTheme, chartOptionsLarge)
|
126
|
-
const optionsNone = Highcharts.merge({}, circleChartTheme, chartOptionsNone)
|
127
|
-
|
128
|
-
return (
|
129
|
-
<div>
|
130
|
-
<HighchartsReact
|
131
|
-
highcharts={Highcharts}
|
132
|
-
options={optionsSmall}
|
133
|
-
/>
|
134
|
-
<HighchartsReact
|
135
|
-
highcharts={Highcharts}
|
136
|
-
options={optionsMedium}
|
137
|
-
/>
|
138
|
-
<HighchartsReact
|
139
|
-
highcharts={Highcharts}
|
140
|
-
options={optionsLarge}
|
141
|
-
/>
|
142
|
-
<div className="poop">
|
143
|
-
<HighchartsReact
|
144
|
-
highcharts={Highcharts}
|
145
|
-
options={optionsNone}
|
146
|
-
/>
|
147
|
-
</div>
|
148
|
-
</div>
|
149
|
-
)
|
150
|
-
}
|
92
|
+
const CircleChartInnerSizes = (props) => (
|
93
|
+
<div>
|
94
|
+
<CircleChart
|
95
|
+
chartData={dataFirst}
|
96
|
+
id="with-innersize-sm"
|
97
|
+
innerSize="sm"
|
98
|
+
{...props}
|
99
|
+
/>
|
100
|
+
<CircleChart
|
101
|
+
chartData={dataSecond}
|
102
|
+
id="with-innersize-md"
|
103
|
+
innerSize="md"
|
104
|
+
{...props}
|
105
|
+
/>
|
106
|
+
<CircleChart
|
107
|
+
chartData={dataThird}
|
108
|
+
id="with-innersize-lg"
|
109
|
+
innerSize="lg"
|
110
|
+
{...props}
|
111
|
+
/>
|
112
|
+
<CircleChart
|
113
|
+
chartData={dataFourth}
|
114
|
+
className="poop"
|
115
|
+
id="with-innersize-none "
|
116
|
+
innerSize="none"
|
117
|
+
{...props}
|
118
|
+
/>
|
119
|
+
</div>
|
120
|
+
)
|
151
121
|
|
152
|
-
export default CircleChartInnerSizes
|
122
|
+
export default CircleChartInnerSizes
|
@@ -1,142 +1,114 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
|
3
|
-
import
|
4
|
-
|
2
|
+
|
3
|
+
import CircleChart from '../_circle_chart'
|
4
|
+
|
5
5
|
import Title from '../../pb_title/_title'
|
6
6
|
|
7
|
-
const
|
7
|
+
const data = [
|
8
8
|
{
|
9
9
|
name: 'Waiting for Calls',
|
10
|
-
|
10
|
+
value: 41,
|
11
11
|
},
|
12
12
|
{
|
13
13
|
name: 'On Call',
|
14
|
-
|
14
|
+
value: 49,
|
15
15
|
},
|
16
16
|
{
|
17
17
|
name: 'After Call',
|
18
|
-
|
18
|
+
value: 10,
|
19
19
|
},
|
20
20
|
]
|
21
21
|
|
22
|
-
const
|
22
|
+
const dataFirst = [{
|
23
23
|
name: 'Bugs',
|
24
|
-
|
24
|
+
value: 8,
|
25
|
+
|
25
26
|
},
|
26
27
|
{
|
27
28
|
name: 'Chores',
|
28
|
-
|
29
|
+
value: 1,
|
30
|
+
|
29
31
|
},
|
30
32
|
{
|
31
33
|
name: 'Stories',
|
32
|
-
|
33
|
-
}
|
34
|
+
value: 12,
|
35
|
+
},
|
36
|
+
]
|
34
37
|
|
35
|
-
const
|
38
|
+
const dataSecond = [
|
36
39
|
{
|
37
40
|
name: 'Queued',
|
38
|
-
|
41
|
+
value: 7,
|
39
42
|
},
|
40
43
|
{
|
41
44
|
name: 'In Progress',
|
42
|
-
|
45
|
+
value: 6,
|
43
46
|
},
|
44
47
|
{
|
45
48
|
name: 'Validation',
|
46
|
-
|
49
|
+
value: 3,
|
47
50
|
},
|
48
51
|
{
|
49
52
|
name: 'Done',
|
50
|
-
|
53
|
+
value: 6,
|
51
54
|
},
|
52
55
|
]
|
53
56
|
|
54
|
-
const CircleChartLegendPosition = (props) => {
|
55
|
-
const chartOptionsFirst = {
|
56
|
-
title: { text: "Alignment of Legend" },
|
57
|
-
series: [{ data: dataFirst }],
|
58
|
-
legend: {
|
59
|
-
align: 'right',
|
60
|
-
verticalAlign: 'top'
|
61
|
-
},
|
62
|
-
plotOptions: {
|
63
|
-
pie: {
|
64
|
-
showInLegend: true
|
65
|
-
}
|
66
|
-
}
|
67
|
-
}
|
68
|
-
|
69
|
-
const chartOptionsSecond = {
|
70
|
-
title: { text: "Layout of Legend" },
|
71
|
-
series: [{ data: dataSecond }],
|
72
|
-
legend: {
|
73
|
-
layout: 'vertical'
|
74
|
-
},
|
75
|
-
plotOptions: {
|
76
|
-
pie: {
|
77
|
-
showInLegend: true
|
78
|
-
}
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
const chartOptionsThird = {
|
83
|
-
title: { text: "Offset of Legend" },
|
84
|
-
series: [{ data: dataThird }],
|
85
|
-
legend: {
|
86
|
-
layout: 'vertical',
|
87
|
-
x: 100,
|
88
|
-
y: 10
|
89
|
-
},
|
90
|
-
plotOptions: {
|
91
|
-
pie: {
|
92
|
-
showInLegend: true
|
93
|
-
}
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
|
-
const optionsFirst = Highcharts.merge({}, circleChartTheme, chartOptionsFirst)
|
98
|
-
const optionsSecond = Highcharts.merge({}, circleChartTheme, chartOptionsSecond)
|
99
|
-
const optionsThird = Highcharts.merge({}, circleChartTheme, chartOptionsThird)
|
100
57
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
}
|
58
|
+
const CircleChartLegendPosition = (props) => (
|
59
|
+
<div>
|
60
|
+
<Title
|
61
|
+
paddingBottom="sm"
|
62
|
+
paddingTop="sm"
|
63
|
+
size={4}
|
64
|
+
tag="h4"
|
65
|
+
text="align | verticalAlign"
|
66
|
+
/>
|
67
|
+
<CircleChart
|
68
|
+
align='right'
|
69
|
+
chartData={data}
|
70
|
+
id="legend-position-circle"
|
71
|
+
legend
|
72
|
+
paddingBottom="sm"
|
73
|
+
title="Alignment of Legend"
|
74
|
+
verticalAlign="top"
|
75
|
+
{...props}
|
76
|
+
/>
|
77
|
+
<Title
|
78
|
+
paddingBottom="sm"
|
79
|
+
paddingTop="sm"
|
80
|
+
size={4}
|
81
|
+
tag="h4"
|
82
|
+
text="layout"
|
83
|
+
/>
|
84
|
+
<CircleChart
|
85
|
+
chartData={dataFirst}
|
86
|
+
id="legend-position-circle-1"
|
87
|
+
layout="vertical"
|
88
|
+
legend
|
89
|
+
paddingBottom="sm"
|
90
|
+
paddingTop="sm"
|
91
|
+
title="Layout of Legend"
|
92
|
+
{...props}
|
93
|
+
/>
|
94
|
+
<Title
|
95
|
+
paddingBottom="sm"
|
96
|
+
paddingTop="sm"
|
97
|
+
size={4}
|
98
|
+
tag="h4"
|
99
|
+
text="x | y"
|
100
|
+
/>
|
101
|
+
<CircleChart
|
102
|
+
chartData={dataSecond}
|
103
|
+
id="legend-position-circle-2"
|
104
|
+
layout="vertical"
|
105
|
+
legend
|
106
|
+
title="Offset of Legend"
|
107
|
+
x={100}
|
108
|
+
y={10}
|
109
|
+
{...props}
|
110
|
+
/>
|
111
|
+
</div>
|
112
|
+
)
|
141
113
|
|
142
114
|
export default CircleChartLegendPosition
|
@@ -6,9 +6,12 @@
|
|
6
6
|
`x` **Type**: Number (defaults to 0)
|
7
7
|
`y` **Type**: Number (defaults to 0)
|
8
8
|
|
9
|
-
|
9
|
+
-
|
10
|
+
|
11
|
+
- `layout` determines the position of the legend items
|
10
12
|
`layout: proximate` will place the legend items as close as possible to the graphs they're representing. It will also determine whether to place the legend above/below or on the side of the plot area, if the legend is in a corner.
|
11
13
|
|
12
|
-
`x` offsets the legend relative to its horizontal
|
14
|
+
- `x` offsets the legend relative to its horizontal alignmnet. Negative x moves it to the left, positive x moves it to the right
|
15
|
+
|
13
16
|
|
14
|
-
`y` offsets the legend relative to its vertical
|
17
|
+
- `y` offsets the legend relative to its vertical alignmnet. Negative y moves it up, positive y moves it down.
|