Click event on pie chart

gomashan07
User offline. Last seen 9 weeks 4 days ago. Offline
Joined: 01/27/2011
Points: 251

I have created  2  pie charts and  if i click  one i  need the other  to  get displayed . It  is like this, there  are   continents and  the population  of the continents are displayed in the pie chart and  when they  click  the particular  pie  of the continent , the  population  of the corresponding countries  in the particular continent must  be displayed in  pie  chart. Can  some one help  me  if  this can  be  done  in  default or there is  a need for custom app.If a  custom  app  is needed please elaborate me the outline .  

0
Your rating: None
smitchell
smitchell's picture
User offline. Last seen 2 weeks 5 days ago. Offline
Joined: 08/29/2008
Points: 34

Well, I think we need a little bit more information to answer this well:

# Are each of these pie charts in separate Apps? So it's not one App with multiple pie chart views?

# It sounds like both of these Apps are basic Apps (you created in the App Maker wizard), right?

Sara, technical writer/jackbe

 

gomashan07
User offline. Last seen 9 weeks 4 days ago. Offline
Joined: 01/27/2011
Points: 251

You  are  right all of them  are different basic  apps that i created in app wizard . So  how can i proceed from  here ?

smitchell
smitchell's picture
User offline. Last seen 2 weeks 5 days ago. Offline
Joined: 08/29/2008
Points: 34

It may be that you need a mashup behind the custom App that displays country populations, or maybe what you have already will work.

The basic continent pie chart App publishes an element-click event that contains both the population value for that continent and whatever data shows as the label -- which is probably the continent name/code. If that is true, what you need is to have the countries App accept a continent name or code as an input parameter and use that to select the  countries and populations to include in your countries pie chart App.

FYI, You can find the events that the built-in views used in basic Apps publish in the documentation for that view (see http://www.jackbe.com/prestodocs/v3.0/views/view-library-intro.html for links).

If your existing mashup/mashable that provides country populations doesn't accept such an input parameter, what you need is a mashup that accepts a continent and uses that value to filter country/population data. This means that your country/population data needs to be associated with a continent name or code. Hopefully it already has this, but if not you need to get this association into the data, probably using the mashup. This mashup then becomes the service for your country pie chart App.

Once the country pie chart is done, put both of these basic Apps in a workspace in Mashboard. Use the click event from the Continent Pie Chart and wire it to the default propertychange subscription for the Countries Pie Chart and use the continent name/code as input. When users click a continent, that code goes to the mashup, selects the right countries and that result -- with just the countries you want -- makes up the data to render the country pie chart.

With this design, you probably need to provide a default continent code to the mashup for the countries pie chart, so that the chart initially renders something.

Sara, technical writer/jackbe