stacking charts

46 views
Skip to first unread message

Zdravko Balorda

unread,
Jan 8, 2016, 10:50:44 AM1/8/16
to Google Visualization API
Is there a way to stack many charts with common x axis and several y axes on top of each other.
Cross hair would cut through all charts. Tool-tip would show all points.

Great tool, though. It's really cleverly designed.
Best regards, Zdravko

Sergey Grabkovsky

unread,
Jan 8, 2016, 10:58:24 AM1/8/16
to Google Visualization API
Hi Zdravko,

There is no way to stack series that map to different target (y) axes on top of each other. The reason for this is simple: it wouldn't make any sense nor convey any useful information.

The entire point of having multiple y axes is because the scaling is different across series. The entire point of stacking is to get a cumulative size because all the data are related to each other (on the same scale). Since the series are on different scales, it doesn't make sense to add them together, and therefore doesn't make sense to stack them.

--
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/270005ff-1d78-45a5-b4bc-5dc61acd9e67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com

Zdravko Balorda

unread,
Jan 8, 2016, 11:16:11 AM1/8/16
to Google Visualization API


Hi Sergey!
Is it that simple?!
The point of stacking is that I need several (many) charts in sync horizontally, but having different y-axes it would be
 inappropriate to put them all on the same chart.
I have 4 graphs (each 2 line), conceptually different (so they would normally be visualized in separate charts) but preferably
sync horizontally (being in the same time domain).
Also common too-ltip and everything,
Is it really redundant? Not conveying any useful info?
Puting all 8 lines in a single chart is a mess.

Regards, Zdravko

Sergey Grabkovsky

unread,
Jan 8, 2016, 11:19:59 AM1/8/16
to Google Visualization API
Maybe I'm misunderstanding. Can you post a screenshot of what you have now, and perhaps a drawing of what you want?

I maintain that it would be wrong to stack two series for which the axis scaling is significantly different.

--
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.

For more options, visit https://groups.google.com/d/optout.

Daniel LaLiberte

unread,
Jan 8, 2016, 5:31:28 PM1/8/16
to Google Visualization API
If you mean stacking like the items in a stacked column chart, one chart above the other, this would make sense.  I suspect Sergey was thinking of overlaying.

To get multiple charts to align in their hAxes, just set these options the same for each chart, changing values according to your needs:

var options =  {
  width: 1234,
  chartArea: {
    width: 1000,
    left: 100
  },
  hAxis: {
    viewWindow: { 
      min: leftmostValue,
      max: rightmostValue
    }
}



For more options, visit https://groups.google.com/d/optout.



--

Zdravko Balorda

unread,
Jan 11, 2016, 3:25:52 AM1/11/16
to Google Visualization API
Hi!

Yes, I do that, Daniel. Here is attached screenshot. It's a blood pressure log above heart rate. It would be great if this could be a single
chart with common tooltip. cross hair, even panning and zooming... And I have many more such cases.

Regards, Zdravko


google.png

Daniel LaLiberte

unread,
Jan 11, 2016, 8:22:35 AM1/11/16
to Google Visualization API
Hi Zdravko,

We have thought about ways to coordinate multiple charts similar to what your example illustrates, perhaps as an enhancement to the Dashboard support.  The general complication is that the current design makes lots of assumptions about having control in each chart over all aspects of the drawing and interaction.   We are accounting for this in our new design, so multi-chart compositions will likely be supported in the future.

--
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.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages