playbook_ui_docs 15.8.0.pre.rc.1 → 16.0.0.pre.alpha.fixiconsvgdataattrspropagation13513
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_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.html.erb +135 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.jsx +147 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +6 -1
- metadata +5 -113
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +0 -55
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +0 -42
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +0 -55
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +0 -69
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +0 -58
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +0 -64
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +0 -14
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +0 -40
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.html.erb +0 -15
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +0 -48
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +0 -62
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +0 -136
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +0 -17
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +0 -23
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +0 -52
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -86
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb +0 -20
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +0 -46
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +0 -22
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +0 -55
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -28
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +0 -26
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +0 -88
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +0 -20
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +0 -44
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md +0 -2
- 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/_circle_chart_custom_tooltip.html.erb +0 -20
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +0 -43
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +0 -5
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +0 -19
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +0 -38
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +0 -136
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +0 -152
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +0 -86
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +0 -142
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +0 -14
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +0 -63
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +0 -22
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +0 -45
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +0 -37
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +0 -61
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +0 -22
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +0 -41
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +0 -38
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +0 -55
- data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -26
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_gauge/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb +0 -12
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +0 -36
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_rails.md +0 -2
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +0 -2
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +0 -32
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +0 -146
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_rails.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +0 -11
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +0 -30
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +0 -12
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +0 -36
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +0 -14
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +0 -49
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +0 -15
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +0 -62
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +0 -76
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +0 -15
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +0 -54
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +0 -27
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +0 -80
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +0 -2
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +0 -14
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +0 -38
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +0 -29
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +0 -72
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -27
- data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb +0 -26
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +0 -56
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md +0 -2
- 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_default.html.erb +0 -26
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +0 -52
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +0 -26
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -70
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +0 -15
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +0 -43
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb +0 -16
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +0 -49
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +0 -62
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +0 -129
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +0 -14
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -18
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -6
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import barGraphTheme from '../barGraphTheme';
|
|
3
|
-
import Highcharts from "highcharts";
|
|
4
|
-
import HighchartsReact from "highcharts-react-official";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const chartData = [{
|
|
8
|
-
name: 'Installation',
|
|
9
|
-
data: [-475, 400, -1000, 354, -856],
|
|
10
|
-
threshold: 0
|
|
11
|
-
}, {
|
|
12
|
-
name: 'Manufacturing',
|
|
13
|
-
data: [1475, 200, 1000, 654, -656],
|
|
14
|
-
threshold: 0
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: 'Sales & Distribution',
|
|
18
|
-
data: [1270, 100, -1200, 554, 756],
|
|
19
|
-
threshold: 0
|
|
20
|
-
}]
|
|
21
|
-
|
|
22
|
-
const chartOptions = {
|
|
23
|
-
series: chartData,
|
|
24
|
-
title: {
|
|
25
|
-
text: "Bar Graph with Negative Numbers",
|
|
26
|
-
},
|
|
27
|
-
xAxis: {
|
|
28
|
-
categories: ["Jan", "Feb", "Mar", "Apr", "May"],
|
|
29
|
-
},
|
|
30
|
-
yAxis: {
|
|
31
|
-
title: {
|
|
32
|
-
text: "Number of Employees",
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
legend: { enabled: true },
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const BarGraphStacked = () => {
|
|
40
|
-
const options = Highcharts.merge({}, barGraphTheme, chartOptions)
|
|
41
|
-
|
|
42
|
-
return(
|
|
43
|
-
<div>
|
|
44
|
-
<HighchartsReact
|
|
45
|
-
highcharts={Highcharts}
|
|
46
|
-
options={options}
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export default BarGraphStacked
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Number of Installations',
|
|
3
|
-
data: [1475,200,3000,654,656]
|
|
4
|
-
}, {
|
|
5
|
-
type: 'spline',
|
|
6
|
-
name: 'Percentage',
|
|
7
|
-
data: [48, 70, 25, 55, 72],
|
|
8
|
-
color: '#F9BB00',
|
|
9
|
-
yAxis: 1
|
|
10
|
-
}] %>
|
|
11
|
-
|
|
12
|
-
<% axis_titles = [{name: "Number of Installations"}, {name: "Percentage"}] %>
|
|
13
|
-
|
|
14
|
-
<% axis_formats = [{format: ""}, {format: "{value}%"}] %>
|
|
15
|
-
|
|
16
|
-
<%= pb_rails("bar_graph", props: {
|
|
17
|
-
axis_format: axis_formats,
|
|
18
|
-
axis_title: axis_titles,
|
|
19
|
-
chart_data: data,
|
|
20
|
-
id: "bar-spline",
|
|
21
|
-
y_axis_min: 0,
|
|
22
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
23
|
-
subtitle: 'Source: thesolarfoundation.com',
|
|
24
|
-
title: 'Bar Graph with Secondary Y-axis',
|
|
25
|
-
legend: true,
|
|
26
|
-
}) %>
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import barGraphTheme from '../barGraphTheme';
|
|
3
|
-
import Highcharts from "highcharts"
|
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import colors from '../../tokens/exports/_colors.module.scss'
|
|
8
|
-
import typography from '../../tokens/exports/_typography.module.scss'
|
|
9
|
-
|
|
10
|
-
const chartData = [{
|
|
11
|
-
name: 'Number of Installations',
|
|
12
|
-
data: [1475, 200, 3000, 654, 656],
|
|
13
|
-
}, {
|
|
14
|
-
type: 'spline',
|
|
15
|
-
name: 'Percentage',
|
|
16
|
-
data: [48, 70, 25, 55, 72],
|
|
17
|
-
color: '#F9BB00',
|
|
18
|
-
yAxis: 1
|
|
19
|
-
}]
|
|
20
|
-
|
|
21
|
-
const chartOptions = {
|
|
22
|
-
series: chartData,
|
|
23
|
-
title: {
|
|
24
|
-
text: "Bar Graph with Secondary Y-axis",
|
|
25
|
-
},
|
|
26
|
-
xAxis: {
|
|
27
|
-
categories: ["Jan", "Feb", "Mar", "Apr", "May"],
|
|
28
|
-
},
|
|
29
|
-
yAxis: [{
|
|
30
|
-
labels: {
|
|
31
|
-
style: {
|
|
32
|
-
fontFamily: typography.font_family_base,
|
|
33
|
-
color: colors.text_lt_lighter,
|
|
34
|
-
fontWeight: typography.bold,
|
|
35
|
-
fontSize: typography.text_smaller,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
title: {
|
|
39
|
-
text: "Number of Employees",
|
|
40
|
-
style: {
|
|
41
|
-
fontFamily: typography.font_family_base,
|
|
42
|
-
color: colors.text_lt_lighter,
|
|
43
|
-
fontWeight: typography.bold,
|
|
44
|
-
fontSize: typography.text_smaller,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
}, {
|
|
48
|
-
labels: {
|
|
49
|
-
style: {
|
|
50
|
-
fontFamily: typography.font_family_base,
|
|
51
|
-
color: colors.text_lt_lighter,
|
|
52
|
-
fontWeight: typography.bold,
|
|
53
|
-
fontSize: typography.text_smaller,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
title: {
|
|
57
|
-
text: "Percentage",
|
|
58
|
-
style: {
|
|
59
|
-
fontFamily: typography.font_family_base,
|
|
60
|
-
color: colors.text_lt_lighter,
|
|
61
|
-
fontWeight: typography.bold,
|
|
62
|
-
fontSize: typography.text_smaller,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
opposite: true,
|
|
67
|
-
min: 0,
|
|
68
|
-
max: 100
|
|
69
|
-
}],
|
|
70
|
-
legend: { enabled: true },
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const BarGraphSecondaryYAxis = () => {
|
|
74
|
-
const options = Highcharts.merge({}, barGraphTheme, chartOptions)
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<div>
|
|
78
|
-
<HighchartsReact
|
|
79
|
-
highcharts={Highcharts}
|
|
80
|
-
options={options}
|
|
81
|
-
/>
|
|
82
|
-
</div>
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export default BarGraphSecondaryYAxis
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
Optionally add a second yAxis to support secondary datasets (e.x., a spline) by passing `yAxis: 1` to the second node of your `chartData` array.
|
|
2
|
-
|
|
3
|
-
To customize the format and/or title of your secondary yAxis, pass your desired values as arrays through the `axisFormat` and `axisTitle` props, respectively.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Number of Installations',
|
|
3
|
-
data: [1475,200,3000,654,656]
|
|
4
|
-
}, {
|
|
5
|
-
type: 'spline',
|
|
6
|
-
name: 'Trend Line',
|
|
7
|
-
data: [1975, 600, 2500, 924, 500],
|
|
8
|
-
color: '#F9BB00',
|
|
9
|
-
}] %>
|
|
10
|
-
|
|
11
|
-
<%= pb_rails("bar_graph", props: {
|
|
12
|
-
axis_title: 'Number of Employees',
|
|
13
|
-
chart_data: data,
|
|
14
|
-
id: "bar-spline",
|
|
15
|
-
y_axis_min: 0,
|
|
16
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
17
|
-
subtitle: 'Source: thesolarfoundation.com',
|
|
18
|
-
title: 'Bar Graph with Spline',
|
|
19
|
-
legend: true,
|
|
20
|
-
}) %>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import barGraphTheme from '../barGraphTheme';
|
|
3
|
-
import Highcharts from "highcharts";
|
|
4
|
-
import HighchartsReact from "highcharts-react-official";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const chartData = [{
|
|
8
|
-
name: 'Number of Installations',
|
|
9
|
-
data: [1475, 200, 3000, 654, 656],
|
|
10
|
-
}, {
|
|
11
|
-
type: 'spline',
|
|
12
|
-
name: 'Trend Line',
|
|
13
|
-
data: [1975, 600, 2500, 924, 500],
|
|
14
|
-
color: '#F9BB00',
|
|
15
|
-
}]
|
|
16
|
-
|
|
17
|
-
const chartOptions = {
|
|
18
|
-
series: chartData,
|
|
19
|
-
title: {
|
|
20
|
-
text: "Bar Graph with Spline",
|
|
21
|
-
},
|
|
22
|
-
xAxis: {
|
|
23
|
-
categories: ["Jan", "Feb", "Mar", "Apr", "May"],
|
|
24
|
-
},
|
|
25
|
-
yAxis: {
|
|
26
|
-
title: {
|
|
27
|
-
text: "Number of Employees",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
legend: { enabled: true },
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const BarGraphSpline = () => {
|
|
34
|
-
const options = Highcharts.merge({}, barGraphTheme, chartOptions)
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div>
|
|
38
|
-
<HighchartsReact
|
|
39
|
-
highcharts={Highcharts}
|
|
40
|
-
options={options}
|
|
41
|
-
/>
|
|
42
|
-
</div>
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default BarGraphSpline
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Installation',
|
|
3
|
-
data: [1475, 200, 3000, 654, 656],
|
|
4
|
-
},
|
|
5
|
-
{
|
|
6
|
-
name: 'Manufacturing',
|
|
7
|
-
data: [1270, 800, 200, 454, 956],
|
|
8
|
-
}, {
|
|
9
|
-
name: 'Sales & Distribution',
|
|
10
|
-
data: [975, 1600, 1500, 924, 500],
|
|
11
|
-
}] %>
|
|
12
|
-
|
|
13
|
-
<%= pb_rails("bar_graph", props: {
|
|
14
|
-
axis_title: 'Number of Employees',
|
|
15
|
-
chart_data: data,
|
|
16
|
-
id: "bar-default",
|
|
17
|
-
y_axis_min: 0,
|
|
18
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
19
|
-
stacking: "normal",
|
|
20
|
-
title: 'Bar Graph with Stacked Columns',
|
|
21
|
-
legend: true,
|
|
22
|
-
}) %>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import barGraphTheme from '../barGraphTheme';
|
|
3
|
-
import Highcharts from "highcharts";
|
|
4
|
-
import HighchartsReact from "highcharts-react-official";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const chartData = [{
|
|
8
|
-
name: 'Installation',
|
|
9
|
-
data: [1475, 200, 3000, 654, 656],
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: 'Manufacturing',
|
|
13
|
-
data: [1270, 800, 200, 454, 956],
|
|
14
|
-
}, {
|
|
15
|
-
name: 'Sales & Distribution',
|
|
16
|
-
data: [975, 1600, 1500, 924, 500],
|
|
17
|
-
}]
|
|
18
|
-
|
|
19
|
-
const chartOptions = {
|
|
20
|
-
series: chartData,
|
|
21
|
-
title: {
|
|
22
|
-
text: "Bar Graph with Stacked Columns",
|
|
23
|
-
},
|
|
24
|
-
xAxis: {
|
|
25
|
-
categories: ["Jan", "Feb", "Mar", "Apr", "May"],
|
|
26
|
-
},
|
|
27
|
-
yAxis: {
|
|
28
|
-
title: {
|
|
29
|
-
text: "Number of Employees",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
plotOptions: {
|
|
33
|
-
column: {
|
|
34
|
-
stacking: 'normal',
|
|
35
|
-
borderWidth: 0,
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
legend: { enabled: true },
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const BarGraphStacked = () => {
|
|
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
|
-
}
|
|
54
|
-
|
|
55
|
-
export default BarGraphStacked
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
The `stacking` prop can be used for a stacked bar graph. The prop allows for `normal` or `percent` as options.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
**Important Note for the React Kit**: In order to leverage this kit, you must install `highcharts` and `highcharts-react-official` into your project as shown below. To then apply Playbook styles to your Highchart, import BarGraphTheme.ts from playbook-ui and merge it with your Highchart options. Then, pass the merged value to the options prop. Playbook’s styling will be applied automatically. See the examples in the documentation below.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
examples:
|
|
2
|
-
|
|
3
|
-
rails:
|
|
4
|
-
- bar_graph_default: Default
|
|
5
|
-
- bar_graph_legend: Legend
|
|
6
|
-
- bar_graph_legend_position: Legend Position
|
|
7
|
-
- bar_graph_height: Height
|
|
8
|
-
- bar_graph_spline: Spline
|
|
9
|
-
- bar_graph_colors: Color Overrides
|
|
10
|
-
- bar_graph_custom_rails: Custom Overrides
|
|
11
|
-
- bar_graph_stacked: Stacked
|
|
12
|
-
- bar_graph_negative_numbers: Negative Numbers
|
|
13
|
-
- bar_graph_secondary_y_axis: Secondary Y-Axis
|
|
14
|
-
- bar_graph_horizontal: Custom Options From Highcharts
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
react:
|
|
18
|
-
- bar_graph_default: Default
|
|
19
|
-
- bar_graph_legend: Legend
|
|
20
|
-
- bar_graph_legend_position: Legend Position
|
|
21
|
-
- bar_graph_legend_non_clickable: Legend Non Clickable
|
|
22
|
-
- bar_graph_height: Height
|
|
23
|
-
- bar_graph_spline: Spline
|
|
24
|
-
- bar_graph_colors: Color Overrides
|
|
25
|
-
- bar_graph_stacked: Stacked
|
|
26
|
-
- bar_graph_negative_numbers: Negative Numbers
|
|
27
|
-
- bar_graph_secondary_y_axis: Secondary Y-Axis
|
|
28
|
-
- bar_graph_horizontal: Horizontal Bar Graph
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { default as BarGraphDefault } from './_bar_graph_default.jsx'
|
|
2
|
-
export { default as BarGraphLegend } from './_bar_graph_legend.jsx'
|
|
3
|
-
export { default as BarGraphLegendPosition } from './_bar_graph_legend_position.jsx'
|
|
4
|
-
export { default as BarGraphLegendNonClickable } from './_bar_graph_legend_non_clickable.jsx'
|
|
5
|
-
export { default as BarGraphHeight } from './_bar_graph_height.jsx'
|
|
6
|
-
export { default as BarGraphSpline } from './_bar_graph_spline.jsx'
|
|
7
|
-
export { default as BarGraphColors } from './_bar_graph_colors.jsx'
|
|
8
|
-
export { default as BarGraphStacked } from './_bar_graph_stacked.jsx'
|
|
9
|
-
export { default as BarGraphNegativeNumbers } from './_bar_graph_negative_numbers.jsx'
|
|
10
|
-
export { default as BarGraphSecondaryYAxis } from './_bar_graph_secondary_y_axis.jsx'
|
|
11
|
-
export { default as BarGraphHorizontal } from './_bar_graph_horizontal.jsx'
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<% data_51 = [{
|
|
2
|
-
name: 'Waiting for Calls',
|
|
3
|
-
value: 41,
|
|
4
|
-
},
|
|
5
|
-
{
|
|
6
|
-
name: 'On Call',
|
|
7
|
-
value: 49,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'After Call',
|
|
11
|
-
value: 10,
|
|
12
|
-
}
|
|
13
|
-
] %>
|
|
14
|
-
|
|
15
|
-
<br><br>
|
|
16
|
-
|
|
17
|
-
<%= pb_rails("circle_chart", props: {
|
|
18
|
-
chart_data: data_51,
|
|
19
|
-
id: "with-a-block-2",
|
|
20
|
-
rounded: true,
|
|
21
|
-
}) do %>
|
|
22
|
-
<%= pb_rails('title', props: {text: "83", size: 1, tag: 'div'}) %>
|
|
23
|
-
<% end %>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import circleChartTheme from '../circleChartTheme'
|
|
3
|
-
import Highcharts from "highcharts"
|
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
|
5
|
-
import Title from '../../pb_title/_title'
|
|
6
|
-
|
|
7
|
-
const dataWithABlock = [
|
|
8
|
-
{
|
|
9
|
-
name: 'Waiting for Calls',
|
|
10
|
-
y: 41,
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'On Call',
|
|
14
|
-
y: 49,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: 'After Call',
|
|
18
|
-
y: 10,
|
|
19
|
-
},
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
const CircleChartBlock = (props) => {
|
|
23
|
-
const chartOptions = {
|
|
24
|
-
series: [{
|
|
25
|
-
data: dataWithABlock,
|
|
26
|
-
innerSize: '100%',
|
|
27
|
-
borderWidth: 20,
|
|
28
|
-
borderColor: null,
|
|
29
|
-
}],
|
|
30
|
-
chart: {
|
|
31
|
-
events: {
|
|
32
|
-
render: function() {
|
|
33
|
-
const chart = this;
|
|
34
|
-
const blockElement = document.querySelector('.pb-circle-chart-block');
|
|
35
|
-
if (blockElement) {
|
|
36
|
-
blockElement.style.width = chart.chartWidth + 'px';
|
|
37
|
-
blockElement.style.height = chart.chartHeight + 'px';
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
redraw: function() {
|
|
41
|
-
const chart = this;
|
|
42
|
-
const blockElement = document.querySelector('.pb-circle-chart-block');
|
|
43
|
-
if (blockElement) {
|
|
44
|
-
blockElement.style.width = chart.chartWidth + 'px';
|
|
45
|
-
blockElement.style.height = chart.chartHeight + 'px';
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const options = Highcharts.merge({}, circleChartTheme, chartOptions)
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<div>
|
|
56
|
-
<div style={{ position: 'relative' }}>
|
|
57
|
-
<HighchartsReact
|
|
58
|
-
highcharts={Highcharts}
|
|
59
|
-
options={options}
|
|
60
|
-
/>
|
|
61
|
-
<div
|
|
62
|
-
className="pb-circle-chart-block"
|
|
63
|
-
style={{
|
|
64
|
-
position: 'absolute',
|
|
65
|
-
top: 0,
|
|
66
|
-
left: 0,
|
|
67
|
-
display: 'flex',
|
|
68
|
-
justifyContent: 'center',
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
zIndex: 1,
|
|
71
|
-
textAlign: 'center',
|
|
72
|
-
pointerEvents: 'none'
|
|
73
|
-
}}
|
|
74
|
-
>
|
|
75
|
-
<Title
|
|
76
|
-
size={1}
|
|
77
|
-
tag="div"
|
|
78
|
-
{...props}
|
|
79
|
-
>
|
|
80
|
-
{'83'}
|
|
81
|
-
</Title>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export default CircleChartBlock
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<% data_set = [{
|
|
2
|
-
name: 'Waiting for Calls',
|
|
3
|
-
value: 41,
|
|
4
|
-
},
|
|
5
|
-
{
|
|
6
|
-
name: 'On Call',
|
|
7
|
-
value: 49,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'After Call',
|
|
11
|
-
value: 10,
|
|
12
|
-
}
|
|
13
|
-
] %>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<%= pb_rails("circle_chart", props: {
|
|
17
|
-
chart_data: data_set,
|
|
18
|
-
id: "default-test-colors",
|
|
19
|
-
colors: ['data-6', 'data-4', 'data-2']
|
|
20
|
-
}) %>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import circleChartTheme from '../circleChartTheme'
|
|
3
|
-
import Highcharts from "highcharts"
|
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
|
5
|
-
import colors from '../../tokens/exports/_colors.module.scss'
|
|
6
|
-
|
|
7
|
-
const dataWithColors = [
|
|
8
|
-
{
|
|
9
|
-
name: 'Waiting for Calls',
|
|
10
|
-
y: 41,
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'On Call',
|
|
14
|
-
y: 49,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: 'After Call',
|
|
18
|
-
y: 10,
|
|
19
|
-
},
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
const CircleChartColors = () => {
|
|
23
|
-
const chartOptions = {
|
|
24
|
-
series: [{ data: dataWithColors }],
|
|
25
|
-
plotOptions: {
|
|
26
|
-
pie: {
|
|
27
|
-
colors: ["#144075", colors.data_4, colors.data_2]
|
|
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
|
-
}
|
|
43
|
-
|
|
44
|
-
export default CircleChartColors
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Waiting for Calls',
|
|
3
|
-
value: 41,
|
|
4
|
-
},
|
|
5
|
-
{
|
|
6
|
-
name: 'On Call',
|
|
7
|
-
value: 49,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'After Call',
|
|
11
|
-
value: 10,
|
|
12
|
-
}
|
|
13
|
-
] %>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<%= pb_rails("circle_chart", props: {
|
|
17
|
-
chart_data: data,
|
|
18
|
-
tooltip_html: "<p>Custom tooltip for {point.name} <br/>with value: {point.y}</p>",
|
|
19
|
-
id: "default-test"
|
|
20
|
-
}) %>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import circleChartTheme from '../circleChartTheme'
|
|
3
|
-
import Highcharts from "highcharts"
|
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
|
5
|
-
|
|
6
|
-
const data = [
|
|
7
|
-
{
|
|
8
|
-
name: 'Waiting for Calls',
|
|
9
|
-
y: 41,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: 'On Call',
|
|
13
|
-
y: 49,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'After Call',
|
|
17
|
-
y: 10,
|
|
18
|
-
},
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
const CircleChartCustomTooltip = () => {
|
|
22
|
-
const chartOptions = {
|
|
23
|
-
series: [{ data: data }],
|
|
24
|
-
tooltip: {
|
|
25
|
-
headerFormat: null,
|
|
26
|
-
pointFormat: '<p>Custom tooltip for {point.name} <br/>with value: {point.y}</p>',
|
|
27
|
-
useHTML: true,
|
|
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
|
-
}
|
|
42
|
-
|
|
43
|
-
export default CircleChartCustomTooltip
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
Custom tooltip formatting is configured through the tooltip object in the chart options:
|
|
2
|
-
`headerFormat` **Type**: String | when set to null will disable the header.
|
|
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.
|
|
5
|
-
`{point.name}` and `{point.y}` are useful values that can be referenced for each point in the graph.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Waiting for Calls',
|
|
3
|
-
value: 41,
|
|
4
|
-
},
|
|
5
|
-
{
|
|
6
|
-
name: 'On Call',
|
|
7
|
-
value: 49,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'After Call',
|
|
11
|
-
value: 10,
|
|
12
|
-
}
|
|
13
|
-
] %>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<%= pb_rails("circle_chart", props: {
|
|
17
|
-
chart_data: data,
|
|
18
|
-
id: "default-test"
|
|
19
|
-
}) %>
|