如何从Google Visualization API生成的条形图中删除x轴? [英] How do you remove the x-axis from a bar chart produced by Google's Visualization API?

查看:99
本文介绍了如何从Google Visualization API生成的条形图中删除x轴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

参考这里显示的图表类型:
http://code.google.com/apis/visualization/documentation/gallery/barchart.html

Referring to the kind of chart shown here: http://code.google.com/apis/visualization/documentation/gallery/barchart.html

似乎没有一个简单的开关,并将轴颜色更改为白色(在白色背景上)似乎没有做任何事情。我甚至尝试使用jquery来隐藏由api输出生成的选择器,但没有骰子。

There doesn't seem to be a simple switch, and changing the axis color to white (on a white background) didn't seem to do anything. I even tried jquery to hide the selectors produced by the api output but no dice.

推荐答案

可以设置 hAxis.textPosition 到值' none '

例如: / p>

For example:

var options = {

                hAxis: { textPosition: 'none' },
            };

chart.draw(data, options);

请参阅 https://developers.google.com/chart/interactive/docs/gallery/barchart#Configuration_Options

这篇关于如何从Google Visualization API生成的条形图中删除x轴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆