CandleStick API not accepting colours

217 views
Skip to first unread message

mohr...@zoho.com

unread,
Aug 16, 2011, 9:23:52 AM8/16/11
to Google Visualization API
Hi All,

The candlestick API is not accepting colours as mentioned in the API
reference. e.g. the following code (from the visualisation playground)
does not give different coloured bars as expected from the API. Is
there something I am missing?

function drawVisualization() {
// Populate the data table.
var dataTable = google.visualization.arrayToDataTable([
['Mon',20,28,38,45],
['Tues',31,38,55,66],
['Wed',50,55,77,80],
['Thurs',77,77,66,50],
['Fri',68,66,22,15],
], true);

// Draw the chart.
var chart = new
google.visualization.CandlestickChart(document.getElementById('visualization'));
chart.draw(dataTable, {legend:'none', width:600, height:400},
{series: {0:{color: 'black'}, 3:{color: 'red'}}});
}

​thanks
Mohit

asgallant

unread,
Aug 16, 2011, 10:40:52 AM8/16/11
to google-visua...@googlegroups.com
It works just fine, but probably not the way you expect it to.  There is only one "series" in a candlestick chart, despite there being five columns.  If you use those options to draw the chart, you get black candlestick markers.

mohr...@zoho.com

unread,
Aug 17, 2011, 1:37:55 AM8/17/11
to Google Visualization API
Thats very restrictive. I thought each candle represents a series in
itself... the API documentation suggests that...any plans on
supporting different color candlesticks in the same chart?

Jinji

unread,
Aug 17, 2011, 10:32:12 AM8/17/11
to google-visua...@googlegroups.com
Sorry, we can't discuss future plans (legal issue).


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


Reply all
Reply to author
Forward
0 new messages