我在尝试更改来自Google API的气泡图中气泡的工具提示。自定义Google Charts API中的气泡图工具提示
角色:可以解决我的问题的tooltip不适用于这种图表。
现在我的气泡显示有关行的值的信息,根据文档,这是正确的,但我只需要该信息绘制图表,我需要显示一个字符串作为工具提示。这个字符串是由我需要格式化的一些值组成的。
可以这样做吗?
对于记录,我使用PHP通过JSON向Javascript提供数据,我使用的是谷歌最新的API(https://www.google.com/jsapi)。
这是我列的定义,因为他们现在是正确的:
$data['cols'][] = array('id' => 'ID', 'label' => 'ID', 'pattern' => "", 'type' => 'string');
$data['cols'][] = array('id' => 'Fecha', 'label' => 'Fecha', 'pattern' => "", 'type' => 'number');
$data['cols'][] = array('id' => 'h', 'label' => 'h', 'pattern' => "", 'type' => 'number');
$data['cols'][] = array('id' => 'stringRes', 'label' => 'Valor', 'pattern' => "", 'type' => 'string');
$data['cols'][] = array('id' => 'Resultado', 'label' => 'Resultado', 'pattern' => "", 'type' => 'number');
提前感谢!
编辑:
[解决方法]
如果有人问同样的问题,我刚好擦除我不想显示的字段的标签解决我的问题,就是这样!
我改变了我的列模型如下:
$data['cols'][] = array('id' => 'ID', 'label' => 'Fecha', 'pattern' => "", 'type' => 'string');
$data['cols'][] = array('id' => 'Fecha', 'label' => '', 'pattern' => "", 'type' => 'number');
$data['cols'][] = array('id' => 'h', 'label' => '', 'pattern' => "", 'type' => 'number');
$data['cols'][] = array('id' => 'stringRes', 'label' => 'Resultado', 'pattern' => "", 'type' => 'string');
$data['cols'][] = array('id' => 'Resultado', 'label' => '', 'pattern' => "", 'type' => 'number');
感谢@jmac给了我的问题的一些方法。
如果您可以将解决方案添加到下面的答案中,然后将自己的答案检查为“已解决”,那么将有助于将问题显示为已解决,并让他人在未来需要时查看问题/答案。 – jmac