How to increase space between chart and legend? (googlecharts)

307 views Asked by At

I am using chartkick gem with googlecharts. I need to add space between chart and legend text.

<%= pie_chart [["Cash", @currentHoldings['priceChangePercent']], ["Equity", @currentHoldings['equityPercentage']], ["ManagedFunds", @currentHoldings['managedFundsPercentage']]], library: {pieSliceText:'percentage'},donut:true, legend: 'top',height: "200px", colors: ["#1e88e5","#8e24aa","#00acc1"] %>

how to add margin for legend?enter image description here

1

There are 1 answers

2
Tom Connolly On BEST ANSWER

Looks like you have to do it by using and modifying chartkick.js rather than using the gem. Other option is to supress the legend and build your own