参考此处显示的图表类型: http ://code.google.com/apis/visualization/documentation/gallery/barchart.html
似乎没有一个简单的开关,并且将轴颜色更改为白色(在白色背景上)似乎没有做任何事情。我什至尝试使用 jquery 来隐藏 api 输出产生的选择器,但没有骰子。
参考此处显示的图表类型: http ://code.google.com/apis/visualization/documentation/gallery/barchart.html
似乎没有一个简单的开关,并且将轴颜色更改为白色(在白色背景上)似乎没有做任何事情。我什至尝试使用 jquery 来隐藏 api 输出产生的选择器,但没有骰子。
您可以设置hAxis.textPosition
为 ' none
'的值
例如:
var options = {
hAxis: { textPosition: 'none' },
};
chart.draw(data, options);
请参阅https://developers.google.com/chart/interactive/docs/gallery/barchart#Configuration_Options
let options = {legend: { position: 'none' }};
他们的 API 确实没有这个功能,但是:
chart.draw( data,
{
width: 400,
height: 240,
is3D: true,
legend :'none',
axisFontSize : 0
});
将 axisFontSize 设置为 0 将删除您的 x 轴数据。:)
通过删除数据表中的字符串,我能够删除图表材料版本中的标签。
前:
data.addColumn('string', 'Date');
后:
data.addColumn('string', '');
谷歌改变 API 的速度如此之快,这就是今天的工作方式:
chart.draw(daily, {
hAxis : {textColor: '#ffffff'},
[... your other options here ...]
});
axisFontSize : 0 将删除 x 轴和 y 轴数据
查看http://code.google.com/apis/chart/docs/gallery/bar_charts.html#axis_label_styles
轴标签样式 chxs "axis_or_tick"
您会注意到此文档:“_ -(下划线)既不绘制轴线也不绘制刻度线。如果要隐藏轴线,请使用此值。”
示例:'chxs=0,,0,0,_'