Thanks, proposed workaround did the job.

Note:
Before converting it to JSON, from PHP script cell is initiated as: $row[8] 
= array('v'=>NULL, 'f'=>'Cell text');  

On Friday, April 24, 2015 at 2:24:38 PM UTC+2, Daniel LaLiberte wrote:
>
> Goce,
>
> There is a check in the format function for whether the column type is 
> number; if not, it does nothing.  But if the value of a cell is otherwise 
> non-null, it treats it as a number.  We could probably add a check to not 
> format inappropriate values.  
>
> A workaround for you might be that you could simply store the string value 
> in the formatted representation for the cell, and leave null as the value.  
> In that case, the formatter will not change the formatted representation.  
> Instead of a simple value, just use {v: null, f:'Your string'}.
>
> On Fri, Apr 24, 2015 at 3:01 AM, Goce Ribeski <[email protected] 
> <javascript:>> wrote:
>
>> I'm formatting an table column to 2 decimal places:
>>
>> var formatter = new google.visualization.NumberFormat({fractionDigits: 2
>> });
>> formatter.format(data, 7);
>>
>> The problem:
>> In that column, last few cells are containing *strings*, and after the 
>> formatting they are replaced with: "*NaN.aN*"
>> Is there way to format the column but preserve the strings?
>> (tip: if column with all strings is equally formatted, then it is all 
>> preserved - no NaN appears there.)
>>
>> -- 
>> 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 [email protected] 
>> <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> 
>  - 978-394-1058
> [email protected] <javascript:>   5CC, Cambridge MA
> [email protected] <javascript:> 9 Juniper Ridge Road, Acton MA
>  

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to