cancel
Showing results for 
Search instead for 
Did you mean: 

i5Charts

Former Member
0 Kudos

I have 6 different i5Charts - how can I add for each one of them a Chart Title  Please see screenshot of the layout.

And in my page I have the following code for one chart:

var i5Chart1 = new com.sap.xmii.chart.hchart.i5Chart("WVLMicrofiber7/Charts/WVLCharts", "WVLMicrofiber7/WebServices/WSWVL7TESTDATA");

                i5Chart1.setChartWidth("540px");

                i5Chart1.setChartHeight("250px");

                var Query1= i5Chart1.getQueryObject();

                Query1.setParameter("Param.1",Machine);  

                Query1.setParameter("Param.2","FREENES1");      

                i5Chart1.draw("1");

How to add a chart title to the above code?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Amr,

Use this syntax:

i5Chart1.getChartTemplateObject().setProperty("Title","Title Value");

Other way is to set the title in the Chart object created in MII workbench.

Regards,

Rohit Negi.

former_member215598
Participant
0 Kudos

Hi Rohit,

So, if the title one chart is FREENES1 and the other is FREENES2 it will be coded like the following:

var i5Chart1 = new com.sap.xmii.chart.hchart.i5Chart("WVLMicrofiber7/Charts/WVLCharts", "WVLMicrofiber7/WebServices/WSWVL7TESTDATA");

                i5Chart1.setChartWidth("540px");

                i5Chart1.setChartHeight("250px");

                   i5Chart1.getChartTemplateObject().setProperty("Title","FREENES1");

                var Query1= i5Chart1.getQueryObject();

                Query1.setParameter("Param.1",Machine);  

                Query1.setParameter("Param.2","FREENES1");      

                i5Chart1.draw("1");

var i5Chart1 = new com.sap.xmii.chart.hchart.i5Chart("WVLMicrofiber7/Charts/WVLCharts", "WVLMicrofiber7/WebServices/WSWVL7TESTDATA");

                i5Chart1.setChartWidth("540px");

                i5Chart1.setChartHeight("250px");

                   i5Chart1.getChartTemplateObject().setProperty("Title","FREENES2");

                var Query1= i5Chart1.getQueryObject();

                Query1.setParameter("Param.1",Machine);  

                Query1.setParameter("Param.2","FREENES1");      

                i5Chart1.draw("1");

Just double checking - thank you for your input.

Former Member
0 Kudos

Hi Amr,

Yes.

But dont use the same variable name for both the charts.

Regards,

Rohit Negi.

former_member215598
Participant
0 Kudos

Thank you.  You have solved my question.

Regards,

Amr

Answers (0)