playbook_ui 15.8.0.pre.rc.1 → 16.0.0
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/_playbook.scss +0 -4
- 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_circle_chart/pb_circle_chart.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +6 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +1 -1
- data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +38 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +37 -51
- data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +44 -76
- data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +35 -48
- data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +35 -48
- data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/globalPropsTestHelper.js +373 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +37 -50
- data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +36 -48
- data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +30 -18
- data/dist/chunks/_pb_line_graph-ByQFYuFO.js +1 -0
- data/dist/chunks/_typeahead-Bl8_gWmz.js +1 -0
- data/dist/chunks/componentRegistry-DzmmLR2x.js +1 -0
- data/dist/chunks/globalProps-D6R2eJnp.js +6 -0
- data/dist/chunks/lib-C8h70OzX.js +29 -0
- data/dist/chunks/vendor.js +4 -4
- data/dist/menu.yml +0 -29
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +8 -147
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.scss +0 -6
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +0 -196
- data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +0 -31
- data/app/pb_kits/playbook/pb_bar_graph/barGraphSettings.js +0 -32
- data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +0 -106
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.html.erb +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -98
- 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/ChartsTypes.ts +0 -2
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +0 -16
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +0 -228
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +0 -45
- data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +0 -88
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.html.erb +0 -10
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +0 -99
- 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_dashboard/commonSettings.js +0 -104
- data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +0 -16
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +0 -174
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +0 -173
- data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +0 -20
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +0 -49
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +0 -215
- 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_gauge/gauge.html.erb +0 -2
- data/app/pb_kits/playbook/pb_gauge/gauge.rb +0 -56
- data/app/pb_kits/playbook/pb_gauge/gauge.test.js +0 -35
- data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +0 -91
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.scss +0 -3
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +0 -166
- 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
- data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +0 -52
- data/app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js +0 -30
- data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +0 -125
- data/app/pb_kits/playbook/pb_line_graph/line_graph.html.erb +0 -1
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +0 -93
- data/dist/chunks/_typeahead-D0GNUBXn.js +0 -6
- data/dist/chunks/lib-DxCgrqqG.js +0 -29
|
@@ -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
|
-
|
|
@@ -1,49 +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
|
-
title: {
|
|
15
|
-
text: 'Line Graph with Legend Non Clickable',
|
|
16
|
-
},
|
|
17
|
-
xAxis: {
|
|
18
|
-
categories: categories,
|
|
19
|
-
},
|
|
20
|
-
yAxis: {
|
|
21
|
-
title: {
|
|
22
|
-
text: 'Number of Employees',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
legend: {
|
|
26
|
-
enabled: true,
|
|
27
|
-
events: {
|
|
28
|
-
itemClick: function () {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
series: data
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const LineGraphLegendNonclickable = () => {
|
|
37
|
-
const options = Highcharts.merge({}, lineGraphTheme, chartOptions)
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<div>
|
|
41
|
-
<HighchartsReact
|
|
42
|
-
highcharts={Highcharts}
|
|
43
|
-
options={options}
|
|
44
|
-
/>
|
|
45
|
-
</div>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default LineGraphLegendNonclickable
|
|
@@ -1,62 +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("title", props: {size: 4, text: "align | vertical_align", padding_top: "sm", padding_bottom: "sm"})%>
|
|
19
|
-
|
|
20
|
-
<%= pb_rails("line_graph", props: {
|
|
21
|
-
id: "legend-position-line",
|
|
22
|
-
gradient: false,
|
|
23
|
-
chart_data: data,
|
|
24
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug'],
|
|
25
|
-
title: 'Alignment of Legend',
|
|
26
|
-
axis_title: 'Number of Employees',
|
|
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("line_graph", props: {
|
|
36
|
-
id: "legend-position-line-1",
|
|
37
|
-
gradient: false,
|
|
38
|
-
chart_data: data,
|
|
39
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug'],
|
|
40
|
-
title: 'Layout of Legend',
|
|
41
|
-
axis_title: 'Number of Employees',
|
|
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("line_graph", props: {
|
|
51
|
-
id: "legend-position-line-2",
|
|
52
|
-
gradient: false,
|
|
53
|
-
chart_data: data,
|
|
54
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug'],
|
|
55
|
-
title: 'Offset of Legend',
|
|
56
|
-
axis_title: 'Number of Employees',
|
|
57
|
-
legend: true,
|
|
58
|
-
layout: "vertical",
|
|
59
|
-
x: 100,
|
|
60
|
-
y: 10,
|
|
61
|
-
padding_top: "sm",
|
|
62
|
-
}) %>
|
|
@@ -1,129 +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 Title from '../../pb_title/_title'
|
|
6
|
-
|
|
7
|
-
const data = [{
|
|
8
|
-
name: 'Installation',
|
|
9
|
-
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
|
|
10
|
-
}, {
|
|
11
|
-
name: 'Manufacturing',
|
|
12
|
-
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
|
|
13
|
-
}, {
|
|
14
|
-
name: 'Sales & Distribution',
|
|
15
|
-
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
|
|
16
|
-
}, {
|
|
17
|
-
name: 'Project Development',
|
|
18
|
-
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
|
|
19
|
-
}, {
|
|
20
|
-
name: 'Other',
|
|
21
|
-
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
|
|
22
|
-
}]
|
|
23
|
-
|
|
24
|
-
const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']
|
|
25
|
-
|
|
26
|
-
const LineGraphLegendPosition = (props) => {
|
|
27
|
-
const chartOptionsFirst = {
|
|
28
|
-
title: { text: "Alignment of Legend" },
|
|
29
|
-
series: data,
|
|
30
|
-
xAxis: {
|
|
31
|
-
categories: categories,
|
|
32
|
-
},
|
|
33
|
-
yAxis: {
|
|
34
|
-
min: 0,
|
|
35
|
-
title: {
|
|
36
|
-
text: "Number of Employees",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
legend: {
|
|
40
|
-
enabled: true,
|
|
41
|
-
align: 'right',
|
|
42
|
-
verticalAlign: 'top'
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const chartOptionsSecond = {
|
|
47
|
-
title: { text: "Layout of Legend" },
|
|
48
|
-
series: data,
|
|
49
|
-
xAxis: {
|
|
50
|
-
categories: categories,
|
|
51
|
-
},
|
|
52
|
-
yAxis: {
|
|
53
|
-
min: 0,
|
|
54
|
-
title: {
|
|
55
|
-
text: "Number of Employees",
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
legend: {
|
|
59
|
-
enabled: true,
|
|
60
|
-
layout: 'vertical'
|
|
61
|
-
},
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const chartOptionsThird = {
|
|
65
|
-
title: { text: "Offset of Legend" },
|
|
66
|
-
series: data,
|
|
67
|
-
xAxis: {
|
|
68
|
-
categories: categories,
|
|
69
|
-
},
|
|
70
|
-
yAxis: {
|
|
71
|
-
min: 0,
|
|
72
|
-
title: {
|
|
73
|
-
text: "Number of Employees",
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
legend: {
|
|
77
|
-
enabled: true,
|
|
78
|
-
layout: 'vertical',
|
|
79
|
-
x: 100,
|
|
80
|
-
y: 10
|
|
81
|
-
},
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const optionsFirst = Highcharts.merge({}, lineGraphTheme, chartOptionsFirst)
|
|
85
|
-
const optionsSecond = Highcharts.merge({}, lineGraphTheme, chartOptionsSecond)
|
|
86
|
-
const optionsThird = Highcharts.merge({}, lineGraphTheme, chartOptionsThird)
|
|
87
|
-
|
|
88
|
-
return (
|
|
89
|
-
<div>
|
|
90
|
-
<Title
|
|
91
|
-
paddingY="sm"
|
|
92
|
-
size={4}
|
|
93
|
-
tag="h4"
|
|
94
|
-
text="align | verticalAlign"
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
<HighchartsReact
|
|
98
|
-
highcharts={Highcharts}
|
|
99
|
-
options={optionsFirst}
|
|
100
|
-
/>
|
|
101
|
-
|
|
102
|
-
<Title
|
|
103
|
-
paddingY="sm"
|
|
104
|
-
size={4}
|
|
105
|
-
tag="h4"
|
|
106
|
-
text="layout"
|
|
107
|
-
{...props}
|
|
108
|
-
/>
|
|
109
|
-
<HighchartsReact
|
|
110
|
-
highcharts={Highcharts}
|
|
111
|
-
options={optionsSecond}
|
|
112
|
-
/>
|
|
113
|
-
|
|
114
|
-
<Title
|
|
115
|
-
paddingY="sm"
|
|
116
|
-
size={4}
|
|
117
|
-
tag="h4"
|
|
118
|
-
text="x | y"
|
|
119
|
-
{...props}
|
|
120
|
-
/>
|
|
121
|
-
<HighchartsReact
|
|
122
|
-
highcharts={Highcharts}
|
|
123
|
-
options={optionsThird}
|
|
124
|
-
/>
|
|
125
|
-
</div>
|
|
126
|
-
)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export default LineGraphLegendPosition
|
|
@@ -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,18 +0,0 @@
|
|
|
1
|
-
examples:
|
|
2
|
-
|
|
3
|
-
rails:
|
|
4
|
-
- line_graph_default: Default
|
|
5
|
-
- line_graph_legend: Legend
|
|
6
|
-
- line_graph_legend_position: Legend Position
|
|
7
|
-
- line_graph_legend_nonclickable: Legend Nonclickable
|
|
8
|
-
- line_graph_height: Height
|
|
9
|
-
- line_graph_colors: Color Overrides
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
react:
|
|
13
|
-
- line_graph_default: Default
|
|
14
|
-
- line_graph_legend: Legend
|
|
15
|
-
- line_graph_legend_position: Legend Position
|
|
16
|
-
- line_graph_legend_nonclickable: Legend Nonclickable
|
|
17
|
-
- line_graph_height: Height
|
|
18
|
-
- line_graph_colors: Color Overrides
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as LineGraphDefault } from './_line_graph_default.jsx'
|
|
2
|
-
export { default as LineGraphLegend } from './_line_graph_legend.jsx'
|
|
3
|
-
export { default as LineGraphLegendPosition } from './_line_graph_legend_position.jsx'
|
|
4
|
-
export { default as LineGraphLegendNonclickable } from './_line_graph_legend_nonclickable.jsx'
|
|
5
|
-
export { default as LineGraphHeight } from './_line_graph_height.jsx'
|
|
6
|
-
export { default as LineGraphColors } from './_line_graph_colors.jsx'
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, screen } from '../utilities/test-utils';
|
|
3
|
-
import LineGraph from './_line_graph';
|
|
4
|
-
|
|
5
|
-
beforeEach(() => {
|
|
6
|
-
// Silences error logs within the test suite.
|
|
7
|
-
jest.spyOn(console, 'error');
|
|
8
|
-
jest.spyOn(console, 'warn');
|
|
9
|
-
console.error.mockImplementation(() => {});
|
|
10
|
-
console.warn.mockImplementation(() => {});
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
afterEach(() => {
|
|
14
|
-
console.error.mockRestore();
|
|
15
|
-
console.warn.mockRestore();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const testId = 'linechart1';
|
|
19
|
-
|
|
20
|
-
test('uses exact classname', () => {
|
|
21
|
-
const data = [{
|
|
22
|
-
name: 'Installation',
|
|
23
|
-
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
|
|
24
|
-
}, {
|
|
25
|
-
name: 'Manufacturing',
|
|
26
|
-
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
|
|
27
|
-
}, {
|
|
28
|
-
name: 'Sales & Distribution',
|
|
29
|
-
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
|
|
30
|
-
}, {
|
|
31
|
-
name: 'Project Development',
|
|
32
|
-
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
|
|
33
|
-
}, {
|
|
34
|
-
name: 'Other',
|
|
35
|
-
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
|
|
36
|
-
}]
|
|
37
|
-
render(
|
|
38
|
-
<LineGraph
|
|
39
|
-
axisTitle="Number of Employees"
|
|
40
|
-
chartData={data}
|
|
41
|
-
data={{ testid: testId }}
|
|
42
|
-
id="line-default"
|
|
43
|
-
subTitle="Source: thesolarfoundation.com"
|
|
44
|
-
title="Solar Employment Growth by Sector, 2010-2016"
|
|
45
|
-
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
|
|
46
|
-
yAxisMin={0}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
const kit = screen.getByTestId(testId);
|
|
51
|
-
expect(kit).toHaveClass('pb_bar_graph');
|
|
52
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { commonSettings } from '../pb_dashboard/commonSettings.js'
|
|
2
|
-
import typography from '../tokens/exports/_typography.module.scss'
|
|
3
|
-
|
|
4
|
-
const markerStyles = (highchart) => {
|
|
5
|
-
highchart.plotOptions.line.marker.enabled = true
|
|
6
|
-
highchart.plotOptions.series.marker.enabled = true
|
|
7
|
-
highchart.plotOptions.series.marker.fillColor = 'white'
|
|
8
|
-
highchart.plotOptions.series.marker.lineWidth = 2
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const fixTooltipStyles = () => {
|
|
12
|
-
document.getElementById('main-view').setAttribute('style', 'position: static !important')
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const styleDataLabels = (highchart) => {
|
|
16
|
-
const series = highchart.plotOptions.series
|
|
17
|
-
|
|
18
|
-
series.dataLabels.style.fontFamily = typography.font_family_base
|
|
19
|
-
series.dataLabels.style.fontSize = typography.text_small
|
|
20
|
-
series.dataLabels.style.fontWeight = typography.bold
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const pbLineGraph = (highchart) => {
|
|
24
|
-
commonSettings(highchart)
|
|
25
|
-
styleDataLabels(highchart)
|
|
26
|
-
markerStyles(highchart)
|
|
27
|
-
fixTooltipStyles()
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default pbLineGraph
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import colors from '../tokens/exports/_colors.module.scss'
|
|
2
|
-
import typography from '../tokens/exports/_typography.module.scss'
|
|
3
|
-
|
|
4
|
-
const lineGraphTheme = {
|
|
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: "line",
|
|
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
|
-
followPointer: true,
|
|
35
|
-
shadow: false,
|
|
36
|
-
borderWidth: 0,
|
|
37
|
-
borderRadius: 10,
|
|
38
|
-
style: {
|
|
39
|
-
fontFamily: typography.font_family_base,
|
|
40
|
-
color: colors.text_dk_default,
|
|
41
|
-
fontWeight: typography.regular,
|
|
42
|
-
fontSize: typography.text_smaller,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
plotOptions: {
|
|
46
|
-
line: {
|
|
47
|
-
dataLabels: {
|
|
48
|
-
enabled: false,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
credits: { enabled: false },
|
|
53
|
-
legend: {
|
|
54
|
-
enabled: false,
|
|
55
|
-
itemStyle: {
|
|
56
|
-
fontFamily: typography.font_family_base,
|
|
57
|
-
color: colors.text_lt_light,
|
|
58
|
-
fontWeight: typography.regular,
|
|
59
|
-
fontSize: typography.text_smaller,
|
|
60
|
-
},
|
|
61
|
-
itemHoverStyle: {
|
|
62
|
-
color: colors.text_lt_default,
|
|
63
|
-
},
|
|
64
|
-
itemHiddenStyle: {
|
|
65
|
-
color: colors.text_lt_lighter,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
colors: [
|
|
69
|
-
colors.data_1,
|
|
70
|
-
colors.data_2,
|
|
71
|
-
colors.data_3,
|
|
72
|
-
colors.data_4,
|
|
73
|
-
colors.data_5,
|
|
74
|
-
colors.data_6,
|
|
75
|
-
colors.data_7,
|
|
76
|
-
],
|
|
77
|
-
xAxis: {
|
|
78
|
-
gridLineWidth: 0,
|
|
79
|
-
lineColor: colors.border_light,
|
|
80
|
-
tickColor: colors.border_light,
|
|
81
|
-
labels: {
|
|
82
|
-
style: {
|
|
83
|
-
fontFamily: typography.font_family_base,
|
|
84
|
-
color: colors.text_lt_lighter,
|
|
85
|
-
fontWeight: typography.bold,
|
|
86
|
-
fontSize: typography.text_smaller,
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
title: {
|
|
90
|
-
style: {
|
|
91
|
-
color: colors.text_lt_default,
|
|
92
|
-
fontFamily: typography.font_family_base,
|
|
93
|
-
fontWeight: typography.regular,
|
|
94
|
-
fontSize: typography.heading_4,
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
yAxis: {
|
|
99
|
-
alternateGridColor: undefined as string | undefined,
|
|
100
|
-
minorTickInterval: null as number | null,
|
|
101
|
-
gridLineColor: colors.border_light,
|
|
102
|
-
minorGridLineColor: colors.border_light,
|
|
103
|
-
lineWidth: 0,
|
|
104
|
-
tickWidth: 0,
|
|
105
|
-
tickPixelInterval: 50,
|
|
106
|
-
labels: {
|
|
107
|
-
style: {
|
|
108
|
-
fontFamily: typography.font_family_base,
|
|
109
|
-
color: colors.text_lt_lighter,
|
|
110
|
-
fontWeight: typography.bold,
|
|
111
|
-
fontSize: typography.text_smaller,
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
title: {
|
|
115
|
-
style: {
|
|
116
|
-
fontFamily: typography.font_family_base,
|
|
117
|
-
color: colors.text_lt_lighter,
|
|
118
|
-
fontWeight: typography.bold,
|
|
119
|
-
fontSize: typography.text_smaller,
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export default lineGraphTheme;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= react_component('LineGraph', object.chart_options) %>
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Playbook
|
|
4
|
-
module PbLineGraph
|
|
5
|
-
class LineGraph < Playbook::KitBase
|
|
6
|
-
prop :align, type: Playbook::Props::Enum,
|
|
7
|
-
values: %w[left right center],
|
|
8
|
-
default: "center"
|
|
9
|
-
prop :axis_title
|
|
10
|
-
prop :chart_data, type: Playbook::Props::Array,
|
|
11
|
-
default: []
|
|
12
|
-
prop :custom_options, default: {}
|
|
13
|
-
prop :gradient, type: Playbook::Props::Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
prop :point_start, type: Playbook::Props::Numeric
|
|
16
|
-
prop :subtitle
|
|
17
|
-
prop :title
|
|
18
|
-
prop :x_axis_categories, type: Playbook::Props::Array,
|
|
19
|
-
default: []
|
|
20
|
-
prop :y_axis_min, type: Playbook::Props::Numeric
|
|
21
|
-
prop :y_axis_max, type: Playbook::Props::Numeric
|
|
22
|
-
prop :legend, type: Playbook::Props::Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
prop :toggle_legend_click, type: Playbook::Props::Boolean,
|
|
25
|
-
default: true
|
|
26
|
-
prop :height
|
|
27
|
-
prop :colors, type: Playbook::Props::Array,
|
|
28
|
-
default: []
|
|
29
|
-
prop :layout, type: Playbook::Props::Enum,
|
|
30
|
-
values: %w[horizontal vertical proximate],
|
|
31
|
-
default: "horizontal"
|
|
32
|
-
prop :vertical_align, type: Playbook::Props::Enum,
|
|
33
|
-
values: %w[top middle bottom],
|
|
34
|
-
default: "bottom"
|
|
35
|
-
prop :x, type: Playbook::Props::Numeric
|
|
36
|
-
prop :y, type: Playbook::Props::Numeric
|
|
37
|
-
|
|
38
|
-
def chart_type
|
|
39
|
-
gradient ? "area" : "line"
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def standard_options
|
|
43
|
-
{
|
|
44
|
-
align: align,
|
|
45
|
-
id: id,
|
|
46
|
-
className: classname,
|
|
47
|
-
chartData: chart_data,
|
|
48
|
-
dark: dark ? "dark" : "",
|
|
49
|
-
type: chart_type,
|
|
50
|
-
title: title,
|
|
51
|
-
subTitle: subtitle,
|
|
52
|
-
axisTitle: axis_title,
|
|
53
|
-
pointStart: point_start,
|
|
54
|
-
xAxisCategories: x_axis_categories,
|
|
55
|
-
yAxisMin: y_axis_min,
|
|
56
|
-
yAxisMax: y_axis_max,
|
|
57
|
-
legend: legend,
|
|
58
|
-
toggleLegendClick: toggle_legend_click,
|
|
59
|
-
height: height,
|
|
60
|
-
colors: colors,
|
|
61
|
-
layout: layout,
|
|
62
|
-
verticalAlign: vertical_align,
|
|
63
|
-
x: x,
|
|
64
|
-
y: y,
|
|
65
|
-
}
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
def chart_options
|
|
69
|
-
standard_options.deep_merge(custom_options)
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def vertical_align_props
|
|
73
|
-
if vertical_align
|
|
74
|
-
if object.vertical_align
|
|
75
|
-
original_result = super
|
|
76
|
-
class_to_remove = "vertical_align_#{object.vertical_align}"
|
|
77
|
-
|
|
78
|
-
modified_result = original_result.gsub(class_to_remove, "").strip
|
|
79
|
-
modified_result.empty? ? nil : modified_result
|
|
80
|
-
else
|
|
81
|
-
super
|
|
82
|
-
end
|
|
83
|
-
else
|
|
84
|
-
super
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
def classname
|
|
89
|
-
generate_classname("pb_line_graph")
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
end
|