Ok, get all 3 columns in a Query, then we can build your tooltip using a
DataView, like this:
var view = new google.visualization.DataView(data);
view.setColumns([0, {
label: data.getColumnLabel(1),
type: 'number',
calc: function (dt, row) {
return {
v: dt.getValue(row, 1),
f: dt.getValue(row, 2)
}
}
}]);
Then you draw your BarChart using the view instead of the DataTable. The
tooltips will show your breed descriptions instead of the quantity owned
(you can also display both in the tooltip, if you'd prefer).
On Friday, February 1, 2013 5:57:14 PM UTC-5, [email protected] wrote:
>
> Sorry, got typing too fast. This is what I meant:
>
> Ideally another column of data in the fusion table. Something like this:
>
> Dog type Owned Breed description
> Pug 1,000 A toy dog with a short muzzle
> Beagle 500 Medium-size member of the hound group
>
> Making the chart show the "dog type" and "owned" columns in a bar chart
> for example seems pretty straight forward. But how to add that "breed
> description" to the tooltip is the hangup.
>
>
>
>
>
> On Friday, February 1, 2013 4:51:31 PM UTC-6, [email protected] wrote:
>>
>> Ideally another column of the in the fusion table. Something like this:
>>
>> Dog type Owned Breed description
>> Pug 1,000 A toy dog with a short muzzle
>> Beagle 500 Medium-size member of the hound group
>>
>>
>>
>>
>>
>>
>>
>> On Friday, February 1, 2013 4:36:03 PM UTC-6, asgallant wrote:
>>>
>>> I mean another column in the table, not another row.
>>>
>>> On Friday, February 1, 2013 5:35:26 PM UTC-5, asgallant wrote:
>>>>
>>>> Would this additional information be from another row in the table or
>>>> from a separate table?
>>>>
>>>> On Friday, February 1, 2013 5:17:29 PM UTC-5, [email protected] wrote:
>>>>>
>>>>> I know it is possible to create a google chart using fusion table data.
>>>>> Is there a way to add an additional row of data from the fusion table
>>>>> to the tooltip?
>>>>>
>>>>> For example: If I wanted to chart the most popular dog breeds, but
>>>>> also wanted a short description of the breed. The charting seems easy
>>>>> enough but am lost at a way to include additional data.
>>>>>
>>>>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.