Nice!

Works just fine.

This has been a very helpful thread, that I hope will help others too. I searched for days trying to find this information, without success.

Very grateful for your knowledge and assistance.

I think I now everything I wanted and needed.
 [:-)}

On 12/22/2014 11:10 AM, 'Daniel LaLiberte' via Google Visualization API wrote:
Ken,

You can get the column labels from your DataTable data with data.getColumnLabel(i). So use that expression instead of your literal string value. In fact, you could use a loop to setup all of the columns for your DataView, building a columns array that you then pass to view.setColumns().

On Mon, Dec 22, 2014 at 11:03 AM, Ken Burkhalter <[email protected] <mailto:[email protected]>> wrote:


    On Sunday, December 21, 2014 7:39:05 PM UTC-5, Daniel LaLiberte
    wrote:

        ... to use the DataTable (without the DataView) would have to
        instead add a header row to your arrayData that specifies the
        types of the columns and pass that to arrayToDataTable().

     Daniel - this morning I just noticed that using the dataView
approach caused the labels to disappear from my chart legend. They are in the 1st line (header) of the CSV file and previously
    provided labels with the non-DataView approach.

    But as soon as I add the DataView visualization the labels disappear.

    I restored labels with sourceColumn options (as exampled below)
    but would prefer to pass the labels in the CSV file for
    generality.  Is that possible?  I couldn't discover a way to make
    it work.

    |
    vardata =google.visualization.arrayToDataTable(arrayData,false);
    varview =newgoogle.visualization.DataView(data);
    view.setColumns([
    {sourceColumn:0,type:"number",label:"Hour"},
    {sourceColumn:1,type:"number",label:"Dwn"},
    {sourceColumn:2,type:"number"},
    {sourceColumn:3,type:"number",label:"Mid"},
    ....
    ....

    |


    Thanks.
-- 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]
    <mailto:[email protected]>.
    To post to this group, send email to
    [email protected]
    <mailto:[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] <mailto:[email protected]> 5CC, Cambridge MA
[email protected] <mailto:[email protected]> 9 Juniper Ridge Road, Acton MA
--
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/TxIRHjJ34sc/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>. Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

--
-ken burkhalter
No trees were killed in the sending of this message, but
a large number of electrons were terribly inconvenienced.

--
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