From 7bc6390a169008a9f7493e8767b69a76b8879db0 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 6 Dec 2024 12:41:18 -0500 Subject: [PATCH] Update Rails example --- .../docs/_bar_graph_custom_rails.html.erb | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/playbook/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb b/playbook/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb index f0f55498d3..ea91c42c7f 100644 --- a/playbook/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +++ b/playbook/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb @@ -1,18 +1,9 @@ <% data = [{ - name: 'Installation', - data: [1475,200,3000,654,656] + name: 'Role', + data: [0, 200, 300, 654, 656], }, { - name: 'Manufacturing', - data: [4434,524,2320,440,500] -}, { - name: 'Sales & Distribution', - data: [3387,743,1344,434,440,] -}, { - name: 'Project Development', - data: [3227,878,999,780,1000] -}, { - name: 'Other', - data: [1111,677,3245,500,200] + name: 'Company', + data: [150, 524, 320, 440, 500], }] %> <% bar_graph_options = { @@ -25,11 +16,11 @@ }, xAxis: { categories: [ - ' Jan', - ' Feb', - ' Mar', - ' Apr', - ' May' + '', + '', + '', + '', + '' ], labels: { useHTML: true, @@ -39,11 +30,12 @@ } %> <%= pb_rails("bar_graph", props: { - axis_title: 'Number of Employees', + axis_title: '', chart_data: data, id: "bar-default", + legend: true, y_axis_min: 0, subtitle: 'Subtitle to replace', title: 'Bar Graph with Custom Overrides', custom_options: bar_graph_options -}) %> \ No newline at end of file +}) %>