Skip to content

Commit

Permalink
Change props to fix ledgend
Browse files Browse the repository at this point in the history
  • Loading branch information
markdoeswork committed Dec 9, 2024
1 parent 805c771 commit f8de89a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const barGraphOptions = {
},
},
xAxis: {
legend: {
itemMarginTop: 62,
},
labels: {
useHTML: true,
formatter: function () {
Expand Down Expand Up @@ -49,10 +52,8 @@ const BarGraphCustom = (props) => (
customOptions={barGraphOptions}
id="bar-custom"
legend
subTitle="Subtitle to replace"
title="Bar Graph with Custom Overrides"
xAxisCategories={['Angry', 'Frown', 'Meh', 'Smile', 'Laugh']}
yAxisMin={0}
{...props}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
],
labels: {
useHTML: true,
},
legend: {
itemMarginTop: 62,
}
}
}
} %>

<%= pb_rails("bar_graph", props: {
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
}) %>

0 comments on commit f8de89a

Please sign in to comment.