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

Reply via email to