drawing box plot in using google chart api

280 views
Skip to first unread message

Shaiful Chowdhury

unread,
Aug 19, 2014, 6:10:52 PM8/19/14
to google-visua...@googlegroups.com
Hi,

I am trying to draw box plot for one of my projects. Say I have an array with indexes 260, 360, 589, 760, 1400. Each index contains the count of it's own occurrences. So if the value of the array at index 260 is 50, this means I have 50 of 260s. Now I want to show the distribution of these values. And I will have at least 10 arrays with the same indexing and counts (might be different for different arrays).

For example,

for an array a1, the series could be like: 260,260,260, 360,1400,1400

so in my array a1 the values are: a1[260]=3, a1[360]=1 and so on. I will have similar observations for array a2, a3 and so on.

Now I want to draw box plot for each of the arrays. 

Can anybody tell me how to do that in google chart api. People are modifying candlesticks for that, but I don't get it. It would be great to have an working example with code.


Thanks in advance,

Shaiful

Andrew Gallant

unread,
Aug 19, 2014, 7:56:51 PM8/19/14
to google-visua...@googlegroups.com
A box plot typically involves plotting quartiles (or some other interval).  If you are planning on plotting them, how will they be derived from your data?  If not, then a box plot isn't really what you are looking for; can you provide an example of what you want to achieve?

Shaiful Chowdhury

unread,
Aug 19, 2014, 9:19:18 PM8/19/14
to google-visua...@googlegroups.com
Hi I think I can draw it by using candlesticks directly. I will use the lowest value as low, highest value as high, 25th percentile as opening and 75th percentile as closing. I just have to figure out how to use the median. But thank you anyway.

Andrew Gallant

unread,
Aug 19, 2014, 10:23:32 PM8/19/14
to google-visua...@googlegroups.com
The API has intervals to handle this sort of thing - you don't have to resort to using a CandleStickChart.
Reply all
Reply to author
Forward
0 new messages