Clicking error

59 views
Skip to first unread message

Michał Sykutera

unread,
Jan 30, 2015, 9:03:13 AM1/30/15
to google-visua...@googlegroups.com
Hi,
when I style my Vis chart with cssClassNames and use two class names (with space between them), and click on the rows I get errors in my chrome console like :
 Uncaught InvalidCharacterError: Failed to execute 'remove' on 'DOMTokenList': The token provided ('orange-background large-font') contains HTML space characters, which are not valid in tokens.
 Uncaught InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('orange-background large-font') contains HTML space characters, which are not valid in tokens.

You can reproduce that here: https://developers.google.com/chart/interactive/docs/examples#custom_table_example, by clicking at table in Customized Table Example

Regards,
Michal Sykutera

Daniel LaLiberte

unread,
Jan 30, 2015, 9:48:18 AM1/30/15
to google-visua...@googlegroups.com
In the documentation for cssClassNames at https://developers.google.com/chart/interactive/docs/gallery/table it only talks about a single class name for each property, but this used to work, up until the last release, and we'll be able to fix it again. 

--
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 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/d/optout.



--
dlaliberte@Google.com   5CC, Cambridge MA
daniel.laliberte@GMail.com 9 Juniper Ridge Road, Acton MA

Michał Sykutera

unread,
Feb 3, 2015, 11:56:18 AM2/3/15
to google-visua...@googlegroups.com
It would be great if you fixed it. Thanks for replay.


W dniu piątek, 30 stycznia 2015 15:48:18 UTC+1 użytkownik Daniel LaLiberte napisał:
In the documentation for cssClassNames at https://developers.google.com/chart/interactive/docs/gallery/table it only talks about a single class name for each property, but this used to work, up until the last release, and we'll be able to fix it again. 
On Fri, Jan 30, 2015 at 9:03 AM, Michał Sykutera <msyk...@gmail.com> wrote:
Hi,
when I style my Vis chart with cssClassNames and use two class names (with space between them), and click on the rows I get errors in my chrome console like :
 Uncaught InvalidCharacterError: Failed to execute 'remove' on 'DOMTokenList': The token provided ('orange-background large-font') contains HTML space characters, which are not valid in tokens.
 Uncaught InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('orange-background large-font') contains HTML space characters, which are not valid in tokens.

You can reproduce that here: https://developers.google.com/chart/interactive/docs/examples#custom_table_example, by clicking at table in Customized Table Example

Regards,
Michal Sykutera

--
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 google-visualization-api+unsub...@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/d/optout.



--
dlali...@Google.com   5CC, Cambridge MA
daniel.l...@GMail.com 9 Juniper Ridge Road, Acton MA

Laughninja

unread,
Jan 27, 2017, 5:05:49 AM1/27/17
to Google Visualization API
Hi,

we had a similar Issue, with leading spaces in the className property. It used to work fine and it suddenly stopped working.

var current = dataTable.getProperty(row, c, 'className') || "";
dataTable.setProperty(row, c, 'className', current + ' currentDate');
table.draw(data, tableOptions);

If current was empty, this would cause the following error:
> "Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty."

When trimming the string works fine, even with multiple classes set:

dataTable.setProperty(row, c, 'className', (current + ' currentDate').trim());

I realize that this might be a usage issue, but maybe the API could sanatize the inputs? At least I hope by leaving this here, it'll help others.

Best,
Simon

Daniel LaLiberte

unread,
Jan 27, 2017, 9:35:59 AM1/27/17
to Google Visualization API
Hi Simon,

Thanks for your report.  We do try to sanitize inputs, but this is one we missed.  

--
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 google-visualization-api+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages