ComboCharts - Bars and Line with different domains

33 views
Skip to first unread message

Ray

unread,
Aug 23, 2015, 9:19:29 AM8/23/15
to Google Visualization API
I have a Combochart where the x axis is of type 'Date' and the line series has a value for every weekday (Jun 30 2015, Jul 1 2015, Jul 2 2015, Jul 3 2015, Jul 6 2015, etc..) and the bar series has a value for each month (Jun 2015, Jul 2015, etc). Right now, the chart is drawing a bar for each day so for each month, it draws about 22 bars (1 for each weekday). How do I get it to draw just one bar for each month?

Ray

unread,
Aug 23, 2015, 4:19:03 PM8/23/15
to Google Visualization API
Just thought I'd clear things up a little bit:

Basically, the bar series is less granular than the line series. It has values for each month rather than each weekday. I need the chart to display bars for each month for 1 series and points for each weekday for the other series.

Daniel LaLiberte

unread,
Aug 24, 2015, 8:58:47 AM8/24/15
to Google Visualization API
Ray,

Your question is clear. Thanks.   We don't have a solution at this time, but we expect we can compute the column width by ignoring intervening null values, so the result would be as you expected.  Not sure when we can get to this.


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/bee42451-a0da-4547-807b-43c02042e3f1%40googlegroups.com.

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

Ray

unread,
Aug 24, 2015, 1:21:40 PM8/24/15
to Google Visualization API
Thanks Daniel.
Is there a way to change the format of the date that is displayed on tooltips for one series and not the other? For the more granular series, I want the tooltips to display the date in the format 'MMM dd, y' and for the less granular bar series, I want the format to be 'MMM y' since its value changes monthly rather than daily. Using the .format() method changes the format on tooltips for both series:

var formatter = new google.visualization.DateFormat({pattern: 'MMM y'});
formatter.format(data, 0);

Is there a way to specify a unique format for both series?


On Monday, August 24, 2015 at 8:58:47 AM UTC-4, Daniel LaLiberte wrote:
Ray,

Your question is clear. Thanks.   We don't have a solution at this time, but we expect we can compute the column width by ignoring intervening null values, so the result would be as you expected.  Not sure when we can get to this.

On Sun, Aug 23, 2015 at 4:19 PM, Ray <ray2...@gmail.com> wrote:
Just thought I'd clear things up a little bit:

Basically, the bar series is less granular than the line series. It has values for each month rather than each weekday. I need the chart to display bars for each month for 1 series and points for each weekday for the other series.

On Sunday, August 23, 2015 at 9:19:29 AM UTC-4, Ray wrote:
I have a Combochart where the x axis is of type 'Date' and the line series has a value for every weekday (Jun 30 2015, Jul 1 2015, Jul 2 2015, Jul 3 2015, Jul 6 2015, etc..) and the bar series has a value for each month (Jun 2015, Jul 2015, etc). Right now, the chart is drawing a bar for each day so for each month, it draws about 22 bars (1 for each weekday). How do I get it to draw just one bar for each month?

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

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.



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

Daniel LaLiberte

unread,
Aug 24, 2015, 1:39:51 PM8/24/15
to Google Visualization API
You could do custom tooltips for everything.  That's the only way you are going to get the domain values displayed differently for each series.  See  https://developers.google.com/chart/interactive/docs/customizing_tooltip_content

On Mon, Aug 24, 2015 at 1:21 PM, Ray <ray2...@gmail.com> wrote:
Thanks Daniel.
Is there a way to change the format of the date that is displayed on tooltips for one series and not the other? For the more granular series, I want the tooltips to display the date in the format 'MMM dd, y' and for the less granular bar series, I want the format to be 'MMM y' since its value changes monthly rather than daily. Using the .format() method changes the format on tooltips for both series:

var formatter = new google.visualization.DateFormat({pattern: 'MMM y'});
formatter.format(data, 0);

Is there a way to specify a unique format for both series?

On Monday, August 24, 2015 at 8:58:47 AM UTC-4, Daniel LaLiberte wrote:
Ray,

Your question is clear. Thanks.   We don't have a solution at this time, but we expect we can compute the column width by ignoring intervening null values, so the result would be as you expected.  Not sure when we can get to this.

On Sun, Aug 23, 2015 at 4:19 PM, Ray <ray2...@gmail.com> wrote:
Just thought I'd clear things up a little bit:

Basically, the bar series is less granular than the line series. It has values for each month rather than each weekday. I need the chart to display bars for each month for 1 series and points for each weekday for the other series.

On Sunday, August 23, 2015 at 9:19:29 AM UTC-4, Ray wrote:
I have a Combochart where the x axis is of type 'Date' and the line series has a value for every weekday (Jun 30 2015, Jul 1 2015, Jul 2 2015, Jul 3 2015, Jul 6 2015, etc..) and the bar series has a value for each month (Jun 2015, Jul 2015, etc). Right now, the chart is drawing a bar for each day so for each month, it draws about 22 bars (1 for each weekday). How do I get it to draw just one bar for each month?

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



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

--
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
Reply all
Reply to author
Forward
0 new messages