cancel
Showing results for 
Search instead for 
Did you mean: 

How to set value and label column of i5Chart

shaji_chandran
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

shaji_chandran
Participant
0 Kudos

Thanks Sriram.

It works

Answers (0)