on 12-15-2008 5:55 AM
Hi ,
This is prasad new to sap xmii.In Xmii i want to display two bar charts.
First bar chart should display by selecting the dropdown.It works fine by displaying the chart.And the next bar chart should display on clicking the Units of first bar chart.
But it is not happening like that.To display the second one first we have to click the legend on the right side of the chart and then clicking on the chart displays the second chart.
I would like to display the second bar chart by clicking the first bar chart unit directly without clicking on the legend.
Can any one give the necessary direction on this will be helpful for me
Thanks,
Prasad.
Hi!
Under the "SelectionEvent" function of first bar-chart you need to code for refreshing the second chart. Remove any onclick event on the legend. I guess this should solve the problem.
Regards,
SB.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You All for you suggestions.I will go through ur suggestions and let u know if it works for me.
Once again thankyou so much for your quick response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In situations like this, since the ChartSelectionEvent in the chart area is visually independent of the SelectionEvent in the legend, I prefer to have both events declared.
In the ChartSelectionEvent function you can use the .getLastSelectedTag() method to determine which associated legend 'pen' the user selected by clicking on the bar. You can then use this number to call the .setSelectedPen(iPen); method, which will do two things: highlight the legend item for the bar they've selected and also fire the SelectionEvent for the iChart.
By doing this you have script access to everything you need about the particular bar they've clicked as well as the pen related information. It also provides the visual correlation so that the user doesn't get confused by clicking on a bar in the chart for drill-down but still seeing the legend indexed to a different pen.
fun ction BarChart_ChartSelected() {
var myChart = document.BarChart.getChartObject();
var selPen = parseInt(myChart.getLastSelectedTag());
if (selPen > 0) {
myChart.setSelectedPen(selPen);
}
}
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use any of this methods in your first applet.
SelectionEvent
This parameter is used to provide the name of a JavaScript function in a Web page that will be called whenever the user clicks on the chart in the iChart applet. For example, it can be used to call the getLastSelectedTag or getLastSelectedPoint methods to determine which point has been selected (see below for details).
DoubleClickEvent
This parameter is used to provide the name of a JavaScript function in a Web page that will be called whenever the user double-clicks in the chart area of the iChart applet.
you can go through this thread also:
https://forums.sdn.sap.com/click.jspa?searchID=19918421&messageID=3408495
Hope this may help you.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.