on ‎2015 Aug 11 10:41 AM
Hi Friends,
Scenario : I have a pie chart in my design. I need to incorporate some functionality on selection of pie chart member. At the moment, I am able to achieve this by writing below piece of code in "on select" event of Pie Chart.
TEXT_1.setText(CHART_1.getSelectedMember("ZCMP").text);
This text box now gets the value once I select any company from my pie chart.
Issue : However, this value gets populated in text box only when I select the company manually in pie chart, I need to have a default selection on load of the page i,e I need one company to be selected once the page is loaded automatically.
My Approach : I thought of putting a code for CHART_1.Onselect() method. But I couldn't find any method which selects any value by default. Can you please help me in this matter.
SDN Search : I tried to find its solution in web but couldn't find much except one thread which is close to my requirement. But it doesn't have the solution.
Thanks,
Gaurav
Request clarification before answering.
Gaurav - this appears to me to be a strange requirement to have something default in pre-selected on a chart upon opening; instead, how about providing some hints/tips to the consumer of the chart that they need to select a slice of the pie chart to see the underlying text?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tammy,
Thanks for the reply. I am sorry I forgot to mention in my post that on selection of the pie chart, the selected value is going to be a filter for another component(Column Graph). So, I need something to be selected on load so that the column graph also get triggered and display some values.
If I don't give any default selection initially, that column chart will not display anything unless user click on the pie chart. It is the same thing which we used to do in Dashboards(Xcelsius).
For Ex:
Lets assume a Pie chart is displaying four companies data.
Company - A, B, C and D with their profit Margins.
If I click on Company "A" in pie chart then value "A" is going to flow to column graph as filter and company "A" data is shown in Column Graph. I need one of the companies to be select by default.
Thanks,
Gaurav
Hi Gaurav,
Possible solution I think is, in application startup scripting, get all the members of pie chart using getmembers() function, use a for-each loop and get the first member value. Take that value, set it in text and pass that as a filter to column chart.
This will always display particular selected data on dashboard load itself.
Note: please note that nothing would be selected in pie chart.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.