Table Query Wrapper + AllowHtml

51 views
Skip to first unread message

my2...@gmail.com

unread,
Jun 14, 2013, 11:57:11 AM6/14/13
to google-visua...@googlegroups.com
Hi!

Where should I write the "AllowHtml:true" row in the following example to allow links?

https://developers.google.com/chart/interactive/docs/examples#tablequerywrapper


Please notice that this example contains two parts. Please help me in the part name: "Here is the JavaScript code for the TableQueryWrapper object:"

Thanks in urgent advance!

A.

asgallant

unread,
Jun 14, 2013, 12:07:18 PM6/14/13
to google-visua...@googlegroups.com
This is a terrible code example that is needlessly complex, but if you intend to use it anyway, you would add that option after around these lines:

options['sort'] = 'event';
options['page'] = 'event';
options['showRowNumber'] = true;

like this:

options['allowHtml'] = true;

my2cu HU

unread,
Jun 14, 2013, 12:27:40 PM6/14/13
to google-visua...@googlegroups.com
Hello!

Thanks for the really fast reply, but not working...
Anything else solution?

Thanks a lot!


2013/6/14 asgallant <drew_g...@abtassoc.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/AcLBoYJljwI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

asgallant

unread,
Jun 14, 2013, 12:50:37 PM6/14/13
to google-visua...@googlegroups.com
I tried it and it works fine.  Make sure you are entering it correctly - the option is "allowHtml", not "AllowHtml" (the options are case sensitive):

options['sort'] = 'event';
options['page'] = 'event';
options['showRowNumber'] = true;
options['allowHtml'] = true;

On Friday, June 14, 2013 12:27:40 PM UTC-4, my2cu HU wrote:
Hello!

Thanks for the really fast reply, but not working...
Anything else solution?

Thanks a lot!


2013/6/14 asgallant <drew_g...@abtassoc.com>
This is a terrible code example that is needlessly complex, but if you intend to use it anyway, you would add that option after around these lines:

options['sort'] = 'event';
options['page'] = 'event';
options['showRowNumber'] = true;

like this:

options['allowHtml'] = true;

On Friday, June 14, 2013 11:57:11 AM UTC-4, my2...@gmail.com wrote:
Hi!

Where should I write the "AllowHtml:true" row in the following example to allow links?

https://developers.google.com/chart/interactive/docs/examples#tablequerywrapper


Please notice that this example contains two parts. Please help me in the part name: "Here is the JavaScript code for the TableQueryWrapper object:"

Thanks in urgent advance!

A.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/AcLBoYJljwI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

my2...@gmail.com

unread,
Jun 14, 2013, 1:13:26 PM6/14/13
to google-visua...@googlegroups.com
Thanks for your kind. Right, and not working at me for another spreadsheet.
I have changed the link of the spreadsheet and added the text you sent me. After this not working. The e-mail address is still grey, not possible to click on.


Any idea?

Thanks again.

asgallant

unread,
Jun 14, 2013, 2:08:12 PM6/14/13
to google-visua...@googlegroups.com
Just having an email address doesn't make it clickable.  You need to format the data to wrap the email address in an anchor tag with a mailto href.  Try modifying the handleResponse function like this:

TableQueryWrapper.prototype.handleResponse = function(response) {
    this.currentDataTable = null;
    if (response.isError()) {
        google.visualization.errors.addError(this.container, response.getMessage(),
        response.getDetailedMessage(), {'showInTooltip': false});
    } else {
        this.currentDataTable = response.getDataTable();
        
        var formatter = new google.visualization.PatternFormat('<a href="mailto:{0}">{0}</a>');
        formatter.format(this.currentDataTable, [emailAddressColumn]); // replace "emailAddressColumn" with the index of the column with the email addresses

        this.table.draw(this.currentDataTable, this.tableOptions);
    }
};

my2...@gmail.com

unread,
Jun 14, 2013, 4:08:54 PM6/14/13
to google-visua...@googlegroups.com
ok!

Thanks a lot!

A.
Reply all
Reply to author
Forward
0 new messages