It still doesn't look like you're passing the data, you're just using the
same name but it will be a different thing. If you're doing exactly what
you say you're doing, everything should work, but these issues usually come
from user error. If you link to a page, I can tell you exactly what to fix,
but from the one line you showed me, I still maintain that the variable
"link_wfc_core_stats_data" isn't a DataTable, but a click event which won't
have getNumberOfColumns() defined (because it's not a DataTable).

On Wed, Aug 19, 2015 at 10:29 AM Rishu Oberoi <rishuobe...@gmail.com> wrote:

> I agree, I'm passing link_wfc_core_stats_data and not table now.
> I am passing the data in a function as follows
>
>  $( "#downloadCSV" ).click(function(link_wfc_core_stats_data) {//accessing
> the method here}
>
> For some reason, I get the error saying getNumberOfColumns() is not a
> method, even when I pass data.
> What might be the reason?
>
> On Wed, Aug 19, 2015 at 8:37 AM, 'Sergey Grabkovsky' via Google
> Visualization API <google-visualization-api@googlegroups.com> wrote:
>
>> I'm pretty sure that jquery won't pass a datatable to your function. In
>> your function, the variable 'link_wfc_core_stats_data' will be a click
>> event, not a DataTable.
>>
>> On Tue, Aug 18, 2015 at 5:01 PM rishu oberoi <rishuobe...@gmail.com>
>> wrote:
>>
>>> Thanks for your reply. I actually tried link_wfc_core_stats_data as
>>> well but getting the same error. But I tried a jsfiddle and I see that it
>>> works. Probably I am doing something else wrong.
>>> I am passing the data in a function as follows
>>>
>>>  $( "#downloadCSV" ).click(function(link_wfc_core_stats_data)
>>> {//accessing the method here}
>>>
>>>
>>> On Tuesday, 18 August 2015 15:56:07 UTC-5, Sergey wrote:
>>>
>>>> Hi Rishu,
>>>>
>>>> The Table visualization (google.visualization.Table) is a separate
>>>> thing from the DataTable (google.visualization.DataTable, or
>>>> google.visualization.arrayToDataTable). DataTables have getNumberOfColumns,
>>>> but Tables don't. You're trying to call it on the Table 
>>>> (link_wfc_core_stats_table)
>>>> instead of your DataTable (link_wfc_core_stats_data).
>>>>
>>>> On Tue, Aug 18, 2015 at 4:53 PM rishu oberoi <rishu...@gmail.com>
>>>> wrote:
>>>>
>>> This is how I am creating my data table. Just including a snippet below.
>>>>>
>>>>>  link_wfc_core_stats_data =
>>>>> google.visualization.arrayToDataTable(dataArray);
>>>>>
>>>>> calculatePercentagesWithGlobalFactor(link_wfc_core_stats_data,PIPELINE_LINK_ALL);
>>>>> var link_wfc_core_stats_table = new
>>>>> google.visualization.Table(document.getElementById('link_wfc_core_stats_table'));
>>>>> link_wfc_core_stats_table.draw(link_wfc_core_stats_data,
>>>>> table_options);
>>>>>
>>>>> However, once the table is ready, when I try to use the table as -
>>>>> link_wfc_core_stats_table.getNumberOfColumns() - I get an error saying 
>>>>> that
>>>>> the method getNumberOfColumns does not exist.
>>>>>
>>>>> Why is that?
>>>>>
>>>>> --
>>>>> 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 google-visualization-api+unsubscr...@googlegroups.com.
>>>>>
>>>> To post to this group, send email to google-visua...@googlegroups.com.
>>>>
>>>>
>>>>> Visit this group at
>>>>> http://groups.google.com/group/google-visualization-api.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/google-visualization-api/2f71ed8a-1020-4a77-a820-59206c03f9b5%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/google-visualization-api/2f71ed8a-1020-4a77-a820-59206c03f9b5%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>> 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 google-visualization-api+unsubscr...@googlegroups.com.
>>> To post to this group, send email to
>>> google-visualization-api@googlegroups.com.
>>> Visit this group at
>>> http://groups.google.com/group/google-visualization-api.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/google-visualization-api/5a41f7f5-aa4c-4426-b21a-c43a0024fceb%40googlegroups.com
>>> <https://groups.google.com/d/msgid/google-visualization-api/5a41f7f5-aa4c-4426-b21a-c43a0024fceb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Google Visualization API" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/google-visualization-api/_SSjfhVfuhE/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> google-visualization-api+unsubscr...@googlegroups.com.
>
>
>> To post to this group, send email to
>> google-visualization-api@googlegroups.com.
>> Visit this group at
>> http://groups.google.com/group/google-visualization-api.
>>
> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-visualization-api/CAEwwup6yoJ4e7ZFN4R9QJXmS-GgD8ditU1tZAkRuTY0%2BS1iprw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/google-visualization-api/CAEwwup6yoJ4e7ZFN4R9QJXmS-GgD8ditU1tZAkRuTY0%2BS1iprw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>
>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Regards
> Rishupreet
>
> --
> 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 google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/CA%2BzX6%2BZLCjwdk1hx0ruf%2BAfKK6us8DbO8sn6wwPxE1r9yKOrKQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-visualization-api/CA%2BzX6%2BZLCjwdk1hx0ruf%2BAfKK6us8DbO8sn6wwPxE1r9yKOrKQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAEwwup5xyUQ4UujeOu6S99TJfKz-kLQWn4bbuoMc%3DSzWvyCaVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to