I have a format for displaying links on the table

var options = { allowHtml: true, cssClassNames: someClass, width: 10, height: 10 }; var patterFormat = '<a href="http://somelink/{0}">{0}</a>'; var formatter = new google.visualization.PatternFormat(patterFormat); formatter.format(tableData, [0, 0]); table.draw(tableData, options); 

At the place {0}, purely about 10 thousand will be substituted. Take for example 12345. For whatever reason, a couple of weeks ago, this thing stopped working normally. I suspect that the fault of some kind of update. Now on html together such links:

 <a href="http://somelink/12345">12345</a> 

The following will be granted:

 <a href="http://somelink/12,345">12,345</a> 

A separator appears, which I do not need. The type of driver depends on the included locale in the browser. I know that I can use Number format, but how can I save the format of the link? The documentation did not find anything adequate.

    1 answer 1

    it all depended on the order of the formatters. Number formatter must be applied before the pattern.

     var numberFormat = new google.visualization.NumberFormat({ pattern: '0' }); numberFormat.format(tableData, 0); var patterFormat = '<a href="http://somelink/{0}">{0}</a>'; var formatter = new google.visualization.PatternFormat(patterFormat); formatter.format(tableData, [0, 0]); table.draw(tableData, options);