This is a very basic JavaScript question, and it is very easy to ensure
that the variables have values before they are used. E.g.
var a = 123;
var b = 456;
var data = new google.visualization.DataTable();
data.addColumn('string', 'item');
data.addColumn('number', 'value');
data.addRows([
['A', a],
['B', b],
...
So it seems there must be something more to the question. Perhaps you
should give a more complete example of what you are doing.
On Tue, Nov 15, 2016 at 1:40 PM, P-A <[email protected]> wrote:
>
>
> Le lundi 7 septembre 2015 08:16:29 UTC-4, Mario Lopes a écrit :
>>
>> I am trying to create a pie chart where rather than the data being an
>> actual number, it is the name of a variable as I am doing mathematical
>> operations to the raw data from a database.
>>
>> var data = new google.visualization.DataTable();
>> data.addColumn('string', 'item');
>> data.addColumn('number', 'value');
>> data.addRows([
>> ['A', a],
>> ['B', b],
>> ['C', c],
>> ['D', d],
>> ['E', e],
>> ['F', f],
>> ['G', g]
>> ]);
>>
>> The only time that I can display the graph is when a, b, c, d, e, f, and
>> g are actual numerical values. Unfortunately, I have no idea of knowing
>> those values as they are based on the data from the database. Any help is
>> greatly appreciated. Thanks.
>>
>
>
> I have the same problem, if anyone have an anwser !
>
> --
> 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 google-visualization-api@
> googlegroups.com.
> Visit this group at https://groups.google.com/
> group/google-visualization-api.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-visualization-api/bf4d131c-c10a-4c2b-8f81-
> 0699f1dfc0e4%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/bf4d131c-c10a-4c2b-8f81-0699f1dfc0e4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]> 5CC, Cambridge 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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJM4C-5jKmKuAkLGdK%3DVKj%3DCbbHHAKBJvrG0DmNDd0iR4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.