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,26 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Installation',
|
|
3
|
-
data: [1475,200,3000,654,656]
|
|
4
|
-
}, {
|
|
5
|
-
name: 'Manufacturing',
|
|
6
|
-
data: [4434,524,2320,440,500]
|
|
7
|
-
}, {
|
|
8
|
-
name: 'Sales & Distribution',
|
|
9
|
-
data: [3387,743,1344,434,440,]
|
|
10
|
-
}, {
|
|
11
|
-
name: 'Project Development',
|
|
12
|
-
data: [3227,878,999,780,1000]
|
|
13
|
-
}, {
|
|
14
|
-
name: 'Other',
|
|
15
|
-
data: [1111,677,3245,500,200]
|
|
16
|
-
}] %>
|
|
17
|
-
|
|
18
|
-
<%= pb_rails("bar_graph", props: {
|
|
19
|
-
axis_title: 'Number of Employees',
|
|
20
|
-
chart_data: data,
|
|
21
|
-
id: "bar-default",
|
|
22
|
-
y_axis_min: 0,
|
|
23
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
24
|
-
subtitle: 'Source: thesolarfoundation.com',
|
|
25
|
-
title: 'Solar Employment Growth by Sector, 2010-2016',
|
|
26
|
-
}) %>
|
|
@@ -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
|
-
name: 'Manufacturing',
|
|
12
|
-
data: [4434, 524, 2320, 440, 500],
|
|
13
|
-
}, {
|
|
14
|
-
name: 'Sales & Distribution',
|
|
15
|
-
data: [3387, 743, 1344, 434, 440],
|
|
16
|
-
}, {
|
|
17
|
-
name: 'Project Development',
|
|
18
|
-
data: [3227, 878, 999, 780, 1000],
|
|
19
|
-
}, {
|
|
20
|
-
name: 'Other',
|
|
21
|
-
data: [1111, 677, 3245, 500, 200],
|
|
22
|
-
}]
|
|
23
|
-
|
|
24
|
-
const chartOptions = {
|
|
25
|
-
series: chartData,
|
|
26
|
-
title: {
|
|
27
|
-
text: 'Solar Employment Growth by Sector, 2010-2016',
|
|
28
|
-
},
|
|
29
|
-
subtitle: {
|
|
30
|
-
text: 'Source: thesolarfoundation.com',
|
|
31
|
-
},
|
|
32
|
-
xAxis: {
|
|
33
|
-
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
|
|
34
|
-
},
|
|
35
|
-
yAxis: {
|
|
36
|
-
title: {
|
|
37
|
-
text: 'Number of Employees',
|
|
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
|
-
}
|
|
54
|
-
|
|
55
|
-
export default BarGraphDefault
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Number of Installations',
|
|
3
|
-
data: [1475,200,3000,654,656]
|
|
4
|
-
}] %>
|
|
5
|
-
|
|
6
|
-
<%= pb_rails("bar_graph", props: {
|
|
7
|
-
axis_title: 'Number of Employees',
|
|
8
|
-
chart_data: data,
|
|
9
|
-
id: "bar-fixed-height",
|
|
10
|
-
y_axis_min: 0,
|
|
11
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
12
|
-
title: 'Fixed Height (300px)',
|
|
13
|
-
height: '300'
|
|
14
|
-
}) %>
|
|
15
|
-
|
|
16
|
-
<br /><br />
|
|
17
|
-
|
|
18
|
-
<%= pb_rails("bar_graph", props: {
|
|
19
|
-
axis_title: 'Number of Employees',
|
|
20
|
-
chart_data: data,
|
|
21
|
-
id: "bar-percentage-height",
|
|
22
|
-
y_axis_min: 0,
|
|
23
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
24
|
-
title: 'Percentage Height (50%)',
|
|
25
|
-
height: '50%'
|
|
26
|
-
}) %>
|
|
@@ -1,69 +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
|
-
|
|
12
|
-
const pixelHeightChartOptions = {
|
|
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 = () => (
|
|
53
|
-
<div>
|
|
54
|
-
<HighchartsReact
|
|
55
|
-
highcharts={Highcharts}
|
|
56
|
-
options={pixelOptions}
|
|
57
|
-
/>
|
|
58
|
-
|
|
59
|
-
<br />
|
|
60
|
-
<br />
|
|
61
|
-
|
|
62
|
-
<HighchartsReact
|
|
63
|
-
highcharts={Highcharts}
|
|
64
|
-
options={percentageOptions}
|
|
65
|
-
/>
|
|
66
|
-
</div>
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
export default BarGraphHeight
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
By default, Highcharts have a height of 400px, but this can be customized. You can override the default by specifying either a percentage or a fixed pixel value.
|
|
2
|
-
|
|
3
|
-
Using a percentage maintains a consistent aspect ratio across different responsive sizes. For example, setting the height to 50% makes the chart’s height half of its width.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<% bar_graph_options = {
|
|
2
|
-
customOptions: {
|
|
3
|
-
chart: {
|
|
4
|
-
type: 'bar'
|
|
5
|
-
},
|
|
6
|
-
title: {
|
|
7
|
-
text: 'Historic World Population by Region',
|
|
8
|
-
align: 'left'
|
|
9
|
-
},
|
|
10
|
-
subtitle: {
|
|
11
|
-
text: 'Source: <a ' +
|
|
12
|
-
'href="https://en.wikipedia.org/wiki/List_of_continents_and_continental_subregions_by_population"' +
|
|
13
|
-
'target="_blank">Wikipedia.org</a>',
|
|
14
|
-
align: 'left'
|
|
15
|
-
},
|
|
16
|
-
xAxis: {
|
|
17
|
-
categories: ['Africa', 'America', 'Asia', 'Europe'],
|
|
18
|
-
lineWidth: 0
|
|
19
|
-
},
|
|
20
|
-
yAxis: {
|
|
21
|
-
min: 0,
|
|
22
|
-
title: {
|
|
23
|
-
text: 'Population (millions)',
|
|
24
|
-
align: 'high'
|
|
25
|
-
},
|
|
26
|
-
labels: {
|
|
27
|
-
overflow: 'justify'
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
tooltip: {
|
|
31
|
-
valueSuffix: ' millions'
|
|
32
|
-
},
|
|
33
|
-
plotOptions: {
|
|
34
|
-
bar: {
|
|
35
|
-
dataLabels: {
|
|
36
|
-
enabled: true
|
|
37
|
-
},
|
|
38
|
-
groupPadding: 0.1
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
series: [{
|
|
42
|
-
name: 'Year 1990',
|
|
43
|
-
data: [631, 727, 3202, 721]
|
|
44
|
-
}, {
|
|
45
|
-
name: 'Year 2000',
|
|
46
|
-
data: [814, 841, 3714, 726]
|
|
47
|
-
}, {
|
|
48
|
-
name: 'Year 2018',
|
|
49
|
-
data: [1276, 1007, 4561, 746]
|
|
50
|
-
}]
|
|
51
|
-
}
|
|
52
|
-
} %>
|
|
53
|
-
|
|
54
|
-
<%= pb_rails("bar_graph", props: {
|
|
55
|
-
id: "bar-horizontal",
|
|
56
|
-
y_axis_min: 0,
|
|
57
|
-
custom_options: bar_graph_options,
|
|
58
|
-
}) %>
|
|
@@ -1,64 +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 chartOptions = {
|
|
8
|
-
chart: {
|
|
9
|
-
type: 'bar'
|
|
10
|
-
},
|
|
11
|
-
title: {
|
|
12
|
-
text: 'Historic World Population by Region',
|
|
13
|
-
align: 'left'
|
|
14
|
-
},
|
|
15
|
-
subtitle: {
|
|
16
|
-
text: 'Source: <a ' +
|
|
17
|
-
'href="https://en.wikipedia.org/wiki/List_of_continents_and_continental_subregions_by_population"' +
|
|
18
|
-
'target="_blank">Wikipedia.org</a>',
|
|
19
|
-
align: 'left'
|
|
20
|
-
},
|
|
21
|
-
xAxis: {
|
|
22
|
-
categories: ['Africa', 'America', 'Asia', 'Europe'],
|
|
23
|
-
lineWidth: 0
|
|
24
|
-
},
|
|
25
|
-
yAxis: {
|
|
26
|
-
title: {
|
|
27
|
-
text: '',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
tooltip: {
|
|
31
|
-
valueSuffix: ' millions'
|
|
32
|
-
},
|
|
33
|
-
plotOptions: {
|
|
34
|
-
bar: {
|
|
35
|
-
dataLabels: {
|
|
36
|
-
enabled: true
|
|
37
|
-
},
|
|
38
|
-
groupPadding: 0.1
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
series: [{
|
|
42
|
-
name: 'Year 1990',
|
|
43
|
-
data: [631, 727, 3202, 721]
|
|
44
|
-
}, {
|
|
45
|
-
name: 'Year 2000',
|
|
46
|
-
data: [814, 841, 3714, 726]
|
|
47
|
-
}, {
|
|
48
|
-
name: 'Year 2018',
|
|
49
|
-
data: [1276, 1007, 4561, 746]
|
|
50
|
-
}],
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const options = Highcharts.merge({}, barGraphTheme, chartOptions)
|
|
54
|
-
|
|
55
|
-
const BarGraphHorizontal = () => (
|
|
56
|
-
<div>
|
|
57
|
-
<HighchartsReact
|
|
58
|
-
highcharts={Highcharts}
|
|
59
|
-
options={options}
|
|
60
|
-
/>
|
|
61
|
-
</div>
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
export default BarGraphHorizontal
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Number of Installations',
|
|
3
|
-
data: [1475,200,3000,654,656]
|
|
4
|
-
}] %>
|
|
5
|
-
|
|
6
|
-
<%= pb_rails("bar_graph", props: {
|
|
7
|
-
axis_title: 'Number of Employees',
|
|
8
|
-
chart_data: data,
|
|
9
|
-
id: "bar-test-2",
|
|
10
|
-
y_axis_min: 0,
|
|
11
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
12
|
-
title: 'Bar Graph with Legend',
|
|
13
|
-
legend: true,
|
|
14
|
-
}) %>
|
|
@@ -1,40 +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
|
-
|
|
12
|
-
const chartOptions = {
|
|
13
|
-
series: chartData,
|
|
14
|
-
title: {
|
|
15
|
-
text: 'Bar Graph with Legend',
|
|
16
|
-
},
|
|
17
|
-
xAxis: {
|
|
18
|
-
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
|
|
19
|
-
},
|
|
20
|
-
yAxis: {
|
|
21
|
-
title: {
|
|
22
|
-
text: 'Number of Employees',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
legend: { enabled: true },
|
|
26
|
-
}
|
|
27
|
-
|
|
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
|
-
export default BarGraphLegend
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Number of Installations',
|
|
3
|
-
data: [1475,200,3000,654,656]
|
|
4
|
-
}] %>
|
|
5
|
-
|
|
6
|
-
<%= pb_rails("bar_graph", props: {
|
|
7
|
-
axis_title: 'Number of Employees',
|
|
8
|
-
chart_data: data,
|
|
9
|
-
id: "bar-test-3",
|
|
10
|
-
y_axis_min: 0,
|
|
11
|
-
x_axis_categories: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
12
|
-
title: 'Bar Graph with Legend Non Clickable',
|
|
13
|
-
legend: true,
|
|
14
|
-
toggle_legend_click: false,
|
|
15
|
-
}) %>
|
|
@@ -1,48 +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
|
-
|
|
12
|
-
const chartOptions = {
|
|
13
|
-
title: {
|
|
14
|
-
text: 'Bar Graph with Legend Non Clickable',
|
|
15
|
-
},
|
|
16
|
-
xAxis: {
|
|
17
|
-
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
|
|
18
|
-
},
|
|
19
|
-
yAxis: {
|
|
20
|
-
title: {
|
|
21
|
-
text: 'Number of Employees',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
legend: {
|
|
25
|
-
enabled: true,
|
|
26
|
-
events: {
|
|
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
|
-
}
|
|
47
|
-
|
|
48
|
-
export default BarGraphLegendNonClickable
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Installation',
|
|
3
|
-
data: [1475]
|
|
4
|
-
}, {
|
|
5
|
-
name: 'Manufacturing',
|
|
6
|
-
data: [4434]
|
|
7
|
-
}, {
|
|
8
|
-
name: 'Sales & Distribution',
|
|
9
|
-
data: [3387]
|
|
10
|
-
}, {
|
|
11
|
-
name: 'Project Development',
|
|
12
|
-
data: [3227]
|
|
13
|
-
}, {
|
|
14
|
-
name: 'Other',
|
|
15
|
-
data: [1111]
|
|
16
|
-
}] %>
|
|
17
|
-
|
|
18
|
-
<%= pb_rails("title", props: {size: 4, text: "align | vertical_align", padding_top: "sm", padding_bottom: "sm"})%>
|
|
19
|
-
|
|
20
|
-
<%= pb_rails("bar_graph", props: {
|
|
21
|
-
axis_title: 'Number of Employees',
|
|
22
|
-
chart_data: data,
|
|
23
|
-
id:"legend-position-bar",
|
|
24
|
-
y_axis_min: 0,
|
|
25
|
-
x_axis_categories:['Jan'],
|
|
26
|
-
title: 'Alignment of Legend',
|
|
27
|
-
legend: true,
|
|
28
|
-
align: 'right',
|
|
29
|
-
vertical_align: 'top',
|
|
30
|
-
padding_bottom: "sm",
|
|
31
|
-
}) %>
|
|
32
|
-
|
|
33
|
-
<%= pb_rails("title", props: {size: 4, text: "layout", padding_top: "sm", padding_bottom: "sm"})%>
|
|
34
|
-
|
|
35
|
-
<%= pb_rails("bar_graph", props: {
|
|
36
|
-
axis_title: 'Number of Employees',
|
|
37
|
-
chart_data: data,
|
|
38
|
-
id:"legend-position-bar-1",
|
|
39
|
-
y_axis_min: 0,
|
|
40
|
-
x_axis_categories:['Jan'],
|
|
41
|
-
title: 'Layout of Legend',
|
|
42
|
-
legend: true,
|
|
43
|
-
layout: 'vertical',
|
|
44
|
-
padding_top: "sm",
|
|
45
|
-
padding_bottom: "sm",
|
|
46
|
-
}) %>
|
|
47
|
-
|
|
48
|
-
<%= pb_rails("title", props: {size: 4, text: "x | y", padding_top: "sm", padding_bottom: "sm"})%>
|
|
49
|
-
|
|
50
|
-
<%= pb_rails("bar_graph", props: {
|
|
51
|
-
axis_title: 'Number of Employees',
|
|
52
|
-
chart_data: data,
|
|
53
|
-
id:"legend-position-bar-2",
|
|
54
|
-
y_axis_min: 0,
|
|
55
|
-
x_axis_categories:['Jan'],
|
|
56
|
-
title: 'Offset of Legend',
|
|
57
|
-
legend: true,
|
|
58
|
-
layout: "vertical",
|
|
59
|
-
x: 100,
|
|
60
|
-
y: 10,
|
|
61
|
-
padding_top: "sm",
|
|
62
|
-
}) %>
|
|
@@ -1,136 +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
|
-
import Title from "../../pb_title/_title"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const chartData = [{
|
|
10
|
-
name: 'Installation',
|
|
11
|
-
data: [1475],
|
|
12
|
-
}, {
|
|
13
|
-
name: 'Manufacturing',
|
|
14
|
-
data: [4434],
|
|
15
|
-
}, {
|
|
16
|
-
name: 'Sales & Distribution',
|
|
17
|
-
data: [3387],
|
|
18
|
-
}, {
|
|
19
|
-
name: 'Project Development',
|
|
20
|
-
data: [3227],
|
|
21
|
-
}, {
|
|
22
|
-
name: 'Other',
|
|
23
|
-
data: [1111],
|
|
24
|
-
}]
|
|
25
|
-
|
|
26
|
-
const alignChartOptions = {
|
|
27
|
-
series: chartData,
|
|
28
|
-
title: {
|
|
29
|
-
text: 'Alignment of Legend',
|
|
30
|
-
},
|
|
31
|
-
subtitle: {
|
|
32
|
-
text: 'Source: thesolarfoundation.com',
|
|
33
|
-
},
|
|
34
|
-
xAxis: {
|
|
35
|
-
categories: ['Jan'],
|
|
36
|
-
},
|
|
37
|
-
yAxis: {
|
|
38
|
-
title: {
|
|
39
|
-
text: 'Number of Employees',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
legend: {
|
|
43
|
-
enabled: true,
|
|
44
|
-
verticalAlign: 'top',
|
|
45
|
-
align: 'right',
|
|
46
|
-
},
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const layoutChartOptions = {
|
|
50
|
-
series: chartData,
|
|
51
|
-
title: {
|
|
52
|
-
text: 'Layout of Legend',
|
|
53
|
-
},
|
|
54
|
-
xAxis: {
|
|
55
|
-
categories: ['Jan'],
|
|
56
|
-
},
|
|
57
|
-
yAxis: {
|
|
58
|
-
title: {
|
|
59
|
-
text: 'Number of Employees',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
legend: {
|
|
63
|
-
enabled: true,
|
|
64
|
-
layout: 'vertical',
|
|
65
|
-
},
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const offsetChartOptions = {
|
|
69
|
-
series: chartData,
|
|
70
|
-
title: {
|
|
71
|
-
text: 'Offset of Legend',
|
|
72
|
-
},
|
|
73
|
-
xAxis: {
|
|
74
|
-
categories: ['Jan'],
|
|
75
|
-
},
|
|
76
|
-
yAxis: {
|
|
77
|
-
title: {
|
|
78
|
-
text: 'Number of Employees',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
legend: {
|
|
82
|
-
enabled: true,
|
|
83
|
-
layout: 'vertical',
|
|
84
|
-
x: 100,
|
|
85
|
-
y: 10,
|
|
86
|
-
},
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const BarGraphLegendPosition = () => {
|
|
90
|
-
const alignOptions = Highcharts.merge({}, barGraphTheme, alignChartOptions)
|
|
91
|
-
const layoutOptions = Highcharts.merge({}, barGraphTheme, layoutChartOptions)
|
|
92
|
-
const offsetOptions = Highcharts.merge({}, barGraphTheme, offsetChartOptions)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return (
|
|
96
|
-
<div>
|
|
97
|
-
<Title
|
|
98
|
-
paddingBottom="sm"
|
|
99
|
-
paddingTop="sm"
|
|
100
|
-
size={4}
|
|
101
|
-
tag="h4"
|
|
102
|
-
text="align | verticalAlign"
|
|
103
|
-
/>
|
|
104
|
-
<HighchartsReact
|
|
105
|
-
highcharts={Highcharts}
|
|
106
|
-
options={alignOptions}
|
|
107
|
-
/>
|
|
108
|
-
|
|
109
|
-
<Title
|
|
110
|
-
paddingBottom="sm"
|
|
111
|
-
paddingTop="sm"
|
|
112
|
-
size={4}
|
|
113
|
-
tag="h4"
|
|
114
|
-
text="layout"
|
|
115
|
-
/>
|
|
116
|
-
<HighchartsReact
|
|
117
|
-
highcharts={Highcharts}
|
|
118
|
-
options={layoutOptions}
|
|
119
|
-
/>
|
|
120
|
-
|
|
121
|
-
<Title
|
|
122
|
-
paddingBottom="sm"
|
|
123
|
-
paddingTop="sm"
|
|
124
|
-
size={4}
|
|
125
|
-
tag="h4"
|
|
126
|
-
text="x | y"
|
|
127
|
-
/>
|
|
128
|
-
<HighchartsReact
|
|
129
|
-
highcharts={Highcharts}
|
|
130
|
-
options={offsetOptions}
|
|
131
|
-
/>
|
|
132
|
-
</div>
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export default BarGraphLegendPosition
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
##### Prop
|
|
2
|
-
|
|
3
|
-
`align` **Type**: String | **Values**: left | center | right (defaults to center)
|
|
4
|
-
`verticalAlign` **Type**: String | **Values**: top | middle | bottom (defaults to bottom)
|
|
5
|
-
`layout` **Type**: String | **Values**: horizontal | vertical | proximate (defaults to horizontal)
|
|
6
|
-
`x` **Type**: Number (defaults to 0)
|
|
7
|
-
`y` **Type**: Number (defaults to 0)
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
- `layout` determines the position of the legend items
|
|
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.
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
- `y` offsets the legend relative to its vertical alignmnet. Negative y moves it up, positive y moves it down.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Installation',
|
|
3
|
-
data: [-475, 400, -1000, 354, -856],
|
|
4
|
-
threshold: 0
|
|
5
|
-
}, {
|
|
6
|
-
name: 'Manufacturing',
|
|
7
|
-
data: [1475, 200, 1000, 654, -656],
|
|
8
|
-
threshold: 0
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: 'Sales & Distribution',
|
|
12
|
-
data: [1270, 100, -1200, 554, 756],
|
|
13
|
-
threshold: 0
|
|
14
|
-
}] %>
|
|
15
|
-
|
|
16
|
-
<%= pb_rails("bar_graph", props: {
|
|
17
|
-
axis_title: 'Number of Employees',
|
|
18
|
-
chart_data: data,
|
|
19
|
-
id: "bar-default",
|
|
20
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
|
21
|
-
title: 'Bar Graph with Negative Numbers',
|
|
22
|
-
legend: true,
|
|
23
|
-
}) %>
|