Is it possible to have a pie chart substituting the dot in the scatterplot?

20 views
Skip to first unread message

Tiago Peres

unread,
Nov 1, 2016, 1:53:37 PM11/1/16
to Google Visualization API

I'm building an interactive widget using Google Charts.

For now, got a pie chart and a scatterplot as you can see in the attached area.


Although, would like to have in the scatterplot a pie chart instead of the blue tiny dot (can even be an image.


Any idea in how to do this?


Spend 4 hours doing research and didn't find anything that would let me do it.


not being able to use the pie chart as an image in the graph.png
Widget.zip

Tiago Peres

unread,
Nov 1, 2016, 2:00:00 PM11/1/16
to Google Visualization API

This is the only info I can see related to the scatter plots.


Tiago Peres

unread,
Nov 1, 2016, 3:57:17 PM11/1/16
to Google Visualization API
sounds possible, one could use the getImageURI method to get an image of the pie chart, similar to this answer-- then overlay the blue tiny dot with the image, using the getChartLayoutInterface method, similar to this answer '

Daniel LaLiberte

unread,
Nov 1, 2016, 5:06:05 PM11/1/16
to Google Visualization API
Hi Tiago,

After you get the position of a point, you can draw anything you like at that point by overlaying positioned HTML in the right place, including another chart.  So you don't need to generate an image unless you really want to freeze the little piecharts.  

Be aware that if you draw a chart in a positioned container, you should do the positioning in a container of your chart container.  Charts generally don't like the chart container to be positioned. e.g.

<div style="position:relative">
  <div style="position:absolute; top:100px; left:200px">
    <div id="chart_div"></div>
  </div>
</div>


On Tue, Nov 1, 2016 at 3:57 PM, Tiago Peres <tiagomar...@gmail.com> wrote:
sounds possible, one could use the getImageURI method to get an image of the pie chart, similar to this answer-- then overlay the blue tiny dot with the image, using the getChartLayoutInterface method, similar to this answer '

--
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/b8a2ef05-543b-43ed-878d-84beb728f97d%40googlegroups.com.

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



--

Tiago Peres

unread,
Nov 2, 2016, 8:43:08 AM11/2/16
to Google Visualization API
Can you give me example where a Scatterplot has a pie chart in that specific dot?

Having some troubles understand what you mean...



On Tuesday, November 1, 2016 at 10:06:05 PM UTC+1, Daniel LaLiberte wrote:
Hi Tiago,

After you get the position of a point, you can draw anything you like at that point by overlaying positioned HTML in the right place, including another chart.  So you don't need to generate an image unless you really want to freeze the little piecharts.  

Be aware that if you draw a chart in a positioned container, you should do the positioning in a container of your chart container.  Charts generally don't like the chart container to be positioned. e.g.

<div style="position:relative">
  <div style="position:absolute; top:100px; left:200px">
    <div id="chart_div"></div>
  </div>
</div>

On Tue, Nov 1, 2016 at 3:57 PM, Tiago Peres <tiagomar...@gmail.com> wrote:
sounds possible, one could use the getImageURI method to get an image of the pie chart, similar to this answer-- then overlay the blue tiny dot with the image, using the getChartLayoutInterface method, similar to this answer '

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



--
Reply all
Reply to author
Forward
0 new messages