Skip to Content
avatar image
Former Member

How to achieve this type of graph with values

Hi,

What is the type of UI element should be used along with mobile library to achieve requirement like below image and set values in the chart.Please share sample code.

Regards,

Koti Reddy

ui.jpg (2.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 08, 2015 at 06:48 AM

    Hi,

    Using a custome control in XML View is similar to use of Standard controls in XML Views . Here is short snippet to use :

    Say, if you have a custom defined like this :

    //This is a custom Input control which enables focusout event .

    jQuery.sap.declare("customcontrols.CustomInput");

    sap.m.Input.extend("customcontrols.CustomInput", { // inherit Input definition

      metadata : {

      events : {

      "focusout" : {}

      // new event definition focusout

      }

      },

      // focus out event handler

      onfocusout : function(evt) {

      this.fireFocusout();

      },

      renderer : {}

    // Standard renderer method is not overridden

    });

    //Include the namespace in the XML View and use the control. In this case, it is cc namespace

    You can use this custom control like this in XML View :


    Include the namespace in the XML View and use the control. In this case, it is cc namespace


    <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"

      xmlns:commons="sap.ui.commons" xmlns="sap.m" xmlns:layout="sap.ui.layout"

      xmlns:cc="customcontrols" controllerName="ux3.Details" xmlns:html="http://www.w3.org/1999/xhtml">


    <layout:VerticalLayout >

         <cc:CustomInput id="creditAmount" width="100%">

         </cc:CustomInput>

    </layout:VerticalLayout>

    Regards

    Mayank Jain

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 03, 2015 at 10:47 PM

    Hi Koti

    You may need to create custom controls like this.

    Example

    -D

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Dennis Seah

      CSS File moved into different folder than which I called/referred from index.html due to drag n drop functionality of eclipse unknowingly thats why circles didn't come.

      Now I am able to see circular charts.

      Thank You Dennis!!