Hi Andrew,
Thanks for your valuable reply..
-Rk.Moorthy
On Tuesday, 29 July 2014 04:36:59 UTC+5:30, Andrew Gallant wrote:
>
> You can use a DataView to calculate each data series as a percent of the
> total:
>
> var columns = [0];
> for (var i = 1; i < data.getNumberOfColumns(); i++) {
> columns.push({
> type: 'number',
> label: data.getColumnLabel(i),
> calc: (function (x) {
> return function (dt, row) {
> var val = dt.getValue(row, x);
> var total = 0;
> for (var i = 1; i < dt.getNumberOfColumns(); i++) {
> total += dt.getValue(row, i);
> }
> var pct = val / total;
> var formattedValue = dt.getFormattedValue(row, x) + ' (' +
> (pct * 100).toFixed(2) + '%)';
> return {v: pct, f: formattedValue};
> };
> })(i)
> });
> }
> var view = new google.visualization.DataView(data);
> view.setColumns(columns);
>
> On Monday, July 28, 2014 2:32:29 AM UTC-4, Rk MooRthy Rajendran wrote:
>>
>> Hi Andrew,
>>
>> Thanks for your valuable reply.
>>
>> Now i have to put drill down stacked bar chart as percentage wise.
>>
>> Do you have any idea or sample code for regarding this..???
>>
>> Thanks in Advance..
>>
>> -Rk.MooRthy
>>
>> On Saturday, 26 July 2014 06:03:56 UTC+5:30, Andrew Gallant wrote:
>>>
>>> Set the "isStacked" option to true.
>>>
>>> On Friday, July 25, 2014 2:19:11 AM UTC-4, Rk MooRthy Rajendran wrote:
>>>>
>>>> Hi,
>>>>
>>>> It was very useful to me, very thank to u guys.
>>>>
>>>> Now i have to add stacked bar chart for my requirement.
>>>>
>>>> Can u any one help me regarding that..???
>>>>
>>>> -Rk.MooRthy
>>>>
>>>>
>>>> On Wednesday, 23 July 2014 12:38:35 UTC+5:30, Rk MooRthy Rajendran
>>>> wrote:
>>>>>
>>>>> Thanks, Its working fine
>>>>>
>>>>> -Rk,MooRthy
>>>>>
>>>>>
>>>>> On Tuesday, 15 January 2013 04:23:39 UTC+5:30, Choy wrote:
>>>>>>
>>>>>> Here is the format of my chart: http://jsfiddle.net/asgallant/zwPuU/
>>>>>>
>>>>>> I would like to add drill down functionality - Clicking on USA should
>>>>>> yield another chart with US states etc. All the charts would be
>>>>>> clickable
>>>>>> to a drill down version.
>>>>>>
>>>>>> I understand I have to use the selection event, could you give me an
>>>>>> example of that?
>>>>>>
>>>>>> Thanks in advance!
>>>>>>
>>>>>>
--
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.