Chart range filter - Custom toolol tip and X-axis ticks

243 views
Skip to first unread message

Akhil G M

unread,
Jan 13, 2015, 7:29:10 AM1/13/15
to google-visua...@googlegroups.com
Hi,

I'm working with chart range filter. My question is:

Is there any way to give custom tooltip and X-axis ticks if we are using Chart range filter type charts.

I've tried using  data.addColumn({type: 'string', role: 'tooltip'}) for my chart. But it is not working.

Also, Is there any way to show hours instead  of date.

Attaching an image of what I have.



Thanks
Akhil  G M


Daniel LaLiberte

unread,
Jan 13, 2015, 9:18:49 AM1/13/15
to google-visua...@googlegroups.com
The ChartRangeFilter lets you provide options for the underlying chart via the ui: { chartOptions: {} } option.  See the documentation for chartOptions in https://developers.google.com/chart/interactive/docs/gallery/controls?hl=it#chartrangefilter  So you should be able to specify the hAxis ticks via that mechanism.

There are some new date and time formatting options that you will be able to experiment with.  The documentation for that should be coming out fairly soon.

I'm not 100% sure about adding tooltips to the ChartRangeFilter, but the ui.chartView option should let you specify a view that includes a role: tooltip column, and the other ui.chartOptions should let you specify when the tooltips apply (with selectionMode, tooltip, and aggregationTarget options).


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

Akhil G M

unread,
Jan 14, 2015, 12:19:48 AM1/14/15
to google-visua...@googlegroups.com
Hi,

Thanks for the Information.

I,ve tried using 

                ui: { chartOptions: { hAxis: {
      ticks: hAxisAry
 },} } 

where hAxisAry is the array of ticks to be shown in the chart. But that is not getting reflected in the chart.

Also if I try to give a 'title' for the hAxis, the ticks are not displayed at all.

Highly appreciate if there is any explanation for these too.

Thanks

Akhil  G M

Daniel LaLiberte

unread,
Jan 14, 2015, 9:01:10 AM1/14/15
to google-visua...@googlegroups.com
Since your hAxis is date or datetime, I hope your hAxisAry is an array of dates.  

There is an extra comma before one of your curly brackets that might be a problem for some browsers.

Since your title option is at least making a difference, I would guess you are providing the ui.chartOptions in the right way to your ControlWrapper.  The title will compete for space with the tick labels, so you will have to experiment with the chartArea.height as well.

I don't see any other issues from what you tell me.  If you can link to you web page that shows what you are seeing, I can look into it some more.

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