Combo charts garbled when using bars/stepped Area and a time axis

34 views
Skip to first unread message

Carlos da Cunha e Silva

unread,
Dec 22, 2017, 8:17:53 AM12/22/17
to Google Visualization API
Hi,

I'm trying to create a chart that will report the windspeed in Beaufort. Two values will be shown in this graph, the windspeed measured at a certain moment in time, and the highest windspeed measured during the sampling time (the gusts).
Basically I'm trying to recreate the same type of charts that Windfinder is giving

e.g

The bars represent the windspeed, the hovering line the gusts.

So I started with a combo chart since this is very close to what I need, I want to put one value as a bar and the other as a steppedArea.
You can test the actual code over here 


If I just present bars this is how the chart looks like

If I change in the code, the series from 2 to 1 so it's actually applied

   series: {
    1: {
        type: 'steppedArea'
      }
    } 

I get

As you can see the bars have all been collapsed into one big area !!!

I did some further testing and discovered that if I change the type on the horizontal axis from a datetime to a string, then the chart behaves as expected. 
Is there any way I can avoid the bars to collapse ? Or is there an alternative type of chart that would allow me to represent the data more or less like Windfinder

Regards,

Carlos
 

Daniel LaLiberte

unread,
Dec 22, 2017, 5:49:31 PM12/22/17
to Google Visualization API
You can make the continuous values on the hAxis act like they are string values by adding this to the options:

  hAxis: { 
     ...
    type: 'category'
  }

It looks like the presence of the steppedArea series is incorrectly affecting the interpretation of the bars, to act like the bars are given the option for 'variable width'.  This ought to be a series-specific effect so the steppedArea series doesn't affect bars.   Thanks for pointing this out.





--
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-visualization-api@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/074553c2-fe40-4a32-a997-500eda89cee3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Carlos da Cunha e Silva

unread,
Dec 23, 2017, 10:16:07 AM12/23/17
to google-visua...@googlegroups.com
Thanks for the quick reply. I can't find any reference in the documentation with for hAxis.type . I tried setting it to 'string' but it didn't have any effect

Carlos

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.



--

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

Daniel LaLiberte

unread,
Dec 23, 2017, 1:38:41 PM12/23/17
to Google Visualization API
The axis.type option is still undocumented, because it may change.  The possible values at this time are:

  CATEGORY: 'category',  // Axis for categories (a set of labels)
  VALUE: 'value',  // Axis of values (numbers)
  CATEGORY_POINT: 'categorypoint'  // Category that has a single point width

On Sat, Dec 23, 2017 at 10:15 AM, Carlos da Cunha e Silva <cdacu...@gmail.com> wrote:
Thanks for the quick reply. I can't find any reference in the documentation with for hAxis.type . I tried setting it to 'string' but it didn't have any effect

Carlos

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



--

--
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/afUdyJG2lFw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.

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

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

Carlos da Cunha e Silva

unread,
Dec 23, 2017, 6:32:08 PM12/23/17
to google-visua...@googlegroups.com
Thanks Daniel for the clarification. Is there anyway I can track the progress on this issue and when the axis.type option is going to be released.

Regards,

Carlos

On Sat, Dec 23, 2017 at 7:38 PM 'Daniel LaLiberte' via Google Visualization API <google-visua...@googlegroups.com> wrote:
The axis.type option is still undocumented, because it may change.  The possible values at this time are:

  CATEGORY: 'category',  // Axis for categories (a set of labels)
  VALUE: 'value',  // Axis of values (numbers)
  CATEGORY_POINT: 'categorypoint'  // Category that has a single point width

On Sat, Dec 23, 2017 at 10:15 AM, Carlos da Cunha e Silva <cdacu...@gmail.com> wrote:
Thanks for the quick reply. I can't find any reference in the documentation with for hAxis.type . I tried setting it to 'string' but it didn't have any effect

Carlos

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.



--

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

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

Daniel LaLiberte

unread,
Dec 23, 2017, 6:37:51 PM12/23/17
to Google Visualization API
Future released are announced here, with a list of significant changes.   This feature has been on the back burner for several years, however, so I wouldn't hold my breath.

On Sat, Dec 23, 2017 at 6:31 PM, Carlos da Cunha e Silva <cdacu...@gmail.com> wrote:
Thanks Daniel for the clarification. Is there anyway I can track the progress on this issue and when the axis.type option is going to be released.

Regards,

Carlos

On Sat, Dec 23, 2017 at 7:38 PM 'Daniel LaLiberte' via Google Visualization API <google-visualization-api@googlegroups.com> wrote:
The axis.type option is still undocumented, because it may change.  The possible values at this time are:

  CATEGORY: 'category',  // Axis for categories (a set of labels)
  VALUE: 'value',  // Axis of values (numbers)
  CATEGORY_POINT: 'categorypoint'  // Category that has a single point width

On Sat, Dec 23, 2017 at 10:15 AM, Carlos da Cunha e Silva <cdacu...@gmail.com> wrote:
Thanks for the quick reply. I can't find any reference in the documentation with for hAxis.type . I tried setting it to 'string' but it didn't have any effect

Carlos

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



--

--
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/afUdyJG2lFw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.

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

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



--

--
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/afUdyJG2lFw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.

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

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