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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76db03ead6e3e424b1d2b607fef50fee913d58fdbcb6a404fc75f05d5d1e0a9c
|
4
|
+
data.tar.gz: b2839d04fee219e071f0a9935e5bc3daf881eb46a815c499e44edc88a29ae8a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa4299336b6e87ce95e1d99a9cad0e8a2a2ec4fae296af27f6b5d832412b3e673103a0324365f31fa1035f4dcbaaa823f8f6c80f2d6b39ffef35bbca427f4f7
|
7
|
+
data.tar.gz: 51460484b334b4980e914e655132d52c964357e7c5b64d1561005755f52e4ee0832fd09cfc0359929358cf5b32e226b46a71f5dde47b139394e801454f2c19a7
|
@@ -12,22 +12,21 @@ examples:
|
|
12
12
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
13
13
|
- advanced_table_column_headers: Multi-Header Columns
|
14
14
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
15
|
+
- advanced_table_column_border_color_rails: Column Group Border Color
|
15
16
|
- advanced_table_no_subrows: Table with No Subrows or Expansion
|
16
17
|
- advanced_table_selectable_rows_rails: Selectable Rows
|
17
18
|
- advanced_table_selectable_rows_no_subrows_rails: Selectable Rows (No Subrows)
|
18
19
|
- advanced_table_selectable_rows_actions_rails: Selectable Rows (With Actions)
|
19
20
|
- advanced_table_selectable_rows_header_rails: Selectable Rows (No Actions Bar)
|
20
21
|
- advanced_table_scrollbar_none: Advanced Table Scrollbar None
|
21
|
-
- advanced_table_column_styling_rails: Column Styling
|
22
|
-
- advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
|
23
|
-
- advanced_table_column_border_color_rails: Column Group Border Color
|
24
|
-
|
22
|
+
# - advanced_table_column_styling_rails: Column Styling
|
23
|
+
# - advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
|
25
24
|
|
26
25
|
react:
|
27
26
|
- advanced_table_default: Default (Required Props)
|
27
|
+
- advanced_table_loading: Loading State
|
28
28
|
- advanced_table_sort: Enable Sorting
|
29
29
|
- advanced_table_sort_control: Sort Control
|
30
|
-
- advanced_table_custom_sort: Custom Sort
|
31
30
|
- advanced_table_expanded_control: Expanded Control
|
32
31
|
- advanced_table_expand_by_depth: Expand by Depth
|
33
32
|
- advanced_table_subrow_headers: SubRow Headers
|
@@ -38,31 +37,30 @@ examples:
|
|
38
37
|
- advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
|
39
38
|
- advanced_table_sticky_columns: Sticky Columns
|
40
39
|
- advanced_table_sticky_columns_and_header: Sticky Columns with Sticky Header
|
40
|
+
- advanced_table_inline_row_loading: Inline Row Loading
|
41
41
|
- advanced_table_responsive: Responsive Tables
|
42
42
|
- advanced_table_custom_cell: Custom Components for Cells
|
43
43
|
- advanced_table_with_custom_header: Custom Header Cell
|
44
44
|
- advanced_table_pagination: Pagination
|
45
45
|
- advanced_table_pagination_with_props: Pagination Props
|
46
|
-
- advanced_table_loading: Loading State
|
47
|
-
- advanced_table_inline_row_loading: Inline Row Loading
|
48
46
|
- advanced_table_column_headers: Multi-Header Columns
|
49
47
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
50
48
|
- advanced_table_column_headers_custom_cell: Multi-Header Columns with Custom Cells
|
49
|
+
- advanced_table_column_border_color: Column Group Border Color
|
51
50
|
- advanced_table_no_subrows: Table with No Subrows or Expansion
|
52
|
-
- advanced_table_pinned_rows: Pinned Rows
|
53
51
|
- advanced_table_selectable_rows: Selectable Rows
|
54
52
|
- advanced_table_selectable_rows_no_subrows_react: Selectable Rows (No Subrows)
|
55
53
|
- advanced_table_selectable_rows_actions: Selectable Rows (With Actions)
|
56
54
|
- advanced_table_selectable_rows_header: Selectable Rows (No Actions Bar)
|
57
55
|
- advanced_table_inline_editing: Inline Cell Editing
|
56
|
+
- advanced_table_fullscreen: Fullscreen
|
58
57
|
- advanced_table_column_visibility: Column Visibility Control
|
59
58
|
- advanced_table_column_visibility_with_state: Column Visibility Control With State
|
60
59
|
- advanced_table_column_visibility_custom: Column Visibility Control with Custom Dropdown
|
61
60
|
- advanced_table_column_visibility_multi: Column Visibility Control with Multi-Header Columns
|
61
|
+
- advanced_table_pinned_rows: Pinned Rows
|
62
62
|
- advanced_table_scrollbar_none: Advanced Table Scrollbar None
|
63
63
|
- advanced_table_row_styling: Row Styling
|
64
64
|
- advanced_table_column_styling: Column Styling
|
65
65
|
- advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
|
66
|
-
- advanced_table_column_border_color: Column Group Border Color
|
67
|
-
- advanced_table_fullscreen: Fullscreen
|
68
66
|
- advanced_table_infinite_scroll: Infinite Scroll
|
@@ -38,5 +38,4 @@ export { default as AdvancedTableRowStyling } from './_advanced_table_row_stylin
|
|
38
38
|
export { default as AdvancedTableColumnStyling } from './_advanced_table_column_styling.jsx'
|
39
39
|
export { default as AdvancedTableColumnStylingColumnHeaders } from './_advanced_table_column_styling_column_headers.jsx'
|
40
40
|
export { default as AdvancedTableInfiniteScroll} from './_advanced_table_infinite_scroll.jsx'
|
41
|
-
export {default as AdvancedTableWithCustomHeader} from './_advanced_table_with_custom_header.jsx'
|
42
|
-
export { default as AdvancedTableCustomSort } from './_advanced_table_custom_sort.jsx'
|
41
|
+
export {default as AdvancedTableWithCustomHeader} from './_advanced_table_with_custom_header.jsx'
|
@@ -1,10 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import colors from '../../tokens/exports/_colors.module.scss'
|
3
|
-
import barGraphTheme from '../barGraphTheme';
|
4
|
-
import Highcharts from "highcharts";
|
5
|
-
import HighchartsReact from "highcharts-react-official";
|
6
|
-
|
7
2
|
|
3
|
+
import BarGraph from '../_bar_graph'
|
8
4
|
|
9
5
|
const chartData = [{
|
10
6
|
name: 'Installation',
|
@@ -23,33 +19,19 @@ const chartData = [{
|
|
23
19
|
data: [1111, 677, 3245, 500, 200],
|
24
20
|
}]
|
25
21
|
|
26
|
-
const
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
}
|
41
|
-
|
42
|
-
const BarGraphColors = () => {
|
43
|
-
const options = Highcharts.merge({}, barGraphTheme, chartOptions)
|
44
|
-
|
45
|
-
return (
|
46
|
-
<div>
|
47
|
-
<HighchartsReact
|
48
|
-
highcharts={Highcharts}
|
49
|
-
options={options}
|
50
|
-
/>
|
51
|
-
</div>
|
52
|
-
)
|
53
|
-
}
|
22
|
+
const BarGraphColors = (props) => (
|
23
|
+
<div>
|
24
|
+
<BarGraph
|
25
|
+
axisTitle="Number of Employees"
|
26
|
+
chartData={chartData}
|
27
|
+
colors={['data-4', 'data-5', 'data-6', 'data-7', 'data-8']}
|
28
|
+
id="bar-colors"
|
29
|
+
title="Bar Graph with Custom Data Colors"
|
30
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
31
|
+
yAxisMin={0}
|
32
|
+
{...props}
|
33
|
+
/>
|
34
|
+
</div>
|
35
|
+
)
|
54
36
|
|
55
37
|
export default BarGraphColors
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import ReactDOMServer from 'react-dom/server'
|
3
|
+
import BarGraph from '../_bar_graph'
|
4
|
+
import Icon from '../../pb_icon/_icon'
|
5
|
+
|
6
|
+
const chartData = [
|
7
|
+
{
|
8
|
+
name: 'Role',
|
9
|
+
data: [0, 200, 300, 654, 656],
|
10
|
+
},
|
11
|
+
{
|
12
|
+
name: 'Company',
|
13
|
+
data: [150, 524, 320, 440, 500],
|
14
|
+
},
|
15
|
+
]
|
16
|
+
|
17
|
+
const renderIcon = (iconName, color) => {
|
18
|
+
return ReactDOMServer.renderToStaticMarkup(
|
19
|
+
<Icon
|
20
|
+
color={color}
|
21
|
+
icon={iconName}
|
22
|
+
/>)
|
23
|
+
};
|
24
|
+
|
25
|
+
const barGraphOptions = {
|
26
|
+
yAxis: {
|
27
|
+
tickInterval: 5,
|
28
|
+
},
|
29
|
+
xAxis: {
|
30
|
+
categories: ['1', '2', '3', '4', '5'],
|
31
|
+
labels: {
|
32
|
+
useHTML: true,
|
33
|
+
formatter: function () {
|
34
|
+
switch (this.value) {
|
35
|
+
case '1':
|
36
|
+
return `${renderIcon('frown', 'error')}`;
|
37
|
+
case '2':
|
38
|
+
return `${renderIcon('frown', 'warning')}`;
|
39
|
+
case '3':
|
40
|
+
return `${renderIcon('frown-open', 'neutral')}`;
|
41
|
+
case '4':
|
42
|
+
return `${renderIcon('smile', 'category_7')}`;
|
43
|
+
case '5':
|
44
|
+
return `${renderIcon('smile-beam', 'success')}`;
|
45
|
+
default:
|
46
|
+
return ''
|
47
|
+
}
|
48
|
+
},
|
49
|
+
style: {
|
50
|
+
fontSize: '1.4em',
|
51
|
+
},
|
52
|
+
y: 42,
|
53
|
+
},
|
54
|
+
},
|
55
|
+
legend: {
|
56
|
+
itemMarginTop: 62,
|
57
|
+
},
|
58
|
+
}
|
59
|
+
|
60
|
+
const BarGraphCustom = () => (
|
61
|
+
<div>
|
62
|
+
<BarGraph
|
63
|
+
chartData={chartData}
|
64
|
+
customOptions={barGraphOptions}
|
65
|
+
id="happiness-dashboard"
|
66
|
+
legend
|
67
|
+
title="Bar Graph with Custom Overrides"
|
68
|
+
/>
|
69
|
+
</div>
|
70
|
+
)
|
71
|
+
|
72
|
+
export default BarGraphCustom
|
@@ -0,0 +1,6 @@
|
|
1
|
+
The `customOptions` prop provides comprehensive access to additional [Highcharts options](https://api.highcharts.com/highcharts/) that are not explicitly defined as props.
|
2
|
+
It's important to note that certain options may require specific script imports to function properly.
|
3
|
+
|
4
|
+
Note: If you are having trouble getting any Highcharts options to work, please match the formatting of our [staticOptions](https://github.com/powerhome/playbook/blob/master/playbook/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx#L85-L141). For example, `yAxis` will need to be wrapped with square brackets.
|
5
|
+
|
6
|
+
You may also need to override any of the [defaults](https://github.com/powerhome/playbook/blob/master/playbook/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx#L45-L73) in order to get that options to work.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import barGraphTheme from '../barGraphTheme';
|
3
|
-
import Highcharts from "highcharts";
|
4
|
-
import HighchartsReact from "highcharts-react-official";
|
5
2
|
|
3
|
+
import BarGraph from '../_bar_graph'
|
6
4
|
|
7
5
|
const chartData = [{
|
8
6
|
name: 'Installation',
|
@@ -21,35 +19,19 @@ const chartData = [{
|
|
21
19
|
data: [1111, 677, 3245, 500, 200],
|
22
20
|
}]
|
23
21
|
|
24
|
-
const
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
},
|
39
|
-
},
|
40
|
-
}
|
41
|
-
|
42
|
-
const BarGraphDefault = () => {
|
43
|
-
const options = Highcharts.merge({}, barGraphTheme, chartOptions)
|
44
|
-
|
45
|
-
return (
|
46
|
-
<div>
|
47
|
-
<HighchartsReact
|
48
|
-
highcharts={Highcharts}
|
49
|
-
options={options}
|
50
|
-
/>
|
51
|
-
</div>
|
52
|
-
)
|
53
|
-
}
|
22
|
+
const BarGraphDefault = (props) => (
|
23
|
+
<div>
|
24
|
+
<BarGraph
|
25
|
+
axisTitle="Number of Employees"
|
26
|
+
chartData={chartData}
|
27
|
+
id="bar-default"
|
28
|
+
subTitle="Source: thesolarfoundation.com"
|
29
|
+
title="Solar Employment Growth by Sector, 2010-2016"
|
30
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
31
|
+
yAxisMin={0}
|
32
|
+
{...props}
|
33
|
+
/>
|
34
|
+
</div>
|
35
|
+
)
|
54
36
|
|
55
37
|
export default BarGraphDefault
|
@@ -1,69 +1,39 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import barGraphTheme from '../barGraphTheme';
|
3
|
-
import Highcharts from "highcharts";
|
4
|
-
import HighchartsReact from "highcharts-react-official";
|
5
2
|
|
3
|
+
import BarGraph from '../_bar_graph'
|
6
4
|
|
7
5
|
const chartData = [{
|
8
6
|
name: 'Number of Installations',
|
9
7
|
data: [1475, 200, 3000, 654, 656],
|
10
8
|
}]
|
11
9
|
|
12
|
-
const
|
13
|
-
chart: {
|
14
|
-
height: "300"
|
15
|
-
},
|
16
|
-
series: chartData,
|
17
|
-
title: {
|
18
|
-
text: "Fixed Height (300px)",
|
19
|
-
},
|
20
|
-
xAxis: {
|
21
|
-
categories: ["Jan", "Feb", "Mar", "Apr", "May"],
|
22
|
-
},
|
23
|
-
yAxis: {
|
24
|
-
title: {
|
25
|
-
text: "Number of Employees",
|
26
|
-
},
|
27
|
-
},
|
28
|
-
};
|
29
|
-
|
30
|
-
const percentageHeightChartOptions = {
|
31
|
-
chart: {
|
32
|
-
height: "50%"
|
33
|
-
},
|
34
|
-
series: chartData,
|
35
|
-
title: {
|
36
|
-
text: "Percentage Height (50%)",
|
37
|
-
},
|
38
|
-
xAxis: {
|
39
|
-
categories: ["Jan", "Feb", "Mar", "Apr", "May"],
|
40
|
-
},
|
41
|
-
yAxis: {
|
42
|
-
title: {
|
43
|
-
text: "Number of Employees",
|
44
|
-
},
|
45
|
-
},
|
46
|
-
};
|
47
|
-
|
48
|
-
const pixelOptions = Highcharts.merge({}, barGraphTheme, pixelHeightChartOptions)
|
49
|
-
|
50
|
-
const percentageOptions = Highcharts.merge({}, barGraphTheme, percentageHeightChartOptions)
|
51
|
-
|
52
|
-
const BarGraphHeight = () => (
|
10
|
+
const BarGraphDefault = (props) => (
|
53
11
|
<div>
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
12
|
+
<BarGraph
|
13
|
+
axisTitle="Number of Employees"
|
14
|
+
chartData={chartData}
|
15
|
+
height="300"
|
16
|
+
id="bar-fixed-height"
|
17
|
+
title="Fixed Height (300px)"
|
18
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
|
19
|
+
yAxisMin={0}
|
20
|
+
{...props}
|
21
|
+
/>
|
58
22
|
|
59
23
|
<br />
|
60
24
|
<br />
|
61
25
|
|
62
|
-
<
|
63
|
-
|
64
|
-
|
26
|
+
<BarGraph
|
27
|
+
axisTitle="Number of Employees"
|
28
|
+
chartData={chartData}
|
29
|
+
height="50%"
|
30
|
+
id="bar-percentage-height"
|
31
|
+
title="Percentage Height (50%)"
|
32
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
|
33
|
+
yAxisMin={0}
|
34
|
+
{...props}
|
65
35
|
/>
|
66
36
|
</div>
|
67
37
|
)
|
68
38
|
|
69
|
-
export default
|
39
|
+
export default BarGraphDefault
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import barGraphTheme from '../barGraphTheme';
|
3
|
-
import Highcharts from "highcharts";
|
4
|
-
import HighchartsReact from "highcharts-react-official";
|
5
2
|
|
3
|
+
import BarGraph from '../_bar_graph'
|
6
4
|
|
7
|
-
|
5
|
+
|
6
|
+
const barGraphOptions = {
|
8
7
|
chart: {
|
9
8
|
type: 'bar'
|
10
9
|
},
|
@@ -23,8 +22,13 @@ const chartOptions = {
|
|
23
22
|
lineWidth: 0
|
24
23
|
},
|
25
24
|
yAxis: {
|
25
|
+
min: 0,
|
26
26
|
title: {
|
27
|
-
text: '',
|
27
|
+
text: 'Population (millions)',
|
28
|
+
align: 'high'
|
29
|
+
},
|
30
|
+
labels: {
|
31
|
+
overflow: 'justify'
|
28
32
|
},
|
29
33
|
},
|
30
34
|
tooltip: {
|
@@ -47,16 +51,16 @@ const chartOptions = {
|
|
47
51
|
}, {
|
48
52
|
name: 'Year 2018',
|
49
53
|
data: [1276, 1007, 4561, 746]
|
50
|
-
}]
|
54
|
+
}]
|
51
55
|
}
|
52
56
|
|
53
|
-
const
|
54
|
-
|
55
|
-
const BarGraphHorizontal = () => (
|
57
|
+
const BarGraphHorizontal = (props) => (
|
56
58
|
<div>
|
57
|
-
<
|
58
|
-
|
59
|
-
|
59
|
+
<BarGraph
|
60
|
+
customOptions={barGraphOptions}
|
61
|
+
id="bar-horizontal"
|
62
|
+
yAxisMin={0}
|
63
|
+
{...props}
|
60
64
|
/>
|
61
65
|
</div>
|
62
66
|
)
|
@@ -1,40 +1,24 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import
|
3
|
-
import Highcharts from "highcharts";
|
4
|
-
import HighchartsReact from "highcharts-react-official";
|
5
|
-
|
2
|
+
import BarGraph from "../../pb_bar_graph/_bar_graph"
|
6
3
|
|
7
4
|
const chartData = [{
|
8
5
|
name: 'Number of Installations',
|
9
6
|
data: [1475, 200, 3000, 654, 656],
|
10
7
|
}]
|
11
8
|
|
12
|
-
const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
}
|
9
|
+
const BarGraphLegend = (props) => (
|
10
|
+
<div>
|
11
|
+
<BarGraph
|
12
|
+
axisTitle="Number of Employees"
|
13
|
+
chartData={chartData}
|
14
|
+
id="bar-test-2"
|
15
|
+
legend
|
16
|
+
title="Bar Graph with Legend"
|
17
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
18
|
+
yAxisMin={0}
|
19
|
+
{...props}
|
20
|
+
/>
|
21
|
+
</div>
|
22
|
+
)
|
27
23
|
|
28
|
-
const BarGraphLegend = () => {
|
29
|
-
const options = Highcharts.merge({}, barGraphTheme, chartOptions)
|
30
|
-
|
31
|
-
return (
|
32
|
-
<div>
|
33
|
-
<HighchartsReact
|
34
|
-
highcharts={Highcharts}
|
35
|
-
options={options}
|
36
|
-
/>
|
37
|
-
</div>
|
38
|
-
)
|
39
|
-
}
|
40
24
|
export default BarGraphLegend
|
@@ -1,48 +1,25 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import
|
3
|
-
import Highcharts from "highcharts";
|
4
|
-
import HighchartsReact from "highcharts-react-official";
|
5
|
-
|
2
|
+
import BarGraph from "../../pb_bar_graph/_bar_graph"
|
6
3
|
|
7
4
|
const chartData = [{
|
8
5
|
name: 'Number of Installations',
|
9
6
|
data: [1475, 200, 3000, 654, 656],
|
10
7
|
}]
|
11
8
|
|
12
|
-
const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
itemClick: function () {
|
28
|
-
return false;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
},
|
32
|
-
series: chartData
|
33
|
-
}
|
34
|
-
|
35
|
-
const BarGraphLegendNonClickable = () => {
|
36
|
-
const options = Highcharts.merge({}, barGraphTheme, chartOptions)
|
37
|
-
|
38
|
-
return (
|
39
|
-
<div>
|
40
|
-
<HighchartsReact
|
41
|
-
highcharts={Highcharts}
|
42
|
-
options={options}
|
43
|
-
/>
|
44
|
-
</div>
|
45
|
-
)
|
46
|
-
}
|
9
|
+
const BarGraphLegendNonClickable = (props) => (
|
10
|
+
<div>
|
11
|
+
<BarGraph
|
12
|
+
axisTitle="Number of Employees"
|
13
|
+
chartData={chartData}
|
14
|
+
id="bar-test-3"
|
15
|
+
legend
|
16
|
+
title="Bar Graph with Legend Non Clickable"
|
17
|
+
toggleLegendClick={false}
|
18
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
19
|
+
yAxisMin={0}
|
20
|
+
{...props}
|
21
|
+
/>
|
22
|
+
</div>
|
23
|
+
)
|
47
24
|
|
48
25
|
export default BarGraphLegendNonClickable
|