答案 0 :(得分:1)
,您可以使用以下内容...
hAxis: {
viewWindow: {
min: 0,
max: 5
},
ticks: [0, 1, 2, 3, 4, 5]
},
vAxis: {
viewWindow: {
min: 0,
max: 5
},
ticks: [0, 1, 2, 3, 4, 5]
}
请参阅以下工作代码段...
google.charts.load('current', {
callback: function () {
new google.visualization.ScatterChart(document.getElementById('chart_div')).draw(
google.visualization.arrayToDataTable([
['X', 'Y'],
[1, 1]
]),
{
hAxis: {
viewWindow: {
min: 0,
max: 5
},
ticks: [0, 1, 2, 3, 4, 5]
},
vAxis: {
viewWindow: {
min: 0,
max: 5
},
ticks: [0, 1, 2, 3, 4, 5]
}
}
);
},
packages:['corechart']
});

<script src="https://www.gstatic.com/charts/loader.js"></script>
<div id="chart_div"></div>
&#13;