Charts 谷歌没有绘制网格线,但我希望刻度有一个黑色标记

Charts 谷歌没有绘制网格线,但我希望刻度有一个黑色标记,charts,google-visualization,Charts,Google Visualization,我想删除hAxis的网格线,但保留ticks的小黑色标记 我的代码如下所示: var optionsSmall = { colors: ['#4572A7'], hAxis: { minorGridlines: { color: '#000' }, gridlines: { color: 'transparent' }, format:'MM/d/y', textStyle: { fontSize: 9 } }, series: { 0: { t

我想删除hAxis的网格线,但保留ticks的小黑色标记

我的代码如下所示:

var optionsSmall = {
        colors: ['#4572A7'],
        hAxis: { minorGridlines: { color: '#000' }, gridlines: { color: 'transparent' }, format:'MM/d/y', textStyle: { fontSize: 9 }  },
        series: { 0: { targetAxisIndex: 1, }, 1: { targetAxisIndex: 0, type: 'line' } },
        vAxes: {
                0: { gridlines: { count: 0 }, textStyle: { fontSize: 9 } },
                1: { gridlines: { count: 8 }, textStyle: { fontSize: 9 } },
        },
        chartArea:{right:80,top:22, bottom:50, width:'100%',height:'100%'},
        tooltip: { trigger: 'none', showColorCode: false }
    };
我附上了一张图片来代表我想要实现的目标。黑线只是为了戏剧化的目的才这么粗。对不起,如果它是重复的,我的英语不是那么完美,不知道这个小标记的正确单词


您可以使用值设置为零的直线系列,
有空白的
“行”
注释
fontSize
将控制“勾号”的长度

您可以使用…来“关闭”额外系列

colors: ['transparent', ...]
0: {enableInteractivity: false, visibleInLegend: false}
请参阅以下工作片段

google.charts.load('current'{
软件包:['corechart']
}).然后(函数(){
var data=google.visualization.arrayToDataTable([
['x','y0',{role:'annotation',type:'string'},'y1'],
[新日期(2017年6月6日1日),0,,,1000],
[新日期(2017年6月6日2日),2000年6月0日],
[新日期(2017年6月6日3日),0,,,3000],
[新日期(2017年6月6日4日),0,,,4000],
[新日期(2017年6月6日5日),0,,,5000],
[新日期(2017年6月6日6月6日),0,,,6000]
]);
var选项小={
注释:{style:'line',textStyle:{fontSize:10},
颜色:[“透明”和“#4572A7”],
hAxis:{minorGridlines:{color:'#000'},网格线:{color:'transparent'},格式:'MM/d/y',文本样式:{fontSize:9},
点大小:0,
系列:{
0:{enableInteractivity:false,visibleInLegend:false},
1:{targetAxisIndex:1},
2:{targetAxisIndex:0,类型:'line'}
},
变量:{viewWindow:{min:0}},
阀门:{
0:{网格线:{count:0},文本样式:{fontSize:9},
1:{网格线:{count:8},文本样式:{fontSize:9},
},
图表区:{右:80,上:22,下:50,宽:100%,高:100%},
工具提示:{trigger:'none',showColorCode:false}
};
var chart=new google.visualization.LineChart(document.getElementById('chart');
图表绘制(数据、选项小);
});


谢谢,我会尝试一下,如果这是我需要的解决方案,我会接受你的回答!请你把答案标记为已接受好吗?这将允许我将其他问题标记为重复问题。
colors: ['transparent', ...]
0: {enableInteractivity: false, visibleInLegend: false}