You told, that: The #arrayToDataTable method doesn't support the 
object-literal syntax (the {v: value, f: "formatted value"} notation).

The formatter has to be supported in #arrayToDataTable, but it is supported 
in strange way.

This is working:
var table = [
  ['Year', 'Votes'],
  ['item 1',  387],
  ['item 2',  {v: 465, f: 'test'}],
  ['item 3',  {v: 610, f: 'test'}]
];

This not:
var table = [
  ['Year', 'Votes'],
  ['item 1',  {v: 387, f: 'test'}],
  ['item 2',  {v: 465, f: 'test'}],
  ['item 3',  {v: 610, f: 'test'}]
];

That is the problem... If you use the formatter in the first value, 
corechart gives you the error "Invalid value in 0,1". I mean that is not 
correct.


Dne pátek, 17. srpna 2012 17:20:19 UTC+2 asgallant napsal(a):
>
> Your example works exactly as it is supposed to.  The tooltip for "Item 1" 
> says "Votes: 387" while the tooltips for "Item 2" and "Item 3" both say 
> "Votes: test".  What is the problem here?
>
> On Friday, August 17, 2012 2:12:16 AM UTC-4, Zdenek wrote:
>>
>> Hi, I dont think so. There is written in the example, that it is possible 
>> to use {v: value, f: 'formatted value'} (
>> https://developers.google.com/chart/interactive/docs/datatables_dataviews#arraytodatatable
>> ).
>> But try thisone table data
>>
>> var table = [
>>   ['Year', 'Votes'],
>>   ['item 1',  387],
>>   ['item 2',  {v: 465, f: 'test'}],
>>   ['item 3',  {v: 610, f: 'test'}]
>> ];
>>
>> it is working and there are formatted all rows except "item 1". I don't 
>> know why, I think there is an error in the google.corechart.
>>
>>

-- 
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/-/Bwkh4WH4CxYJ.
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.

Reply via email to