Stacked by seconds

18 views
Skip to first unread message

Dmitriy Sakulin

unread,
Jun 30, 2016, 12:17:38 PM6/30/16
to Google Visualization API
Hello, for simplicity I made this chart for question jsfiddle_1. Can I stack this bars by seconds or minutes or hours? New stacked bar should have value = 2 on Y-axis but not 1 i.e. new stacked bars it is sum. The problem is that my data it is just 2 column(time and value) and many many rows, so I can't to use 'isStacked' method.Here is result what I need after first link jsfiddle_2

Daniel LaLiberte

unread,
Jun 30, 2016, 12:29:36 PM6/30/16
to Google Visualization API
You have to combine the things to be stacked as multiple series (or columns) on the same row.  

What you want sounds closer to a Histogram, which counts up (or stacks) the items that end up in the same bucket based on a range of values for each bucket.  But the current Histogram doesn't work with timeofday values yet.

It would probably be best for you to build a new table by iterating through your data and adding more columns for values that have the same domain value.  

Other people have recently requested a way to handle this kind of data as you want.  Perhaps we should provide a utility that does this, similar in some ways to the other data manipulation utilities we have:  https://developers.google.com/chart/interactive/docs/reference#data-manipulation-methods

On Thu, Jun 30, 2016 at 12:17 PM, Dmitriy Sakulin <fac...@gmail.com> wrote:
Hello, for simplicity I made this chart for question jsfiddle_1. Can I stack this bars by seconds or minutes or hours? New stacked bar should have value = 2 on Y-axis but not 1 i.e. new stacked bars it is sum. The problem is that my data it is just 2 column(time and value) and many many rows, so I can't to use 'isStacked' method.Here is result what I need after first link jsfiddle_2

--
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/63b600e7-bf4a-446f-8672-de1487c6161d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Dmitriy Sakulin

unread,
Jun 30, 2016, 1:23:32 PM6/30/16
to Google Visualization API
So, how can I understood, need to add columns as many times as I have data. How can I do this ? Is it possible to add so many columns in loop with row (time and value)? Or what you mean ? Unfortunately I need to use timeofday because my data only hours:minutes:seconds if I understand correctly this is only way to display this. Can you give me a bit more information about it ? I really appreciate it.

четверг, 30 июня 2016 г., 20:29:36 UTC+4 пользователь Daniel LaLiberte написал:
You have to combine the things to be stacked as multiple series (or columns) on the same row.  

What you want sounds closer to a Histogram, which counts up (or stacks) the items that end up in the same bucket based on a range of values for each bucket.  But the current Histogram doesn't work with timeofday values yet.

It would probably be best for you to build a new table by iterating through your data and adding more columns for values that have the same domain value.  

Other people have recently requested a way to handle this kind of data as you want.  Perhaps we should provide a utility that does this, similar in some ways to the other data manipulation utilities we have:  https://developers.google.com/chart/interactive/docs/reference#data-manipulation-methods
On Thu, Jun 30, 2016 at 12:17 PM, Dmitriy Sakulin <fac...@gmail.com> wrote:
Hello, for simplicity I made this chart for question jsfiddle_1. Can I stack this bars by seconds or minutes or hours? New stacked bar should have value = 2 on Y-axis but not 1 i.e. new stacked bars it is sum. The problem is that my data it is just 2 column(time and value) and many many rows, so I can't to use 'isStacked' method.Here is result what I need after first link jsfiddle_2

--
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-visualization-api+unsub...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages