Yes, thank you!
I add p: {/* properties */} in the return of calc function. But when I 
don't have the calc function?
My code is like this:

  view.setColumns([0, 1, 2, 3, 4, 5,
            {
                type: 'number',
                label: 'LUN N.',
                calc: function (dt, row) {
                    var val = (dt.getValue(row, 6) / dt.getValue(row, 3));
                    return {v: val, f: formatter.formatValue(val), p: 
{'style': 'background-color:#E6E6FA;'}};
                }
            },

How can I color columns between 0 and 5. They are colored in the original 
table of but in the view they do not inherit that color. Do you have an 
idea? Thanks!

Rita


Il giorno venerdì 22 novembre 2013 17:10:41 UTC+1, asgallant ha scritto:
>
> If memory serves, you should be able to set cell properties in the return 
> value of the "calc" function of a DataView column.  The format should be:
>
> return {v: value, f: formattedValue, p: {/* properties */}};
>
> On Friday, November 22, 2013 9:41:05 AM UTC-5, Rita wrote:
>>
>> I solved with your suggestion, thanks!
>> Now do you know how can I color the cell in particular column of the 
>> DataView? I cannot find the right way to add the property "p: {'style: 
>> background-color:#E6E6FA';}" as I do in DataTable, however I don't need to 
>> define range for color, I need just one.
>>
>> Thanks again.
>>
>> Rita
>>
>>
>> Il giorno mercoledì 20 novembre 2013 17:46:17 UTC+1, asgallant ha scritto:
>>>
>>> Do you want to do the manipulation on the results of the group function 
>>> or on the data the function is grouping?
>>>
>>> If you want to do the manipulation after the grouping, you can use a 
>>> DataView, like this: 
>>> http://jsfiddle.net/asgallant/G77eJ/<http://www.google.com/url?q=http%3A%2F%2Fjsfiddle.net%2Fasgallant%2FG77eJ%2F&sa=D&sntz=1&usg=AFQjCNFgIGPH6Swac-pt33JZKXVXcW_R6g>
>>>
>>> On Wednesday, November 20, 2013 10:26:01 AM UTC-5, Rita wrote:
>>>>
>>>> Hi everybody,
>>>> I am using the function google.visualization.data.group() on a 
>>>> DateTable to do a group by on rows for applying the aggregation function  
>>>> google.visualization.data.sum.
>>>> I'd like to manipulate the result of the fuction sum to show it as a 
>>>> percentage depending on the value on a column of the same table grouped. 
>>>> Could you suggest a way to do it? 
>>>> I read about the modifier function but it applies before the group by 
>>>> but I need to apply maths function after getting the output.
>>>>
>>>> Thansk in advance!
>>>>
>>>> Regards
>>>> Rita
>>>>
>>>

-- 
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/groups/opt_out.

Reply via email to