Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8118

Re: How to create the differnt charts with makit or viz in a single view by using ODATA service for a mobile dashboard

$
0
0

Hi Priya,

 

Here I am adding code for your understanding  hope it might be helpful for you

 

for makits  gothrough the below url

Using  MAKit Charts in SAP MII for mobile/tablet use

 

Define your model Globally as

 

var model = new sap.ui.model.odata.ODATAModel(url);

 

createContent : function(oController) {

 

 

  var oDataset = new sap.viz.ui5.data.FlattenedDataset('d1', {

 

 

  dimensions:[

             {

              axis:1,

              name:'country',

          

              value:"{country}"

          

             }],

          

             measures:[

                       {

                       name:'revenue in billion dollars',

                    

                       value:'{revenue}'

                       },

                    

                       {

                       name:'population in cr',

                       value:'{population}'

                       }

                    

                       ],

                    

                       data: {

              path:"/modelData"

             }

                    

                    

                    

 

  });

 

  var ochart = new sap.viz.ui5.Bar('b1', {

  width : "80%",

  height : "400px",

  plotArea : {

 

  },

  title : {

  visible : true,

  text : 'Profit and Revenue By Country'

  },

  dataset : oDataset

 

 

 

  });

 

  ochart.setModel(model);

  ochart.placeAt('content');

 

  }

 

 

});


Viewing all articles
Browse latest Browse all 8118

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>