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.
var data = google.visualization.arrayToDataTable(arrayData, false);
var view = new google.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].
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.