playbook_ui 14.22.0.pre.alpha.PLAY22578709 → 14.22.0.pre.alpha.PLAY22958842

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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_badge/_badge.scss +5 -6
  3. data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +106 -0
  4. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +33 -15
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +33 -15
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +52 -22
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +3 -0
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +12 -16
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +31 -15
  10. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +39 -16
  11. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +86 -38
  12. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +32 -15
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +72 -22
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +1 -1
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +31 -15
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +37 -16
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +1 -3
  18. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -3
  19. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -2
  20. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +36 -1
  21. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +71 -26
  22. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +29 -16
  23. data/app/pb_kits/playbook/pb_circle_chart/docs/{_circle_chart_colors.md → _circle_chart_colors_rails.md} +1 -1
  24. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +2 -0
  25. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +28 -16
  26. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +4 -2
  27. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +23 -15
  28. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +81 -51
  29. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +103 -75
  30. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +3 -6
  31. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +19 -13
  32. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +30 -17
  33. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +34 -20
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +29 -20
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +28 -20
  36. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +1 -0
  37. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -1
  38. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -1
  39. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +4 -12
  40. data/app/pb_kits/playbook/pb_draggable/context/types.ts +2 -5
  41. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.html.erb +14 -0
  42. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open_rails.md +1 -0
  43. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +1 -0
  44. data/app/pb_kits/playbook/pb_tooltip/index.js +59 -36
  45. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +9 -2
  46. data/dist/chunks/_circle_chart-BjcInQNv.js +1 -0
  47. data/dist/chunks/{_typeahead-BZsshVoi.js → _typeahead-CuwY9iVi.js} +3 -3
  48. data/dist/chunks/{_weekday_stacked-DO4S-plL.js → _weekday_stacked-C3EeTZ8D.js} +1 -1
  49. data/dist/chunks/{lib-Carqm8Ip.js → lib-DYpq0k8j.js} +1 -1
  50. data/dist/chunks/{pb_form_validation-DqRmTS8m.js → pb_form_validation-BUOKwfvW.js} +1 -1
  51. data/dist/chunks/vendor.js +1 -1
  52. data/dist/menu.yml +68 -8
  53. data/dist/playbook-doc.js +1 -1
  54. data/dist/playbook-rails-react-bindings.js +1 -1
  55. data/dist/playbook-rails.js +1 -1
  56. data/dist/playbook.css +1 -1
  57. data/lib/playbook/version.rb +1 -1
  58. metadata +15 -14
  59. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +0 -72
  60. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +0 -6
  61. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +0 -64
  62. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +0 -1
  63. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +0 -38
  64. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +0 -1
  65. /data/app/pb_kits/playbook/pb_tooltip/docs/{_tooltip_click_open.md → _tooltip_click_open_react.md} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee237263c36fb6a79f0ab854b478c11dd52c0c36d7656bc442ff647b27831c45
4
- data.tar.gz: d957832e4ab49ccaafa61a17e6e850682d9c96ec164e32ca46b3266638ddd024
3
+ metadata.gz: 3de603024c411735f4b6673b7c73777346e08a9b2e8d7dcce3340443d29b9901
4
+ data.tar.gz: ca20dcd09408cba7ba7dd9a9967940929ddd63b223810d63b16fa37ca8a8aaed
5
5
  SHA512:
6
- metadata.gz: 4e1f0a36db1c3fa7e9c136ed3e5f6bcd95e691e5617e4bc03a79fe96e3e6b356d64990396301cf87ebfcfef946515ed4e7e1336b970ee9d06f86a5fd490e50eb
7
- data.tar.gz: bfd00edc136aa357808e6afc06022818c225deffaa1d912ebc1d1d98bb8d2064e937d950a3b7578c917889176dcd392be9877b666d48eaf7f3bfe1b2cac0d7a4
6
+ metadata.gz: 3ec985ee66de08ee512f089eb0e96b0e35d50453ea46bd9d81065ed05886b1bc0311d9f7eda4fae5d993851dc5dc263a8e9b118398c2a5e720cfd1508c5159d9
7
+ data.tar.gz: 4b01826de7c7604e8d91e4844037cb788fc0d57000057b9e41352598c8f5f737255ad15f86d52be9fe7157918f5e9092f815a65cb3efaa0fb435f5b5a44fa0f5
@@ -5,7 +5,7 @@
5
5
  @import "../tokens/typography";
6
6
 
7
7
  [class^=pb_badge_kit] {
8
- $pb_badge_height: 18px;
8
+ $pb_badge_height_rounded: 16px;
9
9
 
10
10
  display: inline-flex;
11
11
  align-items: center;
@@ -13,7 +13,6 @@
13
13
  border-radius: $border_rad_light;
14
14
  padding: 0 $space_xs/2;
15
15
  border-width: 1px;
16
- border-style: solid;
17
16
  border-color: $card_light;
18
17
  white-space: nowrap;
19
18
 
@@ -31,10 +30,10 @@
31
30
  }
32
31
 
33
32
  &[class*=_rounded] {
34
- height: $pb_badge_height;
35
- min-height: $pb_badge_height;
36
- min-width: $pb_badge_height;
37
- border-radius: $pb_badge_height / 2;
33
+ height: $pb_badge_height_rounded;
34
+ min-height: $pb_badge_height_rounded;
35
+ min-width: $pb_badge_height_rounded;
36
+ border-radius: $pb_badge_height_rounded / 2;
38
37
  }
39
38
 
40
39
  &[class*=_notification] {
@@ -0,0 +1,106 @@
1
+ import colors from '../tokens/exports/_colors.module.scss'
2
+ import typography from '../tokens/exports/_typography.module.scss'
3
+
4
+ const barGraphTheme = {
5
+ title: {
6
+ text: "",
7
+ style: {
8
+ color: colors.text_lt_default,
9
+ fontFamily: typography.font_family_base,
10
+ fontWeight: typography.bold,
11
+ fontSize: typography.heading_3,
12
+ },
13
+ },
14
+ subtitle: {
15
+ text: "",
16
+ style: {
17
+ fontFamily: typography.font_family_base,
18
+ color: colors.text_lt_light,
19
+ fontWeight: typography.regular,
20
+ fontSize: typography.text_base,
21
+ },
22
+ },
23
+ chart: {
24
+ type: "column",
25
+ },
26
+ tooltip: {
27
+ backgroundColor: {
28
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
29
+ stops: [
30
+ [0, colors.bg_dark],
31
+ [1, colors.bg_dark],
32
+ ],
33
+ },
34
+ style: {
35
+ fontFamily: typography.font_family_base,
36
+ color: colors.text_dk_default,
37
+ fontWeight: typography.regular,
38
+ fontSize: typography.text_smaller,
39
+ },
40
+ },
41
+ colors: [
42
+ colors.data_1,
43
+ colors.data_2,
44
+ colors.data_3,
45
+ colors.data_4,
46
+ colors.data_5,
47
+ colors.data_6,
48
+ colors.data_7,
49
+ ],
50
+ credits: { enabled: false },
51
+ legend: {
52
+ enabled: false,
53
+ itemStyle: {
54
+ color: colors.text_lt_light,
55
+ fill: colors.text_lt_light,
56
+ fontSize: typography.text_smaller,
57
+ },
58
+ },
59
+ xAxis: {
60
+ gridLineWidth: 0,
61
+ lineColor: colors.border_light,
62
+ tickColor: colors.border_light,
63
+ labels: {
64
+ style: {
65
+ fontFamily: typography.font_family_base,
66
+ color: colors.text_lt_lighter,
67
+ fontWeight: typography.bold,
68
+ fontSize: typography.text_smaller,
69
+ },
70
+ },
71
+ title: {
72
+ style: {
73
+ color: colors.text_lt_default,
74
+ fontFamily: typography.font_family_base,
75
+ fontWeight: typography.regular,
76
+ fontSize: typography.heading_4,
77
+ },
78
+ },
79
+ },
80
+ yAxis: {
81
+ alternateGridColor: undefined as string | undefined,
82
+ minorTickInterval: null as number | null,
83
+ gridLineColor: colors.border_light,
84
+ minorGridLineColor: colors.border_light,
85
+ lineWidth: 0,
86
+ tickWidth: 0,
87
+ labels: {
88
+ style: {
89
+ fontFamily: typography.font_family_base,
90
+ color: colors.text_lt_lighter,
91
+ fontWeight: typography.bold,
92
+ fontSize: typography.text_smaller,
93
+ },
94
+ },
95
+ title: {
96
+ style: {
97
+ fontFamily: typography.font_family_base,
98
+ color: colors.text_lt_lighter,
99
+ fontWeight: typography.bold,
100
+ fontSize: typography.text_smaller,
101
+ },
102
+ },
103
+ },
104
+ }
105
+
106
+ export default barGraphTheme;
@@ -1,6 +1,10 @@
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
+
2
7
 
3
- import BarGraph from '../_bar_graph'
4
8
 
5
9
  const chartData = [{
6
10
  name: 'Installation',
@@ -19,19 +23,33 @@ const chartData = [{
19
23
  data: [1111, 677, 3245, 500, 200],
20
24
  }]
21
25
 
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
- )
26
+ const chartOptions = {
27
+ series: chartData,
28
+ title: {
29
+ text: "Bar Graph with Custom Data Colors",
30
+ },
31
+ xAxis: {
32
+ categories: ["Jan", "Feb", "Mar", "Apr", "May"],
33
+ },
34
+ yAxis: {
35
+ title: {
36
+ text: "Number of Employees",
37
+ },
38
+ },
39
+ colors: [colors.data_4, colors.data_5, colors.data_6, colors.data_7, colors.data_8],
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
+ }
36
54
 
37
55
  export default BarGraphColors
@@ -1,6 +1,8 @@
1
1
  import React from 'react'
2
+ import barGraphTheme from '../barGraphTheme';
3
+ import Highcharts from "highcharts";
4
+ import HighchartsReact from "highcharts-react-official";
2
5
 
3
- import BarGraph from '../_bar_graph'
4
6
 
5
7
  const chartData = [{
6
8
  name: 'Installation',
@@ -19,19 +21,35 @@ const chartData = [{
19
21
  data: [1111, 677, 3245, 500, 200],
20
22
  }]
21
23
 
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
- )
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
+ }
36
54
 
37
55
  export default BarGraphDefault
@@ -1,39 +1,69 @@
1
1
  import React from 'react'
2
+ import barGraphTheme from '../barGraphTheme';
3
+ import Highcharts from "highcharts";
4
+ import HighchartsReact from "highcharts-react-official";
2
5
 
3
- import BarGraph from '../_bar_graph'
4
6
 
5
7
  const chartData = [{
6
8
  name: 'Number of Installations',
7
9
  data: [1475, 200, 3000, 654, 656],
8
10
  }]
9
11
 
10
- const BarGraphDefault = (props) => (
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 = () => (
11
53
  <div>
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
- />
54
+ <HighchartsReact
55
+ highcharts={Highcharts}
56
+ options={pixelOptions}
57
+ />
22
58
 
23
59
  <br />
24
60
  <br />
25
61
 
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}
62
+ <HighchartsReact
63
+ highcharts={Highcharts}
64
+ options={percentageOptions}
35
65
  />
36
66
  </div>
37
67
  )
38
68
 
39
- export default BarGraphDefault
69
+ export default BarGraphHeight
@@ -0,0 +1,3 @@
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,9 +1,10 @@
1
1
  import React from 'react'
2
+ import barGraphTheme from '../barGraphTheme';
3
+ import Highcharts from "highcharts";
4
+ import HighchartsReact from "highcharts-react-official";
2
5
 
3
- import BarGraph from '../_bar_graph'
4
6
 
5
-
6
- const barGraphOptions = {
7
+ const chartOptions = {
7
8
  chart: {
8
9
  type: 'bar'
9
10
  },
@@ -22,13 +23,8 @@ const barGraphOptions = {
22
23
  lineWidth: 0
23
24
  },
24
25
  yAxis: {
25
- min: 0,
26
26
  title: {
27
- text: 'Population (millions)',
28
- align: 'high'
29
- },
30
- labels: {
31
- overflow: 'justify'
27
+ text: '',
32
28
  },
33
29
  },
34
30
  tooltip: {
@@ -51,16 +47,16 @@ const barGraphOptions = {
51
47
  }, {
52
48
  name: 'Year 2018',
53
49
  data: [1276, 1007, 4561, 746]
54
- }]
50
+ }],
55
51
  }
56
52
 
57
- const BarGraphHorizontal = (props) => (
53
+ const options = Highcharts.merge({}, barGraphTheme, chartOptions)
54
+
55
+ const BarGraphHorizontal = () => (
58
56
  <div>
59
- <BarGraph
60
- customOptions={barGraphOptions}
61
- id="bar-horizontal"
62
- yAxisMin={0}
63
- {...props}
57
+ <HighchartsReact
58
+ highcharts={Highcharts}
59
+ options={options}
64
60
  />
65
61
  </div>
66
62
  )
@@ -1,24 +1,40 @@
1
1
  import React from 'react'
2
- import BarGraph from "../../pb_bar_graph/_bar_graph"
2
+ import barGraphTheme from '../barGraphTheme';
3
+ import Highcharts from "highcharts";
4
+ import HighchartsReact from "highcharts-react-official";
5
+
3
6
 
4
7
  const chartData = [{
5
8
  name: 'Number of Installations',
6
9
  data: [1475, 200, 3000, 654, 656],
7
10
  }]
8
11
 
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
- )
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
+ }
23
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
+ }
24
40
  export default BarGraphLegend
@@ -1,25 +1,48 @@
1
1
  import React from 'react'
2
- import BarGraph from "../../pb_bar_graph/_bar_graph"
2
+ import barGraphTheme from '../barGraphTheme';
3
+ import Highcharts from "highcharts";
4
+ import HighchartsReact from "highcharts-react-official";
5
+
3
6
 
4
7
  const chartData = [{
5
8
  name: 'Number of Installations',
6
9
  data: [1475, 200, 3000, 654, 656],
7
10
  }]
8
11
 
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
- )
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
+ }
24
47
 
25
48
  export default BarGraphLegendNonClickable