playbook_ui_docs 14.23.0.pre.alpha.PLAY2205atborderbug9085 → 14.23.0.pre.alpha.PLAY2243customindeterminatemaincheckboxlabels9046
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/_advanced_table_with_custom_header.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +1 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +2 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +1 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +17 -36
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +16 -31
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +31 -63
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +16 -35
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +16 -41
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +62 -107
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +7 -4
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +6 -13
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.html.erb +0 -46
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +0 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb +0 -51
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.md +0 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.html.erb +0 -10
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.jsx +0 -26
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.md +0 -3
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_row_styling_react.md → _advanced_table_row_styling.md} +0 -0
- /data/app/pb_kits/playbook/pb_line_graph/docs/{_line_graph_colors_rails.md → _line_graph_colors.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6aa9a9f4c66a252c47c0366fa4b9780e1766b5e74f7f76299e18126da982cf3
|
4
|
+
data.tar.gz: 3a87005bb49c7c0f2b780f175b9552ef28333e467283cc6823c7ba4c505ba5d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3647332acd0b50048838885b07e3062d2d4b94705c42b2c451d0eeebc6d9d50038e2fbcafeed2b36ae4b13310b4a62da6c1106488299837ab3f89aa9c96c37d2
|
7
|
+
data.tar.gz: d8d3bb26410bb016ac9890abe3c044046db362cc56c5e5a40d4a1825860d9e770867c56fadb3e221301eb4f92b2344c5fea6936c17fd5f1ff32e0a67fdc33555
|
@@ -1 +1 @@
|
|
1
|
-
The optional `header` key/value pair can be used within `columnDefinitions` to render a custom header. This example shows an Icon and Tooltip being used but other kits can be used as well.
|
1
|
+
The optional `header` key/value pair can be used within `columnDefinitions` to render a custom header. This example shows an Icon and Tooltip being used but other kits can be used as well.
|
@@ -10,7 +10,6 @@ examples:
|
|
10
10
|
- advanced_table_beta_sort: Enable Sorting
|
11
11
|
- advanced_table_responsive: Responsive Tables
|
12
12
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
13
|
-
- advanced_table_with_custom_header_rails: Custom Header Cell
|
14
13
|
- advanced_table_column_headers: Multi-Header Columns
|
15
14
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
16
15
|
- advanced_table_no_subrows: Table with No Subrows or Expansion
|
@@ -19,7 +18,6 @@ examples:
|
|
19
18
|
- advanced_table_selectable_rows_actions_rails: Selectable Rows (With Actions)
|
20
19
|
- advanced_table_selectable_rows_header_rails: Selectable Rows (No Actions Bar)
|
21
20
|
- advanced_table_scrollbar_none: Advanced Table Scrollbar None
|
22
|
-
- advanced_table_row_styling: Row Styling
|
23
21
|
- advanced_table_column_styling_rails: Column Styling
|
24
22
|
- advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
|
25
23
|
- advanced_table_column_border_color_rails: Column Group Border Color
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##### Prop
|
2
2
|
|
3
3
|
`align` **Type**: String | **Values**: left | center | right (defaults to center)
|
4
|
-
`verticalAlign` **Type**: String | **Values**: top | middle | bottom (defaults
|
4
|
+
`verticalAlign` **Type**: String | **Values**: top | middle | bottom (defaults middle)
|
5
5
|
`layout` **Type**: String | **Values**: horizontal | vertical | proximate (defaults to horizontal)
|
6
6
|
`x` **Type**: Number (defaults to 0)
|
7
7
|
`y` **Type**: Number (defaults to 0)
|
@@ -9,10 +9,10 @@
|
|
9
9
|
<tr>
|
10
10
|
<th>
|
11
11
|
<%= pb_rails("checkbox", props: {
|
12
|
-
text: "Uncheck All",
|
13
12
|
value: "checkbox-value",
|
14
13
|
name: "main-checkbox",
|
15
14
|
indeterminate_main: true,
|
15
|
+
indeterminate_main_labels: ["Check All Ice Cream", "Uncheck All Ice Cream"],
|
16
16
|
id: "indeterminate-checkbox"
|
17
17
|
}) %>
|
18
18
|
</th>
|
@@ -1 +1,2 @@
|
|
1
|
-
If you want to use indeterminate, "check/uncheck all" checkboxes, add `indeterminate_main: true` and an `id` to the main checkbox. Then, add an `indeterminate_parent` prop with the main checkbox's `id` to the children checkboxes.
|
1
|
+
If you want to use indeterminate, "check/uncheck all" checkboxes, add `indeterminate_main: true` and an `id` to the main checkbox. Then, add an `indeterminate_parent` prop with the main checkbox's `id` to the children checkboxes.
|
2
|
+
If you want to customize the main checkbox labels, set an array `indeterminate_main_labels` with "Check All" and "Uncheck All" labels.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##### Prop
|
2
2
|
|
3
3
|
`align` **Type**: String | **Values**: left | center | right (defaults to center)
|
4
|
-
`verticalAlign` **Type**: String | **Values**: top | middle | bottom (defaults
|
4
|
+
`verticalAlign` **Type**: String | **Values**: top | middle | bottom (defaults middle)
|
5
5
|
`layout` **Type**: String | **Values**: horizontal | vertical | proximate (defaults to horizontal)
|
6
6
|
`x` **Type**: Number (defaults to 0)
|
7
7
|
`y` **Type**: Number (defaults to 0)
|
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
Line graphs are used to show changes in data over time. The default height of line graph is 400px and can be changed. The default height is in pixel units, but can also use percentage string (percentage would be that of the width. For example, `height:"50%"` would mean that the height is 50% of the width). This allows for preserving the aspect ratio across responsive sizes.
|
2
|
+
|
3
|
+
For more information, see: <a href="https://api.highcharts.com/highcharts/chart.height" target="_blank"> highcharts/chart.height</a>.
|
@@ -1,8 +1,6 @@
|
|
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 LineGraph from '../_line_graph'
|
6
4
|
|
7
5
|
const data = [{
|
8
6
|
name: 'Installation',
|
@@ -21,36 +19,19 @@ const data = [{
|
|
21
19
|
data: [null, null, null, 3112, 4989, 5816, 15274, 18111],
|
22
20
|
}]
|
23
21
|
|
24
|
-
const
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
},
|
39
|
-
},
|
40
|
-
series: data,
|
41
|
-
colors: [colors.data_4, colors.data_5, "#144075", colors.data_7, colors.data_8]
|
42
|
-
}
|
43
|
-
|
44
|
-
const options = Highcharts.merge({}, lineGraphTheme, chartOptions)
|
45
|
-
|
46
|
-
return (
|
47
|
-
<div>
|
48
|
-
<HighchartsReact
|
49
|
-
highcharts={Highcharts}
|
50
|
-
options={options}
|
51
|
-
/>
|
52
|
-
</div>
|
53
|
-
)
|
54
|
-
}
|
22
|
+
const LineGraphColors = (props) => (
|
23
|
+
<div>
|
24
|
+
<LineGraph
|
25
|
+
axisTitle="Number of Employees"
|
26
|
+
chartData={data}
|
27
|
+
colors={['data-4', 'data-5', 'data-6', 'data-7', 'data-8']}
|
28
|
+
id="line-colors"
|
29
|
+
title="Line Graph with Custom Data Colors"
|
30
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
|
31
|
+
yAxisMin={0}
|
32
|
+
{...props}
|
33
|
+
/>
|
34
|
+
</div>
|
35
|
+
)
|
55
36
|
|
56
|
-
export default LineGraphColors
|
37
|
+
export default LineGraphColors
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
|
3
|
-
import
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
2
|
+
|
3
|
+
import LineGraph from '../_line_graph'
|
5
4
|
|
6
5
|
const data = [{
|
7
6
|
name: 'Installation',
|
@@ -20,33 +19,19 @@ const data = [{
|
|
20
19
|
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
|
21
20
|
}]
|
22
21
|
|
23
|
-
const
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
}
|
38
|
-
|
39
|
-
const LineGraphDefault = () => {
|
40
|
-
const options = Highcharts.merge({}, lineGraphTheme, chartOptions)
|
41
|
-
|
42
|
-
return(
|
43
|
-
<div>
|
44
|
-
<HighchartsReact
|
45
|
-
highcharts={Highcharts}
|
46
|
-
options={options}
|
47
|
-
/>
|
48
|
-
</div>
|
49
|
-
)
|
50
|
-
}
|
22
|
+
const LineGraphDefault = (props) => (
|
23
|
+
<div>
|
24
|
+
<LineGraph
|
25
|
+
axisTitle="Number of Employees"
|
26
|
+
chartData={data}
|
27
|
+
id="line-default"
|
28
|
+
subTitle="Source: thesolarfoundation.com"
|
29
|
+
title="Solar Employment Growth by Sector, 2010-2016"
|
30
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
|
31
|
+
yAxisMin={0}
|
32
|
+
{...props}
|
33
|
+
/>
|
34
|
+
</div>
|
35
|
+
)
|
51
36
|
|
52
37
|
export default LineGraphDefault
|
@@ -1,70 +1,38 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import
|
3
|
-
import Highcharts from "highcharts"
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
2
|
+
import LineGraph from '../_line_graph'
|
5
3
|
|
6
4
|
const data = [{
|
7
5
|
name: 'Number of Installations',
|
8
6
|
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
|
9
7
|
}]
|
10
8
|
|
11
|
-
const
|
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
|
-
categories: categories,
|
42
|
-
},
|
43
|
-
yAxis: {
|
44
|
-
min: 0,
|
45
|
-
title: {
|
46
|
-
text: 'Number of Employees',
|
47
|
-
},
|
48
|
-
},
|
49
|
-
series: data
|
50
|
-
}
|
51
|
-
|
52
|
-
const optionsFirst = Highcharts.merge({}, lineGraphTheme, chartOptionsFirst)
|
53
|
-
const optionsSecond = Highcharts.merge({}, lineGraphTheme, chartOptionsSecond)
|
54
|
-
|
55
|
-
return (
|
56
|
-
<div>
|
57
|
-
<HighchartsReact
|
58
|
-
highcharts={Highcharts}
|
59
|
-
options={optionsFirst}
|
60
|
-
/>
|
61
|
-
|
62
|
-
<HighchartsReact
|
63
|
-
highcharts={Highcharts}
|
64
|
-
options={optionsSecond}
|
65
|
-
/>
|
66
|
-
</div>
|
67
|
-
)
|
68
|
-
}
|
69
|
-
|
70
|
-
export default LineGraphHeight
|
9
|
+
const LineGraphDefault = (props) => (
|
10
|
+
<div>
|
11
|
+
<LineGraph
|
12
|
+
axisTitle="Number of Employees"
|
13
|
+
chartData={data}
|
14
|
+
height="300px"
|
15
|
+
id="line-fixed-height"
|
16
|
+
title="Fixed Height (300px)"
|
17
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
|
18
|
+
yAxisMin={0}
|
19
|
+
{...props}
|
20
|
+
/>
|
21
|
+
|
22
|
+
<br />
|
23
|
+
<br />
|
24
|
+
|
25
|
+
<LineGraph
|
26
|
+
axisTitle="Number of Employees"
|
27
|
+
chartData={data}
|
28
|
+
height="50%"
|
29
|
+
id="line-percentage-height"
|
30
|
+
title="Percentage Height (50%)"
|
31
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
|
32
|
+
yAxisMin={0}
|
33
|
+
{...props}
|
34
|
+
/>
|
35
|
+
</div>
|
36
|
+
)
|
37
|
+
|
38
|
+
export default LineGraphDefault
|
@@ -1,43 +1,24 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import
|
3
|
-
import Highcharts from "highcharts"
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
2
|
+
import LineGraph from '../../pb_line_graph/_line_graph'
|
5
3
|
|
6
4
|
const data = [{
|
7
5
|
name: 'Number of Installations',
|
8
6
|
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
|
9
7
|
}]
|
10
8
|
|
11
|
-
const
|
9
|
+
const LineGraphLegend = (props) => (
|
10
|
+
<div>
|
11
|
+
<LineGraph
|
12
|
+
axisTitle="Number of Employees"
|
13
|
+
chartData={data}
|
14
|
+
id="line-test-2"
|
15
|
+
legend
|
16
|
+
title="Line Graph with Legend"
|
17
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']}
|
18
|
+
yAxisMin={0}
|
19
|
+
{...props}
|
20
|
+
/>
|
21
|
+
</div>
|
22
|
+
)
|
12
23
|
|
13
|
-
|
14
|
-
series: data,
|
15
|
-
title: { text: "Line Graph with Legend" },
|
16
|
-
xAxis: {
|
17
|
-
categories: categories,
|
18
|
-
},
|
19
|
-
yAxis: {
|
20
|
-
min: 0,
|
21
|
-
title: {
|
22
|
-
text: "Number of Employees",
|
23
|
-
},
|
24
|
-
},
|
25
|
-
legend: {
|
26
|
-
enabled: true,
|
27
|
-
},
|
28
|
-
}
|
29
|
-
|
30
|
-
const LineGraphLegend = () => {
|
31
|
-
const options = Highcharts.merge({}, lineGraphTheme, chartOptions)
|
32
|
-
|
33
|
-
return(
|
34
|
-
<div>
|
35
|
-
<HighchartsReact
|
36
|
-
highcharts={Highcharts}
|
37
|
-
options={options}
|
38
|
-
/>
|
39
|
-
</div>
|
40
|
-
)
|
41
|
-
}
|
42
|
-
|
43
|
-
export default LineGraphLegend
|
24
|
+
export default LineGraphLegend
|
@@ -1,49 +1,24 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import
|
3
|
-
import Highcharts from "highcharts"
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
2
|
+
import LineGraph from '../../pb_line_graph/_line_graph'
|
5
3
|
|
6
4
|
const data = [{
|
7
5
|
name: 'Number of Installations',
|
8
6
|
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
|
9
7
|
}]
|
10
8
|
|
11
|
-
const
|
9
|
+
const LineGraphLegendNonclickable = (props) => (
|
10
|
+
<div>
|
11
|
+
<LineGraph
|
12
|
+
axisTitle="Number of Employees"
|
13
|
+
chartData={data}
|
14
|
+
id="line-test-3"
|
15
|
+
legend
|
16
|
+
title="Line Graph with Legend Non Clickable"
|
17
|
+
toggleLegendClick={false}
|
18
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']}
|
19
|
+
{...props}
|
20
|
+
/>
|
21
|
+
</div>
|
22
|
+
)
|
12
23
|
|
13
|
-
|
14
|
-
title: {
|
15
|
-
text: 'Line Graph with Legend Non Clickable',
|
16
|
-
},
|
17
|
-
xAxis: {
|
18
|
-
categories: categories,
|
19
|
-
},
|
20
|
-
yAxis: {
|
21
|
-
title: {
|
22
|
-
text: 'Number of Employees',
|
23
|
-
},
|
24
|
-
},
|
25
|
-
legend: {
|
26
|
-
enabled: true,
|
27
|
-
events: {
|
28
|
-
itemClick: function () {
|
29
|
-
return false;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
},
|
33
|
-
series: data
|
34
|
-
}
|
35
|
-
|
36
|
-
const LineGraphLegendNonclickable = () => {
|
37
|
-
const options = Highcharts.merge({}, lineGraphTheme, chartOptions)
|
38
|
-
|
39
|
-
return (
|
40
|
-
<div>
|
41
|
-
<HighchartsReact
|
42
|
-
highcharts={Highcharts}
|
43
|
-
options={options}
|
44
|
-
/>
|
45
|
-
</div>
|
46
|
-
)
|
47
|
-
}
|
48
|
-
|
49
|
-
export default LineGraphLegendNonclickable
|
24
|
+
export default LineGraphLegendNonclickable
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import
|
3
|
-
import Highcharts from "highcharts"
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
2
|
+
import LineGraph from '../../pb_line_graph/_line_graph'
|
5
3
|
import Title from '../../pb_title/_title'
|
6
4
|
|
7
5
|
const data = [{
|
@@ -21,109 +19,66 @@ const data = [{
|
|
21
19
|
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
|
22
20
|
}]
|
23
21
|
|
24
|
-
const
|
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
|
-
const optionsSecond = Highcharts.merge({}, lineGraphTheme, chartOptionsSecond)
|
86
|
-
const optionsThird = Highcharts.merge({}, lineGraphTheme, chartOptionsThird)
|
87
|
-
|
88
|
-
return (
|
89
|
-
<div>
|
90
|
-
<Title
|
91
|
-
paddingY="sm"
|
92
|
-
size={4}
|
93
|
-
tag="h4"
|
94
|
-
text="align | verticalAlign"
|
95
|
-
{...props}
|
96
|
-
/>
|
97
|
-
<HighchartsReact
|
98
|
-
highcharts={Highcharts}
|
99
|
-
options={optionsFirst}
|
100
|
-
/>
|
101
|
-
|
102
|
-
<Title
|
103
|
-
paddingY="sm"
|
104
|
-
size={4}
|
105
|
-
tag="h4"
|
106
|
-
text="layout"
|
107
|
-
{...props}
|
108
|
-
/>
|
109
|
-
<HighchartsReact
|
110
|
-
highcharts={Highcharts}
|
111
|
-
options={optionsSecond}
|
112
|
-
/>
|
113
|
-
|
114
|
-
<Title
|
115
|
-
paddingY="sm"
|
116
|
-
size={4}
|
117
|
-
tag="h4"
|
118
|
-
text="x | y"
|
119
|
-
{...props}
|
120
|
-
/>
|
121
|
-
<HighchartsReact
|
122
|
-
highcharts={Highcharts}
|
123
|
-
options={optionsThird}
|
124
|
-
/>
|
125
|
-
</div>
|
126
|
-
)
|
127
|
-
}
|
22
|
+
const LineGraphLegendPosition = (props) => (
|
23
|
+
<div>
|
24
|
+
<Title
|
25
|
+
paddingBottom="sm"
|
26
|
+
paddingTop="sm"
|
27
|
+
size={4}
|
28
|
+
tag="h4"
|
29
|
+
text="align | verticalAlign"
|
30
|
+
/>
|
31
|
+
<LineGraph
|
32
|
+
align='right'
|
33
|
+
axisTitle="Number of Employees"
|
34
|
+
chartData={data}
|
35
|
+
id="legend-position-line"
|
36
|
+
legend
|
37
|
+
title="Alignment of Legend"
|
38
|
+
verticalAlign="top"
|
39
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']}
|
40
|
+
yAxisMin={0}
|
41
|
+
{...props}
|
42
|
+
/>
|
43
|
+
<Title
|
44
|
+
paddingBottom="sm"
|
45
|
+
paddingTop="sm"
|
46
|
+
size={4}
|
47
|
+
tag="h4"
|
48
|
+
text="layout"
|
49
|
+
/>
|
50
|
+
<LineGraph
|
51
|
+
axisTitle="Number of Employees"
|
52
|
+
chartData={data}
|
53
|
+
id="legend-position-line-1"
|
54
|
+
layout="vertical"
|
55
|
+
legend
|
56
|
+
title="Layout of Legend"
|
57
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']}
|
58
|
+
yAxisMin={0}
|
59
|
+
{...props}
|
60
|
+
/>
|
61
|
+
<Title
|
62
|
+
paddingBottom="sm"
|
63
|
+
paddingTop="sm"
|
64
|
+
size={4}
|
65
|
+
tag="h4"
|
66
|
+
text="x | y"
|
67
|
+
/>
|
68
|
+
<LineGraph
|
69
|
+
axisTitle="Number of Employees"
|
70
|
+
chartData={data}
|
71
|
+
id="legend-position-line-2"
|
72
|
+
layout="vertical"
|
73
|
+
legend
|
74
|
+
title="Offset of Legend"
|
75
|
+
x={100}
|
76
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']}
|
77
|
+
y={10}
|
78
|
+
yAxisMin={0}
|
79
|
+
{...props}
|
80
|
+
/>
|
81
|
+
</div>
|
82
|
+
)
|
128
83
|
|
129
84
|
export default LineGraphLegendPosition
|
@@ -1,14 +1,17 @@
|
|
1
1
|
##### Prop
|
2
2
|
|
3
3
|
`align` **Type**: String | **Values**: left | center | right (defaults to center)
|
4
|
-
`verticalAlign` **Type**: String | **Values**: top | middle | bottom (defaults
|
4
|
+
`verticalAlign` **Type**: String | **Values**: top | middle | bottom (defaults middle)
|
5
5
|
`layout` **Type**: String | **Values**: horizontal | vertical | proximate (defaults to horizontal)
|
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.
|