playbook_ui_docs 15.7.0.pre.alpha.play263313229 → 15.7.0.pre.alpha.play270013253

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.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +2 -2
  3. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +3 -2
  4. metadata +2 -113
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb +0 -26
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +0 -55
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md +0 -2
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +0 -42
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
  10. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +0 -26
  11. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +0 -55
  12. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +0 -26
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +0 -69
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +0 -58
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +0 -64
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +0 -14
  18. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +0 -40
  19. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.html.erb +0 -15
  20. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +0 -48
  21. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +0 -62
  22. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +0 -136
  23. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +0 -17
  24. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +0 -23
  25. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +0 -52
  26. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
  27. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -86
  28. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
  29. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb +0 -20
  30. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +0 -46
  31. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md +0 -2
  32. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +0 -22
  33. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +0 -55
  34. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +0 -1
  35. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +0 -1
  36. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -28
  37. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -11
  38. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +0 -26
  39. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +0 -88
  40. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +0 -20
  41. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +0 -44
  42. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md +0 -2
  43. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
  44. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +0 -20
  45. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +0 -43
  46. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +0 -5
  47. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +0 -19
  48. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +0 -38
  49. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +0 -136
  50. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +0 -152
  51. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +0 -86
  52. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +0 -142
  53. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +0 -14
  54. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +0 -63
  55. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +0 -22
  56. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +0 -45
  57. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +0 -37
  58. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +0 -61
  59. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +0 -22
  60. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +0 -41
  61. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +0 -38
  62. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +0 -55
  63. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
  64. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -26
  65. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -11
  66. data/app/pb_kits/playbook/pb_gauge/docs/_description.md +0 -1
  67. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb +0 -12
  68. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +0 -36
  69. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_rails.md +0 -2
  70. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +0 -2
  71. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +0 -32
  72. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +0 -146
  73. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_rails.md +0 -1
  74. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +0 -1
  75. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +0 -11
  76. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +0 -30
  77. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +0 -12
  78. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +0 -36
  79. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +0 -14
  80. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +0 -49
  81. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +0 -15
  82. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +0 -62
  83. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +0 -76
  84. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +0 -15
  85. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +0 -54
  86. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +0 -1
  87. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +0 -27
  88. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +0 -80
  89. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +0 -2
  90. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +0 -14
  91. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +0 -38
  92. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +0 -29
  93. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +0 -72
  94. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +0 -1
  95. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -27
  96. data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -11
  97. data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +0 -1
  98. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb +0 -26
  99. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +0 -56
  100. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md +0 -2
  101. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
  102. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +0 -26
  103. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +0 -52
  104. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +0 -26
  105. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -70
  106. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
  107. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +0 -15
  108. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +0 -43
  109. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb +0 -16
  110. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +0 -49
  111. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +0 -62
  112. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +0 -129
  113. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +0 -14
  114. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -18
  115. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -6
@@ -1,80 +0,0 @@
1
- import React from 'react'
2
-
3
- import Flex from '../../pb_flex/_flex'
4
- import FlexItem from '../../pb_flex/_flex_item'
5
- import gaugeTheme from '../gaugeTheme'
6
- import Highcharts from "highcharts"
7
- import HighchartsReact from "highcharts-react-official"
8
- import HighchartsMore from "highcharts/highcharts-more"
9
- import SolidGauge from "highcharts/modules/solid-gauge"
10
-
11
- HighchartsMore(Highcharts);
12
- SolidGauge(Highcharts);
13
-
14
- const GaugeSizing = (props) => (
15
- <div>
16
- <Flex
17
- align="center"
18
- wrap
19
- {...props}
20
- >
21
- <FlexItem
22
- fixedSize="400px"
23
- overflow="hidden"
24
- shrink
25
- {...props}
26
- >
27
- <HighchartsReact
28
- highcharts={Highcharts}
29
- options={Highcharts.merge({}, gaugeTheme, {
30
- series: [{ data: [{ name: "Point 1", y: 100 }] }],
31
- })}
32
- />
33
- </FlexItem>
34
- <FlexItem
35
- fixedSize="300px"
36
- overflow="hidden"
37
- shrink
38
- {...props}
39
- >
40
- <HighchartsReact
41
- highcharts={Highcharts}
42
- options={Highcharts.merge({}, gaugeTheme, {
43
- series: [{ data: [{ name: "Point 2", y: 75 }] }],
44
- })}
45
- />
46
- </FlexItem>
47
- <FlexItem
48
- fixedSize="200px"
49
- overflow="hidden"
50
- shrink
51
- {...props}
52
- >
53
- <HighchartsReact
54
- highcharts={Highcharts}
55
- options={Highcharts.merge({}, gaugeTheme, {
56
- series: [{ data: [{ name: "Point 3", y: 50 }] }],
57
- })}
58
- />
59
- </FlexItem>
60
- <FlexItem
61
- fixedSize="125px"
62
- overflow="hidden"
63
- shrink
64
- {...props}
65
- >
66
- <HighchartsReact
67
- highcharts={Highcharts}
68
- options={Highcharts.merge({}, gaugeTheme, {
69
- chart: {
70
- height: "100%",
71
- },
72
- series: [{ data: [{ name: "Point 4", y: 25 }] }],
73
- })}
74
- />
75
- </FlexItem>
76
- </Flex>
77
- </div>
78
- )
79
-
80
- export default GaugeSizing
@@ -1,2 +0,0 @@
1
- ### Gauge resizes dynamically to fit whatever element it's placed within.
2
- #### Note: set `overflow` to hidden on the parent element when nesting gauges inside of a flex items to best respond to shrinking screens.
@@ -1,14 +0,0 @@
1
- <% data = [
2
- {
3
- name: 'Score',
4
- value: 780,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "gauge-title",
10
- chart_data: data,
11
- min: 300,
12
- max: 850,
13
- title: "Credit Score",
14
- }) %>
@@ -1,38 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
-
8
- HighchartsMore(Highcharts);
9
- SolidGauge(Highcharts);
10
-
11
- const data = [{ name: "Score", y: 780 }]
12
-
13
- const baseOptions = {
14
- title: {
15
- text: "Credit Score",
16
- },
17
- yAxis: {
18
- min: 300,
19
- max: 850,
20
- },
21
- series: [{ data: data }],
22
- };
23
-
24
- const GaugeTitle = () => {
25
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
26
-
27
- return (
28
- <div>
29
- <HighchartsReact
30
- highcharts={Highcharts}
31
- id="gauge-title"
32
- options={options}
33
- />
34
- </div>
35
- );
36
- };
37
-
38
- export default GaugeTitle;
@@ -1,29 +0,0 @@
1
- <% data1 = [
2
- {
3
- name: 'Data Used',
4
- value: 32,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "gauge-units1",
10
- chart_data: data1,
11
- title: "Data Usage",
12
- suffix: "GB"
13
- }) %>
14
-
15
- <% data2 = [
16
- {
17
- name: 'Sales to Date',
18
- value: 65,
19
- }
20
- ]%>
21
-
22
- <%= pb_rails("gauge", props: {
23
- id: "gauge-units2",
24
- chart_data: data2,
25
- title: "Sales Goal",
26
- prefix: "$",
27
- suffix: "k",
28
-
29
- }) %>
@@ -1,72 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
- import colors from '../../tokens/exports/_colors.module.scss'
8
- import typography from '../../tokens/exports/_typography.module.scss'
9
-
10
- HighchartsMore(Highcharts);
11
- SolidGauge(Highcharts);
12
-
13
- const data1 = [
14
- { name: 'Data Used', y: 32 },
15
- ]
16
- const data2 = [
17
- { name: 'Sales to Date', y: 65 },
18
- ]
19
-
20
- const baseOptions1 = {
21
- title: {
22
- text: "Data Usage",
23
- },
24
- series: [{ data: data1 }],
25
- plotOptions: {
26
- solidgauge: {
27
- dataLabels: {
28
- format:
29
- `<span class="fix">{y:,f}</span>` +
30
- `<span style="fill: ${colors.text_lt_light}; font-size: ${typography.text_larger};">GB</span>`,
31
- },
32
- },
33
- },
34
- };
35
- const baseOptions2 = {
36
- title: {
37
- text: "Sales Goal",
38
- },
39
- series: [{ data: data2 }],
40
- plotOptions: {
41
- solidgauge: {
42
- dataLabels: {
43
- format:
44
- `<span y="28" style="fill: ${colors.text_lt_light}; font-size: ${typography.text_base};">$</span>` +
45
- `<span class="fix" y="38">{y:,f}</span>` +
46
- `<span style="fill: ${colors.text_lt_light}; font-size: ${typography.text_larger};">k</span>`,
47
- },
48
- },
49
- },
50
- };
51
-
52
- const GaugeUnits = () => {
53
- const options1 = Highcharts.merge({}, gaugeTheme, baseOptions1);
54
- const options2 = Highcharts.merge({}, gaugeTheme, baseOptions2);
55
-
56
- return (
57
- <div>
58
- <HighchartsReact
59
- highcharts={Highcharts}
60
- id="gauge-units1"
61
- options={options1}
62
- />
63
- <HighchartsReact
64
- highcharts={Highcharts}
65
- id="gauge-units2"
66
- options={options2}
67
- />
68
- </div>
69
- );
70
- };
71
-
72
- export default GaugeUnits;
@@ -1 +0,0 @@
1
- Use custom CSS with classes or inline styles (as shown in these docs) to customize the appearance of prefix and suffix units.
@@ -1,27 +0,0 @@
1
- examples:
2
-
3
- rails:
4
- - gauge_default: Default
5
- - gauge_disable_animation: Disable Animation
6
- - gauge_title: Title
7
- - gauge_units: Units
8
- - gauge_full_circle: Full Circle
9
- - gauge_min_max: Min Max Labels
10
- - gauge_sizing: Sizing
11
- - gauge_height: Height
12
- - gauge_colors: Color Overrides
13
- - gauge_complex: Complex
14
-
15
-
16
- react:
17
- - gauge_default: Default
18
- - gauge_disable_animation: Disable Animation
19
- - gauge_title: Title
20
- - gauge_units: Units
21
- - gauge_full_circle: Full Circle
22
- - gauge_min_max: Min Max Labels
23
- - gauge_sizing: Sizing
24
- - gauge_height: Height
25
- - gauge_live_data: Live Data
26
- - gauge_colors: Color Overrides
27
- - gauge_complex: Complex
@@ -1,11 +0,0 @@
1
- export { default as GaugeDefault } from './_gauge_default.jsx'
2
- export { default as GaugeDisableAnimation } from './_gauge_disable_animation.jsx'
3
- export { default as GaugeFullCircle } from './_gauge_full_circle.jsx'
4
- export { default as GaugeHeight } from './_gauge_height.jsx'
5
- export { default as GaugeMinMax } from './_gauge_min_max.jsx'
6
- export { default as GaugeSizing } from './_gauge_sizing.jsx'
7
- export { default as GaugeTitle } from './_gauge_title.jsx'
8
- export { default as GaugeUnits } from './_gauge_units.jsx'
9
- export { default as GaugeLiveData } from './_gauge_live_data.jsx'
10
- export { default as GaugeColors } from './_gauge_colors.jsx'
11
- export { default as GaugeComplex } from './_gauge_complex.jsx'
@@ -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 lineGraphTheme.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,26 +0,0 @@
1
- <% data = [{
2
- name: 'Installation',
3
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
4
- }, {
5
- name: 'Manufacturing',
6
- data: [24916, 28064, 29742, 40851, 50590, 65282, 70121, 85434]
7
- }, {
8
- name: 'Sales & Distribution',
9
- data: [11744, 17722, 16005, 19771, 25185, 28377, 36147, 43387]
10
- }, {
11
- name: 'Project Development',
12
- data: [5332, 6344, 7988, 12169, 15112, 14452, 22400, 30227]
13
- }, {
14
- name: 'Other',
15
- data: [nil, nil, nil, 3112, 4989, 5816, 15274, 18111]
16
- }] %>
17
-
18
- <%= pb_rails("line_graph", props: {
19
- id: "line-colors",
20
- gradient: false,
21
- chart_data: data,
22
- x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
23
- title: 'Line Graph with Custom Data Colors',
24
- axis_title: 'Number of Employees',
25
- colors: ['data-4', 'data-5', 'data-6', 'data-7', 'data-8']
26
- }) %>
@@ -1,56 +0,0 @@
1
- import React from 'react'
2
- import lineGraphTheme from '../lineGraphTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import colors from '../../tokens/exports/_colors.module.scss'
6
-
7
- const data = [{
8
- name: 'Installation',
9
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
10
- }, {
11
- name: 'Manufacturing',
12
- data: [24916, 28064, 29742, 40851, 50590, 65282, 70121, 85434],
13
- }, {
14
- name: 'Sales & Distribution',
15
- data: [11744, 17722, 16005, 19771, 25185, 28377, 36147, 43387],
16
- }, {
17
- name: 'Project Development',
18
- data: [5332, 6344, 7988, 12169, 15112, 14452, 22400, 30227],
19
- }, {
20
- name: 'Other',
21
- data: [null, null, null, 3112, 4989, 5816, 15274, 18111],
22
- }]
23
-
24
- const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
25
-
26
- const LineGraphColors = () => {
27
- const chartOptions = {
28
- title: {
29
- text: 'Line Graph with Custom Data Colors',
30
- },
31
- xAxis: {
32
- categories: categories,
33
- },
34
- yAxis: {
35
- min: 0,
36
- title: {
37
- text: 'Number of Employees',
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
- }
55
-
56
- export default LineGraphColors
@@ -1,2 +0,0 @@
1
- Custom data colors allow for color customization to match the needs of business requirements.
2
- Pass the prop `colors` and use desired values `data-1 | data-2 | data-3 | data-4 | data-5 | data-6 | data-7 | data-8` in an array. Hex colors are also available `eg: #CA0095`
@@ -1,3 +0,0 @@
1
-
2
- Custom data colors allow for color customization to match the needs of business requirements.
3
- Import the colors from Playbook's tokens, then set custom colors in the colors array using the desired color variables. Hex colors are also available `eg: #CA0095`.
@@ -1,26 +0,0 @@
1
- <% data = [{
2
- name: 'Installation',
3
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
4
- }, {
5
- name: 'Manufacturing',
6
- data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
7
- }, {
8
- name: 'Sales & Distribution',
9
- data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
10
- }, {
11
- name: 'Project Development',
12
- data: [nil, nil, 7988, 12169, 15112, 22452, 34400, 34227]
13
- }, {
14
- name: 'Other',
15
- data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
16
- }] %>
17
-
18
- <%= pb_rails("line_graph", props: {
19
- id: "line-default",
20
- gradient: false,
21
- chart_data: data,
22
- x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
23
- title: 'Solar Employment Growth by Sector, 2010-2016',
24
- subtitle: 'Source: thesolarfoundation.com',
25
- axis_title: 'Number of Employees'
26
- }) %>
@@ -1,52 +0,0 @@
1
- import React from 'react'
2
- import lineGraphTheme from '../lineGraphTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
-
6
- const data = [{
7
- name: 'Installation',
8
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
9
- }, {
10
- name: 'Manufacturing',
11
- data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
12
- }, {
13
- name: 'Sales & Distribution',
14
- data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
15
- }, {
16
- name: 'Project Development',
17
- data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
18
- }, {
19
- name: 'Other',
20
- data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
21
- }]
22
-
23
- const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
24
-
25
- const chartOptions = {
26
- series: data,
27
- title: { text: "Solar Employment Growth by Sector, 2010-2016" },
28
- subtitle: { text: "Source: thesolarfoundation.com" },
29
- xAxis: {
30
- categories: categories,
31
- },
32
- yAxis: {
33
- title: {
34
- text: "Number of Employees",
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
- }
51
-
52
- export default LineGraphDefault
@@ -1,26 +0,0 @@
1
- <% data = [{
2
- name: 'Number of Installations',
3
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
4
- }] %>
5
-
6
- <%= pb_rails("line_graph", props: {
7
- id: "line-fixed-height",
8
- gradient: false,
9
- chart_data: data,
10
- x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
11
- title: 'Fixed Height (300px)',
12
- axis_title: 'Number of Employees',
13
- height: '300'
14
- }) %>
15
-
16
- <br /><br />
17
-
18
- <%= pb_rails("line_graph", props: {
19
- id: "line-precentage-height",
20
- gradient: false,
21
- chart_data: data,
22
- x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
23
- title: 'Percentage Height (50%)',
24
- axis_title: 'Number of Employees',
25
- height: '50%'
26
- }) %>
@@ -1,70 +0,0 @@
1
- import React from 'react'
2
- import lineGraphTheme from '../lineGraphTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
-
6
- const data = [{
7
- name: 'Number of Installations',
8
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
9
- }]
10
-
11
- const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
12
-
13
- const LineGraphHeight = () => {
14
- const chartOptionsFirst = {
15
- title: {
16
- text: 'Fixed Height (300px)',
17
- },
18
- chart: {
19
- height: '300px'
20
- },
21
- xAxis: {
22
- categories: categories,
23
- },
24
- yAxis: {
25
- min: 0,
26
- title: {
27
- text: 'Number of Employees',
28
- },
29
- },
30
- series: data
31
- }
32
-
33
- const chartOptionsSecond = {
34
- title: {
35
- text: 'Percentage Height (50%)',
36
- },
37
- chart: {
38
- height: '50%'
39
- },
40
- xAxis: {
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
@@ -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,15 +0,0 @@
1
- <% data = [{
2
- name: 'Number of Installations',
3
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
4
- }] %>
5
-
6
- <%= pb_rails("line_graph", props: {
7
- id: "line-test-2",
8
- gradient: false,
9
- chart_data: data,
10
- x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug'],
11
- title: 'Line Graph with Legend',
12
- axis_title: 'Number of Employees',
13
- legend: true
14
- }) %>
15
-
@@ -1,43 +0,0 @@
1
- import React from 'react'
2
- import lineGraphTheme from '../lineGraphTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
-
6
- const data = [{
7
- name: 'Number of Installations',
8
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
9
- }]
10
-
11
- const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']
12
-
13
- const chartOptions = {
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
@@ -1,16 +0,0 @@
1
- <% data = [{
2
- name: 'Number of Installations',
3
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
4
- }] %>
5
-
6
- <%= pb_rails("line_graph", props: {
7
- id: "line-test-3",
8
- gradient: false,
9
- chart_data: data,
10
- x_axis_categories: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug'],
11
- title: 'Line Graph with Legend Non Clickable',
12
- axis_title: 'Number of Employees',
13
- legend: true,
14
- toggle_legend_click: false,
15
- }) %>
16
-