Actually, using a DataView is probably not going to help as much as I
thought.  What you'll probably need to do is this:

   1. Get the distinct values in the keywords and clients, using
   getDistinctValues(columnIndex).
   2. Set up an empty Object that will map from each keyword to the row
   index for that keyword.
   3. Set up another Object to map from each client to the column index for
   that client.
   4. Create an empty DataTable.
   5. Iterate through your rows of data, and as you encounter a keyword
   that is not in your map, add a new row to the data table, and add to the
   Object map.  Either way, you have the row index.
   6. Similarly, for each client, add it to the map if it is not there, and
   add a column to the data table..
   7. Given the row and column index, you can do setValue() with the data.

Everything that is not set will be undefined, and should be treated like
null.

Hope that helps.  Not exactly trivial, and all the more reason we should
provide some helper utilities to make this easier for people.




On Wed, Jun 24, 2015 at 5:31 PM, SANTHOSH THANGARAJ <
[email protected]> wrote:

> Hi Daniel,
>
> Thanks a lot. I will try to use DataView.
>
> Best Regards
> Santhosh
>
>>   --
> 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.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 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