You add the extra column in the chart the exact same way you added the
other columns to the chart. You use a DataView (or the view property of a
ChartWrapper) to select which columns should be used to draw a chart. See
an example here: http://jsfiddle.net/asgallant/9BLSc/
On Monday, September 3, 2012 10:30:25 PM UTC-4, Kate wrote:
>
> asgallant: Yes the urls are in this form and thank you very very much for
> the solution. It works well now and I'm so happy ^_^
> However I still want to know another solution you mentioned. Could you
> please show me by code example how to add an extra column in the DataTable
> and how to hide the column from the chart?
>
> On Tuesday, September 4, 2012 6:46:05 AM UTC+7, asgallant wrote:
>>
>> Are the urls for the countries in the form "mainUrl/countryName.aspx"?
>> If so, then just add ".aspx" to the end of the string in the window.open
>> call:
>>
>> window.open('main url' + countryName + '.aspx');
>>
>> If the url's aren't formulaic like that, then you can add them as an
>> extra column in the DataTable and hide that column from the chart. You can
>> then reference the DataTable to get the url in the "select" event handler.
>>
>> On Sunday, September 2, 2012 11:10:38 PM UTC-4, Kate wrote:
>>>
>>> Marc: I tried window.open('main url' + countryName) but it doesn't work
>>> for my site as all pages end with .aspx. Could you please give me
>>> suggestion how to make this make this work or is there any way that I can
>>> put individual url for each region manually?
>>>
>>> On Tuesday, June 26, 2012 6:44:45 AM UTC+7, Marc Lucchini wrote:
>>>>
>>>> You'll have to listen to the
>>>> "select<https://developers.google.com/chart/interactive/docs/gallery/geochart#Events>"
>>>>
>>>> or the
>>>> "regionClick<https://developers.google.com/chart/interactive/docs/gallery/geochart#Events>"
>>>>
>>>> event.
>>>> An example using the select event: http://jsfiddle.net/dz2xS
>>>>
>>>> If your country pages already exist and you can't or don't want to
>>>> change their URLs, you may have to put these URLs in your datatable and
>>>> pass a dataview to the geochart.
>>>>
>>>> Le lundi 25 juin 2012 23:25:41 UTC+2, Susanna Murley a écrit :
>>>>>
>>>>> I want to create a geochart that allows me to set urls for regions.
>>>>> For example, if someone clicks on California in my map, I want it to link
>>>>> to a separate page on my site. How do I do this?
>>>>
>>>>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/0hAit2n0jFMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.