Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to capture X-axis value of iChart to display correspoding Grid Chart

Hi Everybody,

I have an iChart of type Bar, which is displaying OrderNumber on x-axis and corresponding values on y-axis. Now when I click on one particular Bar it should capture the corresponding x-axis value(OrderNumber) and open a grid chart showing values of that OrderNumber.

I used "ChartDoubleClickEvent", and when doubleclicked it calls javascript function having document.iChart.getChartObject().getAxisLabelColumns();

But this getAxisLabelColumns() gets only the name of the x-axis i.e., OrderNumber but not the OrderNumber's value of the selected bar.

Kindly respond asap.

Former Member
Former Member replied


Good one. Better use the Display Template with type <i>iSPCChart</i> for ur purpose where in the SPC Chart, each DataPoint will contain all desired attributes including OrderNumber [Use <b>Attribute Columns Field in Data Mapping Tab</b> for those attribute names]

Say in the Attribute Columns u have the attributes in this order:

1. Attribute1

2. Value

<b><i>3. OrderNumber</i></b>

4. Attribute2

5. Attribute3

Then use following javascript codes

function getOrderNumber()



var SelectedPoint = = document.MyApplet.getChartObject().getUpperSelectedPoint();

var OrderNo = document.MyApplet.getChartObject().getUpperAttributeValueAt(SelectedDataPoint,3);



//Use this OrderNo to be passed to the Query u hv.




<APPLET NAME="MyApplet" id="scanlog" WIDTH="700" HEIGHT="400" CODE="iSPCChart"

CODEBASE="/Illuminator/Classes" ARCHIVE="" MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="UserTemplates/PoC/Som/XAGetCharValue">

<PARAM NAME="DisplayTemplate" VALUE="UserTemplates/PoC/Som/PlantSPCDetailChart">

<b><i><PARAM NAME="UpperChartSelectionEvent" VALUE="getOrderNumber"></i></b>


Do inform if this works for ur requirement or not



0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question