Explorer Drag-Box Highlight Color

46 views
Skip to first unread message

Adam Wenborn

unread,
Aug 8, 2016, 10:30:37 AM8/8/16
to Google Visualization API
Hi,

I have a quick question about the Explorer option that is available for charts with a continuous axis. This feature is working great for my needs, but I'd really like the option to customize the color of the highlighting box that is created when users drag-to-select a region. At the moment the default fill is a semi-transparent blue color (see image below) but after a fair bit of effort I still can't figure out a way to reliably customize this to make the charts fit more naturally with the color scheme of my site.


I appreciate that the Explorer feature is marked as "experimental" but I was wondering if there are there any reliable workarounds to achieve this on the current Google Charts build? Alternatively, do you guys have any plans to implement an option to customize this property in future builds (e.g. an explorer.color setting that accepts an rgba value)?

Many thanks and keep up the great work, Adam

Daniel LaLiberte

unread,
Aug 8, 2016, 10:36:24 AM8/8/16
to Google Visualization API
Hi Adam,

We don't have any options for how the explorer mode highlighting is done, though that is a good idea.  You might be able to do some CSS hacking of the generated SVG.  

--
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/5706536c-fa93-4b0c-b472-ab7df59509b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Adam Wenborn

unread,
Aug 25, 2016, 4:52:44 PM8/25/16
to Google Visualization API
Just in case anyone else finds this and is trying to do the same thing, I managed to achieve this (with the help of a kind chap over at SO) by applying a MutationObserver to the chart container and modifying the fill color of the rect as it's created.


It's quite a crude solution and there's probably a better method out there in terms of performance and compatibility, but it works for my needs.



It'd still be nice if a future release of Google Charts could include an explorer.color parameter to achieve this and eliminate the overhead that my primitive hack requires!

Adam
Reply all
Reply to author
Forward
0 new messages