I will try to make it clear, sorry about the confusion.
If I have this array (emplyee salarry) for one month
* ['Employee Name', 'Salarry 1st month'], ['Mike', 18,500],['Bob',
35000],['Alice', 44000], ['Fritz', 18500]*
I can get this
['Employee Name', 'Salarry 1st month'],
['Mike', 18,500],
['Bob', 35000],
['Alice', 44000],
['Fritz', 18500]], false);
*but if I have two arrays (emplyee salarry) of two differnt months *
['Employee Name', 'Salarry 1st month ', 'Salarry 21 month '],
['Mike', 18,500], ['Mike', 18,500],
['Bob', 35,000,], ['Bob', 44,000],
['Alice', 44,000,], ['Alice', 60,000],
['Fritz', 18500,], ['Fritz', 35,000]
How I can get this
['Employee Name', 'Salarry 1st month ', 'Salarry 21 month '],
['Mike', 18,500, 25,000],
['Bob', 35,000, 44,000],
['Alice', 44,000, 60,000],
['Fritz', 18500, 30,000]], false);
Hope this is much clear.
Thanks!
On Monday, August 20, 2012 1:50:47 PM UTC-7, asgallant wrote:
>
> If you handle this in PHP, you can deliver it in the right format to
> populate the DataTable without any further work on the client-side, which
> makes it very handy especially if you want to implement dynamically
> fetching data via AJAX calls.
>
> What, exactly, does the output from MySQL look like in terms of structure?
> Is that one cell of data, 2 rows x 1 column, or 2 rows x 4 columns? Or
> something else entirely?
>
> On Monday, August 20, 2012 2:33:14 PM UTC-4, karim wrote:
>>
>> Thanks a lot for taking a look to my question!
>> I use PHP but it should be ok if I can do it on the client-side.
>> Thanks again!
>>
>> -Karim
>>
>> On Monday, August 20, 2012 11:14:24 AM UTC-7, asgallant wrote:
>>>
>>> Do you want to do the conversion server-side or client-side? If
>>> server-side, what language are you working in?
>>>
>>> On Monday, August 20, 2012 12:08:09 PM UTC-4, karim wrote:
>>>>
>>>> I'm new with Google chart API, I'm trying to learn and I run into a
>>>> problem,
>>>>
>>>> I generate an array from Mysql database at this format ,
>>>> {X, 1},{Y, 12}, {Z,23},{Y, 7},
>>>> {X, 10},{Y, 8}, {Z,3},{Y, 15}
>>>>
>>>> the array should be formatted to:
>>>> [X, 1, 10],
>>>> [Y, 12, 8],
>>>> [Z,23, 3],
>>>> [Y, 7, 15]
>>>> so I could render the data into a Bar-chart.
>>>>
>>>> Does someone have an idea, how to do that, I will really appropriate it!
>>>>
>>>> Thanks in advance!
>>>>
>>>> -Karim
>>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/GXidSiSMuI0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.