Friends, who know how to remove the numbers on the left on the y axis on the graph and just draw a vertical black line instead, similar to the x axis line?

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div"></div> google.charts.load('current', { packages: ['corechart', 'line'] }); google.charts.setOnLoadCallback(drawBasic); function drawBasic() { var data = new google.visualization.DataTable(); data.addColumn('number', ''); data.addColumn('number', ''); data.addRows([ [2, 1], [5, 1], [8, 1], [10, 1], [11, 1], [14, 1], [17, 1], [18, 1], [22, 1], [25, 1], [27, 0.5], [28, 9], [29, 8], [30, 8], ]); var options = { colors: ['red'], pointSize: 7, dataOpacity: 0.7, pointShape: 'square', chartArea: { left: 30, top: 0, bottom: 20, width: '100%', height: '100%' }, curveType: 'function', pointsVisible: true, tooltip: { trigger: 'selection' }, legend: { position: 'none' }, height: 250, hAxis: { gridlines: { color: 'transparent' } }, vAxis: { //ticks: [0], gridlines: { count: 10, color: '#dddddd' } }, backgroundColor: 'transparent', }; var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(data, options); } 

    1 answer 1

     hAxis: { textPosition: 'none' } 
    • Please try to leave a little more detailed answers. You can add an answer by clicking edit - aleksandr barakin