Statistic Chart

24 views
Skip to first unread message

Tong Sun

unread,
Jul 11, 2015, 5:10:59 PM7/11/15
to google-visua...@googlegroups.com
I've checked the Charts Gallery here and also checked the Additional Charts page, but didn't find a chart for statistic purpose like this:


I.e., on the chart, it shows the minimum, maximum, and mean value of a distribution. 

The candlestickchart, https://google-developers.appspot.com/chart/interactive/docs/gallery/candlestickchart, is very close but it miss the mean/average value.

I'd assume such statistic chart to be very popular and in high demand for both academic and commercial worlds, can we have them some day please? 

Meanwhile, is there any exiting graph that can represent such minimum, maximum, and mean value concept on the graph? 

Thanks


Daniel LaLiberte

unread,
Jul 12, 2015, 6:56:04 AM7/12/15
to google-visua...@googlegroups.com
Hi Tong,

Though we don't have a specific chart type for what you want, there are a variety of intervals that can be drawn, and you can draw nothing but intervals if you use a scatter chart and make the point size 0.  For the documentation on intervals, see  https://developers.google.com/chart/interactive/docs/gallery/intervals

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.



--
dlaliberte@Google.com   5CC, Cambridge MA
daniel.laliberte@GMail.com 9 Juniper Ridge Road, Acton MA

Tong Sun

unread,
Jul 12, 2015, 7:16:50 PM7/12/15
to google-visua...@googlegroups.com
Ah, yes Daniel, that's exactly the chart that I was looking for. Thanks.

From the intervals documentation, I get the box plot chart example working at


Now I only want minimum, maximum, and mean, not the first and thirdQuartile, so I tried to remove them, as https://jsfiddle.net/amnbuzup/1/, but it is not working. Is it possible for the box plot chart just to show the minimum, maximum, and mean values? 

The most important question for me is, is it possible to show multiple series on the same graph? 

Suppose the graph from https://jsfiddle.net/amnbuzup/ represent different measurements taken from a person over a period of time. Is it possible to show a second or even a third or forth's person's data on the same chart? 

I.e., suppose column/measurement "a" is blood pressure, and "e" is pulse, I want column "a" shows the blood pressure of all those people, each in their own color, and so for column "e" and all other columns as well. Is it possible? 

Thanks

Tong Sun

unread,
Jul 12, 2015, 8:04:12 PM7/12/15
to google-visua...@googlegroups.com


On Sunday, July 12, 2015 at 7:16:50 PM UTC-4, Tong Sun wrote:
Ah, yes Daniel, that's exactly the chart that I was looking for. Thanks.

From the intervals documentation, I get the box plot chart example working at


Now I only want minimum, maximum, and mean, not the first and thirdQuartile, so I tried to remove them, as https://jsfiddle.net/amnbuzup/1/, but it is not working. Is it possible for the box plot chart just to show the minimum, maximum, and mean values? 

I tried to explore more on this end, and has come up with a graph 


It is almost working, just without the boxes, however, if you mouse over the value points on the graph, the tool-tip can still show the values. Just no boxes on the graph. 

Please work on this one instead, because it's plain and simple, without calculation necessary. Thanks

Tong Sun

unread,
Jul 12, 2015, 8:17:33 PM7/12/15
to google-visua...@googlegroups.com


On Sunday, July 12, 2015 at 8:04:12 PM UTC-4, Tong Sun wrote:


On Sunday, July 12, 2015 at 7:16:50 PM UTC-4, Tong Sun wrote:
Ah, yes Daniel, that's exactly the chart that I was looking for. Thanks.

From the intervals documentation, I get the box plot chart example working at


Now I only want minimum, maximum, and mean, not the first and thirdQuartile, so I tried to remove them, as https://jsfiddle.net/amnbuzup/1/, but it is not working. Is it possible for the box plot chart just to show the minimum, maximum, and mean values? 

I tried to explore more on this end, and has come up with a graph 


It is almost working, just without the boxes, however, if you mouse over the value points on the graph, the tool-tip can still show the values. Just no boxes on the graph. 

Tried another one, https://jsfiddle.net/a0Lb7mgc/, this time I saw the boxes, but the tool-tip is not showing the minimum, maximum, and mean any more. 
How can I have them both, the boxes and tool-tips. Thanks

Daniel LaLiberte

unread,
Jul 12, 2015, 11:23:59 PM7/12/15
to google-visua...@googlegroups.com
It seems that setting the lineWidth to 0 causes the tooltip contents to change to ignore the interval values.  Not sure why that is happening, but we'll have to investigate.   You might try instead setting up a custom tooltip for the series.  See https://developers.google.com/chart/interactive/docs/customizing_tooltip_content#customizing-tooltip-content

Regarding your earlier question, yes, you can have more than one series of values each with its own intervals.  The trick is only that you must insert the interval columns after each series, so a subsequent series goes after the previous series and its interval columns.

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Tong Sun

unread,
Jul 14, 2015, 3:11:14 PM7/14/15
to google-visua...@googlegroups.com
 Thanks

On Sun, Jul 12, 2015 at 11:23 PM, 'Daniel LaLiberte' via Google Visualization API <google-visua...@googlegroups.com> wrote:

Regarding your earlier question, yes, you can have more than one series of values each with its own intervals.  The trick is only that you must insert the interval columns after each series, so a subsequent series goes after the previous series and its interval columns.

Sorry I can't get it going. Can someone show me a working demo to examine instead please (to show a second or even a third or forth's person's data on the same chart)? The box plot chart working example at https://jsfiddle.net/amnbuzup/ is a good starting point, because there are enough columns to show at least three groups of minimum, maximum, and mean on the chart. You can just pretend that first several columns is for the first group, so on and so forth. 

It seems that setting the lineWidth to 0 causes the tooltip contents to change to ignore the interval values.  Not sure why that is happening, but we'll have to investigate.   You might try instead setting up a custom tooltip for the series.  See https://developers.google.com/chart/interactive/docs/customizing_tooltip_content#customizing-tooltip-content

No, custom tooltip is not the answer because I need the tooltip to show up at three places for all three values, minimum, maximum, and mean, instead of only one. 

Hope the issue around lineWidth, box-showing and tooltip can be fixed soon. 

Thanks

--
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/DHj_eQtKc18/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

Daniel LaLiberte

unread,
Jul 14, 2015, 4:00:10 PM7/14/15
to google-visua...@googlegroups.com
The problem might have been that you were not seeing any other series because of your lineWidth: 0 option, which hides all the first series as well.   Here is a mod of your jsfiddle that shows how to add a series after everything else, and how to change its options:  https://jsfiddle.net/amnbuzup/2/

Tong Sun

unread,
Jul 14, 2015, 8:10:19 PM7/14/15
to google-visua...@googlegroups.com
Ah, that's what you mean -- I was trying to do something else, because I've been trying to do, 

Suppose the graph from https://jsfiddle.net/amnbuzup/ represent different measurements taken from a person over a period of time. Is it possible to show a second or even a third or forth's person's data on the same chart side by side? 

I.e., show different series side by side (because most of them would be very similar). 

I guess the answer is no then. 

Thank you all the same for all your helps, Daniel!

Daniel LaLiberte

unread,
Jul 15, 2015, 12:11:11 AM7/15/15
to google-visua...@googlegroups.com
If you want to see series side-by-side, the best way to do that is by using a column chart.   If you change your line chart to a non-stacking column chart, then you will see one column for each series, but it will become obvious that you do not want to include all those extra series values which you have made invisible in the line chart by using lineWidth: 0.  Instead, you should probably compute a DataTable (or DataView) that just has one data column for each series that you do want to show followed by the intervals for that series.   You can turn off the display of the chart columns themselves with dataOpacity: 0.

Hope that is clear.
Reply all
Reply to author
Forward
0 new messages