You need to give the data columns names.
You can do this by passing a header row to arrayToDataTable. Also, you need
to remove the 2nd parameter (or change it to false); 'true' tells
arrayToDataTable
that the first row a data row and not a header row.

See example:
http://savedbythegoog.appspot.com/?id=6f4cd1e6987d36eca2f9d126dd2d25aec4174b8d

On Sat, Feb 4, 2012 at 6:49 PM, Xavier Gumara <[email protected]> wrote:

> Hi all,
>
> I have been playing around with candlestick charts but I can't find
> how to specify a label for the different series.
>
> I have this code:
>
> function drawVisualization() {
>   // Populate the data table.
>    var dataTable = google.visualization.arrayToDataTable([
>       ['Test',20,28,38,45, 23,24,25,26, 12,15,18,21,11,14,17,25]],
> true);
>
>    // Draw the chart.
>    var chart = new
>
> google.visualization.CandlestickChart(document.getElementById('visualization'));
>    chart.draw(dataTable, {width:600, height:400});
> }
>
>
> And I would like to add a string for each different colour: blue, red,
> yellow and green.
>
> Does anybody know how can I accomplish that?
>
> Thank you in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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.

Reply via email to