简体   繁体   English

谷歌图表增加y轴宽度增加

[英]Google chart increase the y axis width increase

how to increase Google chart y axis width.如何增加谷歌图表 y 轴宽度。 pls find the image.请找到图像。 left side full text was not comes properly.左侧全文未正确显示。 please guide me.请指导我。 how to increase Google chart y axis width如何增加谷歌图表y轴宽度

need to adjust the size of the chart and chartArea in the options需要在options调整chart和chartArea的大小

to leave room for the y-axis labels on left, use chartArea.left要为左侧的 y 轴标签留出空间,请使用chartArea.left

to leave room for the title on top, use chartArea.top要为顶部的标题留出空间,请使用chartArea.top

see following example, added colors to highlight each area...请参见以下示例,添加颜色以突出显示每个区域...

 google.charts.load('current', { callback: function () { var data = google.visualization.arrayToDataTable([ ['Category', 'Score'], ['APPLYING LEADERSHIP TECHNIQUES', 40], ['ASSERTIVENESS', 30], ['COACHING, COUNSELING, TEACHING', 10], ['CONFLICT MANAGEMENT', 20] ]); var options = { // adjust chart size height: 600, width: 800, chartArea: { // adjust chart area size left: 300, top: 40, height: 500, width: 480, backgroundColor: 'magenta' }, backgroundColor: 'cyan', colors: ['lime'], legend: { position: 'bottom' }, title: 'Title' }; var chart2 = new google.visualization.BarChart(document.getElementById('barchart_core')); chart2.draw(data, options); }, packages: ['bar', 'corechart'] });
 <script src="https://www.gstatic.com/charts/loader.js"></script> <div id="barchart_core"></div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM