playbook_ui_docs 15.7.0.pre.alpha.play258013248 → 15.7.0.pre.alpha.play270013252
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
- metadata +1 -112
- 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,142 +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 dataFirst = [
|
|
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 dataSecond = [{
|
|
23
|
-
name: 'Bugs',
|
|
24
|
-
y: 8,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'Chores',
|
|
28
|
-
y: 1,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'Stories',
|
|
32
|
-
y: 12,
|
|
33
|
-
}]
|
|
34
|
-
|
|
35
|
-
const dataThird = [
|
|
36
|
-
{
|
|
37
|
-
name: 'Queued',
|
|
38
|
-
y: 7,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'In Progress',
|
|
42
|
-
y: 6,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'Validation',
|
|
46
|
-
y: 3,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: 'Done',
|
|
50
|
-
y: 6,
|
|
51
|
-
},
|
|
52
|
-
]
|
|
53
|
-
|
|
54
|
-
const CircleChartLegendPosition = (props) => {
|
|
55
|
-
const chartOptionsFirst = {
|
|
56
|
-
title: { text: "Alignment of Legend" },
|
|
57
|
-
series: [{ data: dataFirst }],
|
|
58
|
-
legend: {
|
|
59
|
-
align: 'right',
|
|
60
|
-
verticalAlign: 'top'
|
|
61
|
-
},
|
|
62
|
-
plotOptions: {
|
|
63
|
-
pie: {
|
|
64
|
-
showInLegend: true
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const chartOptionsSecond = {
|
|
70
|
-
title: { text: "Layout of Legend" },
|
|
71
|
-
series: [{ data: dataSecond }],
|
|
72
|
-
legend: {
|
|
73
|
-
layout: 'vertical'
|
|
74
|
-
},
|
|
75
|
-
plotOptions: {
|
|
76
|
-
pie: {
|
|
77
|
-
showInLegend: true
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const chartOptionsThird = {
|
|
83
|
-
title: { text: "Offset of Legend" },
|
|
84
|
-
series: [{ data: dataThird }],
|
|
85
|
-
legend: {
|
|
86
|
-
layout: 'vertical',
|
|
87
|
-
x: 100,
|
|
88
|
-
y: 10
|
|
89
|
-
},
|
|
90
|
-
plotOptions: {
|
|
91
|
-
pie: {
|
|
92
|
-
showInLegend: true
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const optionsFirst = Highcharts.merge({}, circleChartTheme, chartOptionsFirst)
|
|
98
|
-
const optionsSecond = Highcharts.merge({}, circleChartTheme, chartOptionsSecond)
|
|
99
|
-
const optionsThird = Highcharts.merge({}, circleChartTheme, chartOptionsThird)
|
|
100
|
-
|
|
101
|
-
return (
|
|
102
|
-
<div>
|
|
103
|
-
<Title
|
|
104
|
-
paddingY="sm"
|
|
105
|
-
size={4}
|
|
106
|
-
tag="h4"
|
|
107
|
-
text="align | verticalAlign"
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
<HighchartsReact
|
|
111
|
-
highcharts={Highcharts}
|
|
112
|
-
options={optionsFirst}
|
|
113
|
-
/>
|
|
114
|
-
|
|
115
|
-
<Title
|
|
116
|
-
paddingY="sm"
|
|
117
|
-
size={4}
|
|
118
|
-
tag="h4"
|
|
119
|
-
text="layout"
|
|
120
|
-
{...props}
|
|
121
|
-
/>
|
|
122
|
-
<HighchartsReact
|
|
123
|
-
highcharts={Highcharts}
|
|
124
|
-
options={optionsSecond}
|
|
125
|
-
/>
|
|
126
|
-
|
|
127
|
-
<Title
|
|
128
|
-
paddingY="sm"
|
|
129
|
-
size={4}
|
|
130
|
-
tag="h4"
|
|
131
|
-
text="x | y"
|
|
132
|
-
{...props}
|
|
133
|
-
/>
|
|
134
|
-
<HighchartsReact
|
|
135
|
-
highcharts={Highcharts}
|
|
136
|
-
options={optionsThird}
|
|
137
|
-
/>
|
|
138
|
-
</div>
|
|
139
|
-
)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export default CircleChartLegendPosition
|
|
@@ -1,14 +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
|
-
`layout` determines the position of the legend items
|
|
10
|
-
`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.
|
|
11
|
-
|
|
12
|
-
`x` offsets the legend relative to its horizontal alignment. Negative x moves it to the left, positive x moves it to the right
|
|
13
|
-
|
|
14
|
-
`y` offsets the legend relative to its vertical alignment. Negative y moves it up, positive y moves it down.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import circleChartTheme from '../circleChartTheme'
|
|
3
|
-
import Highcharts from "highcharts"
|
|
4
|
-
import HighchartsReact from "highcharts-react-official"
|
|
5
|
-
import Button from '../../pb_button/_button'
|
|
6
|
-
|
|
7
|
-
const CircleChartLiveData = (props) => {
|
|
8
|
-
const [data, setData] = useState([
|
|
9
|
-
{
|
|
10
|
-
name: 'Waiting for Calls',
|
|
11
|
-
y: 41,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name: 'On Call',
|
|
15
|
-
y: 49,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'After Call',
|
|
19
|
-
y: 10,
|
|
20
|
-
},
|
|
21
|
-
])
|
|
22
|
-
|
|
23
|
-
const data2 = [
|
|
24
|
-
{
|
|
25
|
-
name: 'Waiting for Calls',
|
|
26
|
-
y: 48,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'On Call',
|
|
30
|
-
y: 12,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'After Call',
|
|
34
|
-
y: 140,
|
|
35
|
-
},
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
const updateValue = () => {
|
|
39
|
-
setData(data2)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const chartOptions = {
|
|
43
|
-
series: [{ data: data }],
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const options = Highcharts.merge({}, circleChartTheme, chartOptions)
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<div>
|
|
50
|
-
<Button
|
|
51
|
-
onClick={updateValue}
|
|
52
|
-
text="Update Value"
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
<HighchartsReact
|
|
56
|
-
highcharts={Highcharts}
|
|
57
|
-
options={options}
|
|
58
|
-
/>
|
|
59
|
-
</div>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export default CircleChartLiveData
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<% data_rounded = [{
|
|
2
|
-
name: 'Waiting for Calls',
|
|
3
|
-
value: 20,
|
|
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_rounded,
|
|
18
|
-
id: "default-test-rounded",
|
|
19
|
-
inner_size: "lg",
|
|
20
|
-
rounded: true,
|
|
21
|
-
|
|
22
|
-
}) %>
|
|
@@ -1,45 +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 dataRounded = [
|
|
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 CircleChartRounded = () => {
|
|
22
|
-
const chartOptions = {
|
|
23
|
-
series: [{ data: dataRounded }],
|
|
24
|
-
plotOptions: {
|
|
25
|
-
pie: {
|
|
26
|
-
borderColor: null,
|
|
27
|
-
borderWidth: 20,
|
|
28
|
-
innerSize: '100%',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const options = Highcharts.merge({}, circleChartTheme, chartOptions)
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<div>
|
|
37
|
-
<HighchartsReact
|
|
38
|
-
highcharts={Highcharts}
|
|
39
|
-
options={options}
|
|
40
|
-
/>
|
|
41
|
-
</div>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export default CircleChartRounded
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<% data = [{
|
|
2
|
-
name: 'Facebook',
|
|
3
|
-
value: 2498,
|
|
4
|
-
},
|
|
5
|
-
{
|
|
6
|
-
name: 'YouTube',
|
|
7
|
-
value: 2000,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'WhatsApp',
|
|
11
|
-
value: 2000,
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: 'Facebook Messenger',
|
|
16
|
-
value: 1300,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: 'WeChat',
|
|
20
|
-
value: 1165,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Instagram',
|
|
24
|
-
value: 1000,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'Tik Tok',
|
|
28
|
-
value: 800,
|
|
29
|
-
},
|
|
30
|
-
] %>
|
|
31
|
-
|
|
32
|
-
<%= pb_rails("circle_chart", props: {
|
|
33
|
-
style: "pie",
|
|
34
|
-
chart_data: data,
|
|
35
|
-
id: "with-labels-example",
|
|
36
|
-
data_labels: true
|
|
37
|
-
}) %>
|
|
@@ -1,61 +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 dataWithLabels = [
|
|
7
|
-
{
|
|
8
|
-
name: 'Facebook',
|
|
9
|
-
y: 2498,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: 'YouTube',
|
|
13
|
-
y: 2000,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'WhatsApp',
|
|
17
|
-
y: 2000,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: 'Facebook Messenger',
|
|
21
|
-
y: 1300,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: 'WeChat',
|
|
25
|
-
y: 1165,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'Instagram',
|
|
29
|
-
y: 1000,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'Tik Tok',
|
|
33
|
-
y: 800,
|
|
34
|
-
},
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
const CircleChartWithLabels = () => {
|
|
38
|
-
const chartOptions = {
|
|
39
|
-
series: [{ data: dataWithLabels }],
|
|
40
|
-
plotOptions: {
|
|
41
|
-
pie: {
|
|
42
|
-
dataLabels: {
|
|
43
|
-
enabled: true,
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const options = Highcharts.merge({}, circleChartTheme, chartOptions)
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<div>
|
|
53
|
-
<HighchartsReact
|
|
54
|
-
highcharts={Highcharts}
|
|
55
|
-
options={options}
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export default CircleChartWithLabels
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<% data_1 = [{
|
|
2
|
-
name: 'Bugs',
|
|
3
|
-
value: 8,
|
|
4
|
-
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
name: 'Chores',
|
|
8
|
-
value: 1,
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: 'Stories',
|
|
13
|
-
value: 12,
|
|
14
|
-
}
|
|
15
|
-
] %>
|
|
16
|
-
|
|
17
|
-
<%= pb_rails("circle_chart", props: {
|
|
18
|
-
style: "pie",
|
|
19
|
-
chart_data: data_1,
|
|
20
|
-
legend: true,
|
|
21
|
-
id: "with-legend-example",
|
|
22
|
-
}) %>
|
|
@@ -1,41 +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 dataWithLegend = [{
|
|
7
|
-
name: 'Bugs',
|
|
8
|
-
y: 8,
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: 'Chores',
|
|
12
|
-
y: 1,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: 'Stories',
|
|
16
|
-
y: 12,
|
|
17
|
-
}]
|
|
18
|
-
|
|
19
|
-
const CircleChartWithLegendKit = () => {
|
|
20
|
-
const chartOptions = {
|
|
21
|
-
series: [{ data: dataWithLegend }],
|
|
22
|
-
plotOptions: {
|
|
23
|
-
pie: {
|
|
24
|
-
showInLegend: true
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const options = Highcharts.merge({}, circleChartTheme, chartOptions)
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<div>
|
|
33
|
-
<HighchartsReact
|
|
34
|
-
highcharts={Highcharts}
|
|
35
|
-
options={options}
|
|
36
|
-
/>
|
|
37
|
-
</div>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default CircleChartWithLegendKit
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<% data_5 = [{
|
|
2
|
-
name: 'Facebook',
|
|
3
|
-
value: 2498,
|
|
4
|
-
},
|
|
5
|
-
{
|
|
6
|
-
name: 'YouTube',
|
|
7
|
-
value: 2000,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'WhatsApp',
|
|
11
|
-
value: 2000,
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: 'Facebook Messenger',
|
|
16
|
-
value: 1300,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: 'WeChat',
|
|
20
|
-
value: 1165,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Instagram',
|
|
24
|
-
value: 1000,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'Tik Tok',
|
|
28
|
-
value: 800,
|
|
29
|
-
},
|
|
30
|
-
] %>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<%= pb_rails("circle_chart", props: {
|
|
34
|
-
style: "pie",
|
|
35
|
-
title: "Active Users on Social Media",
|
|
36
|
-
chart_data: data_5,
|
|
37
|
-
id: "with-caption-example",
|
|
38
|
-
}) %>
|
|
@@ -1,55 +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 dataWithTitle = [
|
|
7
|
-
{
|
|
8
|
-
name: 'Facebook',
|
|
9
|
-
y: 2498,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: 'YouTube',
|
|
13
|
-
y: 2000,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'WhatsApp',
|
|
17
|
-
y: 2000,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: 'Facebook Messenger',
|
|
21
|
-
y: 1300,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: 'WeChat',
|
|
25
|
-
y: 1165,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'Instagram',
|
|
29
|
-
y: 1000,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'Tik Tok',
|
|
33
|
-
y: 800,
|
|
34
|
-
},
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
const CircleChartWithTitle = () => {
|
|
38
|
-
const chartOptions = {
|
|
39
|
-
title: { text: "Active Users on Social Media" },
|
|
40
|
-
series: [{ data: dataWithTitle }],
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const options = Highcharts.merge({}, circleChartTheme, chartOptions)
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<div>
|
|
47
|
-
<HighchartsReact
|
|
48
|
-
highcharts={Highcharts}
|
|
49
|
-
options={options}
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export default CircleChartWithTitle
|
|
@@ -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 circleChartTheme.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
|
-
examples:
|
|
2
|
-
|
|
3
|
-
rails:
|
|
4
|
-
- circle_chart_default: Default Style
|
|
5
|
-
- circle_chart_rounded: Rounded Corners
|
|
6
|
-
- circle_chart_block: Accepts Any Block
|
|
7
|
-
- circle_chart_colors: Color Overrides
|
|
8
|
-
- circle_chart_with_labels: Data Labels
|
|
9
|
-
- circle_chart_with_legend_kit: Legend
|
|
10
|
-
- circle_chart_legend_position: Legend Position
|
|
11
|
-
- circle_chart_with_title: Title
|
|
12
|
-
- circle_chart_inner_sizes: Inner Circle Size Options
|
|
13
|
-
- circle_chart_custom_tooltip: Tooltip Customization
|
|
14
|
-
|
|
15
|
-
react:
|
|
16
|
-
- circle_chart_default: Default Style
|
|
17
|
-
- circle_chart_live_data: Live Data
|
|
18
|
-
- circle_chart_rounded: Rounded Corners
|
|
19
|
-
- circle_chart_block: Accepts Any Block
|
|
20
|
-
- circle_chart_colors: Color Overrides
|
|
21
|
-
- circle_chart_with_labels: Data Labels
|
|
22
|
-
- circle_chart_with_legend_kit: Legend
|
|
23
|
-
- circle_chart_legend_position: Legend Position
|
|
24
|
-
- circle_chart_with_title: Title
|
|
25
|
-
- circle_chart_inner_sizes: Inner Circle Size Options
|
|
26
|
-
- circle_chart_custom_tooltip: Tooltip Customization
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { default as CircleChartDefault } from './_circle_chart_default.jsx'
|
|
2
|
-
export { default as CircleChartLiveData } from './_circle_chart_live_data.jsx'
|
|
3
|
-
export { default as CircleChartRounded } from './_circle_chart_rounded.jsx'
|
|
4
|
-
export { default as CircleChartBlock } from './_circle_chart_block.jsx'
|
|
5
|
-
export { default as CircleChartColors } from './_circle_chart_colors.jsx'
|
|
6
|
-
export { default as CircleChartWithLabels } from './_circle_chart_with_labels.jsx'
|
|
7
|
-
export { default as CircleChartWithLegendKit } from './_circle_chart_with_legend_kit.jsx'
|
|
8
|
-
export { default as CircleChartLegendPosition } from './_circle_chart_legend_position.jsx'
|
|
9
|
-
export { default as CircleChartWithTitle } from './_circle_chart_with_title.jsx'
|
|
10
|
-
export { default as CircleChartInnerSizes } from './_circle_chart_inner_sizes.jsx'
|
|
11
|
-
export { default as CircleChartCustomTooltip } from "./_circle_chart_custom_tooltip.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 gaugeTheme.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,36 +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
|
-
|
|
9
|
-
HighchartsMore(Highcharts);
|
|
10
|
-
SolidGauge(Highcharts);
|
|
11
|
-
|
|
12
|
-
const data = [{ name: "Name", y: 67 }]
|
|
13
|
-
|
|
14
|
-
const baseOptions = {
|
|
15
|
-
series: [{ data: data }],
|
|
16
|
-
plotOptions: {
|
|
17
|
-
solidgauge: {
|
|
18
|
-
borderColor: colors.data_7,
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const GaugeColors = () => {
|
|
24
|
-
const options = Highcharts.merge({}, gaugeTheme, baseOptions);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div>
|
|
28
|
-
<HighchartsReact
|
|
29
|
-
highcharts={Highcharts}
|
|
30
|
-
options={options}
|
|
31
|
-
/>
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default GaugeColors;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
Custom data colors allow for color customization to match the needs of business requirements.
|
|
2
|
-
Pass the prop `plotOptions.solidgauge.borderColor` with a Playbook token like `colors.` + `data_1 | data_2 | data_3 | data_4 | data_5 | data_6 | data_7 | data_8`. Hex colors are also available `eg: #CA0095`
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<%= pb_rails("flex", props: {wrap: true, padding: "xl", gap: "sm"}) do %>
|
|
2
|
-
<%= pb_rails("flex/flex_item", props: {flex: 1, grow: true }) do %>
|
|
3
|
-
<%= pb_rails("card", props: {max_width: "xs", padding: "md", }) do %>
|
|
4
|
-
<%= pb_rails("title", props: {padding_bottom: "sm", size: 4, text: "Abandoned Calls" })%>
|
|
5
|
-
<%= pb_rails("flex", props: {align: "stretch"}) do %>
|
|
6
|
-
<%= pb_rails("flex", props: {margin_right: "sm", orientation: "column"}) do %>
|
|
7
|
-
<%= pb_rails("body", props: {color: "light", padding_bottom: "sm",text: "Total Abandoned"}) %>
|
|
8
|
-
<%= pb_rails("flex", props: {align: "baseline", padding_bottom: "sx"}) do %>
|
|
9
|
-
<%= pb_rails("title", props: {size: 1, text: "39"})%>
|
|
10
|
-
<%= pb_rails("title", props: {color: "light", size: 3, text: "calls"}) %>
|
|
11
|
-
<% end %>
|
|
12
|
-
<%= pb_rails("caption", props: {size: "xs", text: "of 390" }) %>
|
|
13
|
-
<%end %>
|
|
14
|
-
<%= pb_rails("section_separator", props: {align_self: "stretch", margin_right: "sm", orientation: "vertical" }) %>
|
|
15
|
-
<%= pb_rails("flex", props: {orientation: "column", wrap: true}) do %>
|
|
16
|
-
<%= pb_rails("body", props: {color: "light", text: "% Abandoned"}) %>
|
|
17
|
-
<%= pb_rails("flex", props: {wrap: true}) do %>
|
|
18
|
-
<%= pb_rails("flex/flex_item", props: {fixed_size: "150px", overflow: "hidden", shrink: true}) do %>
|
|
19
|
-
<%= pb_rails("gauge", props: {
|
|
20
|
-
chart_data: [{ name: "Name", value: 10 }],
|
|
21
|
-
disable_animation: true,
|
|
22
|
-
height: '150',
|
|
23
|
-
id: "gauge-complex",
|
|
24
|
-
suffix: "%"
|
|
25
|
-
}) %>
|
|
26
|
-
<% end %>
|
|
27
|
-
<% end %>
|
|
28
|
-
<% end %>
|
|
29
|
-
<%end %>
|
|
30
|
-
<% end %>
|
|
31
|
-
<% end %>
|
|
32
|
-
<% end %>
|