on 2014 Aug 19 1:13 PM
Hi friends,
Is there any method through we can set values of label and value columns of i5Chart?
We can do this statically through Data Mapping tab of i5Chart. But I would like to do the same dynamically
Please let me know
MII Version 14.0 SP4 Patch
Thanks
Shaji
Request clarification before answering.
Hi Shaji,
You can do this in IRPT in the following way.
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>Your Title Here</TITLE>
<META http-equiv="X-UA-Compatible" content="IE=edge">
<META http-equiv='cache-control' content='no-cache'>
<META http-equiv='expires' content='0'>
<META http-equiv='pragma' content='no-cache'>
<SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid,i5SPCChart"></SCRIPT>
<SCRIPT>
var Chart = new com.sap.xmii.chart.hchart.i5Chart("Regression_15.0/i5Chart_Employees", "Regression_15.0/Employees_Hiked");
Chart.setChartWidth("640px");
Chart.setChartHeight("400px");
Chart.draw("div1");
function setValueColumns()
{
Chart.getChartObject().setValueColumns("ESAL,ENEWSAL");
Chart.refresh();
}
function setLabelColumns()
{
Chart.getChartObject().setLabelColumns("EID");
Chart.refresh();
}
</SCRIPT>
</HEAD>
<BODY>
<DIV id="div1"></DIV>
<INPUT type="button" value="setValueColumns" onClick="setValueColumns()"/>
<INPUT type="button" value="setLabelColumns" onClick="setLabelColumns()"/>
</BODY>
</HTML>
Output :
After clicking on setValueColumns
After clicking on setLabelColumns.
hope this helps.
Regards,
Sriram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.