I am using google pie charts, all is working fine but legend label on right side is cut off.
there is also no option in google API to control these labels. here is documentations https://developers.google.com/chart/interactive/docs/gallery/piechart#configuration-options
for whiteHat please see here are images.. 1st with hide div
and a div not hide...
the legend would normally wrap, see following working snippet,
using the options shown in the attached image
google.charts.load('current', { callback: function () { var container = document.getElementById('chart_div'); var chart = new google.visualization.PieChart(container); var data = google.visualization.arrayToDataTable([ ['Education', 'People'], ['less than high school', 10], ['high school', 10], ['college associate', 10], ]); var options = { width: '470', height: '450', chartArea: { width: '80%', height: '80%', left: 100, }, pieSliceTextStyle: { color: 'white', fontSize: '17.5' }, colors: ['#90c458', '#ff7f66', '#ffce55', '#52c2e8'] }; chart.draw(data, options); }, packages: ['corechart'] });
<script src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div"></div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.