Friday, 16 November 2018

SAPUI5 4CHARTS 1 PAGE JS


VIEW.JS
sap.ui.jsview("chart5.chart5", {


getControllerName : function() {
return "chart5.chart5";
},


createContent : function(oController) {
var oModel = new sap.ui.model.json.JSONModel({
businessData : [
{Country :"Canada",revenue:410.87,profit:-141.25, population:34789000},
{Country :"China",revenue:338.29,profit:133.82, population:1339724852},
{Country :"France",revenue:487.66,profit:348.76, population:65350000},
{Country :"Germany",revenue:470.23,profit:217.29, population:81799600},
{Country :"India",revenue:170.93,profit:117.00, population:1210193422},
{Country :"United States",revenue:905.08,profit:609.16, population:313490000}
]
});

   
var oDataset = new sap.viz.ui5.data.FlattenedDataset({
dimensions : [
{
axis : 1, 
name : 'Country',
value : "{Country}"
}
],
measures : [
{
name : 'Profit', 
value : '{profit}'   
},
{
name : 'Revenue',
value : '{revenue}'
}
],
data : {
path : "/businessData"
}

});

var oBarChart = new sap.viz.ui5.Bar({
/*width : "50%",
height : "400px",*/
plotArea : {
},
title : {
visible : true,
text : 'Profit and Revenue By Country'
},
dataset : oDataset
});
oBarChart.setModel(oModel);


var oModel = new sap.ui.model.json.JSONModel({
businessData : [
{Country :"Canada",revenue:410.87,profit:141.25, population:34789000},
{Country :"China",revenue:338.29,profit:133.82, population:1339724852},
{Country :"France",revenue:487.66,profit:348.76, population:65350000},
{Country :"Germany",revenue:470.23,profit:217.29, population:81799600},
{Country :"India",revenue:170.93,profit:117.00, population:1210193422},
{Country :"United States",revenue:905.08,profit:609.16, population:313490000}
]
});

   
var oDataset = new sap.viz.ui5.data.FlattenedDataset({
dimensions : [
{
axis : 1, 
name : 'Country',
value : "{Country}"
}
],
measures : [
{
name : 'Profit', 
value : '{profit}'   
}

],
data : {
path : "/businessData"
}

});

var oBarChart1 = new sap.viz.ui5.Bar({
/*width : "50%",
height : "400px",*/
plotArea : {
},
title : {
visible : true,
text : 'Profit and Revenue By Country'
},
dataset : oDataset
});
oBarChart1.setModel(oModel);

/*var HBox1 = new sap.m.HBox("Vbox2", {
items:[

              oBarChart,oBarChart1
]
});*/

var oLayout = new sap.ui.commons.layout.MatrixLayout({
id : "matrix1",
layoutFixed : false,
columns : 2,
width : "100%",
widths : [ "50%", "50%"]
});
oLayout.createRow(oBarChart, oBarChart1);
var Vbox = new sap.m.VBox({
id:"vbox11",

items:[
       new sap.m.Label({
       id:"lb10",
       text:" 1999  profit 117"
       }), 
     
       new sap.m.Label({
       id:"lb11",
       text:" 1996 revenue profit "
       }), 
]
});

var oModel = new sap.ui.model.json.JSONModel({

businessData : [

{Year :"1995",revenue:410.87,profit:-141.25, population:34789000},

{Year :"1996",revenue:338.29,profit:133.82, population:1339724852},

{Year :"1997",revenue:487.66,profit:348.76, population:65350000},

{Year :"1998",revenue:470.23,profit:217.29, population:81799600},

{Year :"1999",revenue:170.93,profit:117.00, population:1210193422},

{Year :"2000",revenue:905.08,profit:609.16, population:313490000}

]

});

  // A Dataset defines how the model data is mapped to the chart

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

// a Bar Chart requires exactly one dimension (x-axis)

dimensions : [

{

axis : 1, // must be one for the x-axis, 2 for y-axis

name : 'Year',

value : "{Year}"

}

],

// it can show multiple measures, each results in a new set of bars in a new color

measures : [

// measure 1

{

name : 'Profit', // 'name' is used as label in the Legend

value : '{profit}' // 'value' defines the binding for the displayed value

},

{

name : 'Revenue',

value : '{revenue}'

}

],

// 'data' is used to bind the whole data collection that is to be displayed in the chart

data : {

path : "/businessData"

}

});

  // create a Bar chart

  // you also might use Combination, Line, StackedColumn100, StackedColumn or Column

  // for Donut and Pie please remove one of the two measures in the above Dataset.

var oChart = new sap.viz.ui5.Line({

width : "80%",

height : "400px",

plotArea : {

//'colorPalette' : d3.scale.category20().range()

},

title : {

visible : true,

text : 'Profit and Revenue By Country'

},

dataset : oDataset

});

  // attach the model to the chart and display it

oChart.setModel(oModel);
var Vbox1a = new sap.m.VBox({
id:"vbox12",

items:[
Vbox,oChart
     
       ]
});

var Vbox = new sap.m.VBox({
id:"vbox1",

items:[
       new sap.m.Label({
       id:"lb0",
       text:" 1995 no profit"
       }), 
     
       new sap.m.Label({
       id:"lb1",
       text:" 1996 is profit "
       }), 
]
});
var oModel = new sap.ui.model.json.JSONModel({

businessData : [

{Year :"1995",revenue:410.87,profit:-141.25, population:34789000},

{Year :"1996",revenue:338.29,profit:133.82, population:1339724852},

{Year :"1997",revenue:487.66,profit:348.76, population:65350000},

{Year :"1998",revenue:470.23,profit:217.29, population:81799600},

{Year :"1999",revenue:170.93,profit:117.00, population:1210193422},

{Year :"2000",revenue:905.08,profit:609.16, population:313490000}

]

});

  // A Dataset defines how the model data is mapped to the chart

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

// a Bar Chart requires exactly one dimension (x-axis)

dimensions : [

{

axis : 1, // must be one for the x-axis, 2 for y-axis

name : 'Year',

value : "{Year}"

}

],

// it can show multiple measures, each results in a new set of bars in a new color

measures : [

// measure 1

{

name : 'Profit', // 'name' is used as label in the Legend

value : '{profit}' // 'value' defines the binding for the displayed value

}



],

// 'data' is used to bind the whole data collection that is to be displayed in the chart

data : {

path : "/businessData"

}

});

  // create a Bar chart

  // you also might use Combination, Line, StackedColumn100, StackedColumn or Column

  // for Donut and Pie please remove one of the two measures in the above Dataset.

var oChart = new sap.viz.ui5.Line({

width : "80%",

height : "400px",

plotArea : {

//'colorPalette' : d3.scale.category20().range()

},

title : {

visible : true,

text : 'Profit and Revenue By Country'

},

dataset : oDataset

});

  // attach the model to the chart and display it

oChart.setModel(oModel);
var Vboxa = new sap.m.VBox({
id:"vbox2",

items:[
Vbox,oChart
     
       ]
});
var oLayout1 = new sap.ui.commons.layout.MatrixLayout({
id : "matrix12",
layoutFixed : false,
columns : 2,
width : "100%",
widths : [ "50%", "50%"]
});
oLayout.createRow(Vbox1a, Vboxa);
     



  return new sap.m.Page({
title: "Title",
content: [
oLayout,oLayout1
]
});
}


});
INDEX.HTML
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m,sap.viz,sap.ui.layout,sap.ui.table,sap.ui.commons"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

<script>
sap.ui.localResources("chart5");
var app = new sap.m.App({initialPage:"idchart51"});
var page = sap.ui.view({id:"idchart51", viewName:"chart5.chart5", type:sap.ui.core.mvc.ViewType.JS});
app.addPage(page);
app.placeAt("content");
</script>

</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>

</html>
OUTPUT

SAPUI5 3CHARTS SINGLE PAGE XML

VIEW.JS
<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
controllerName="chart20.chart20" xmlns:viz="sap.viz.ui5.controls" xmlns:viz.data="sap.viz.ui5.data"
  xmlns:viz.feeds="sap.viz.ui5.controls.common.feeds"
xmlns:html="http://www.w3.org/1999/xhtml">
<Page title="Title">
<content>
<HBox  class="hbox1"  width="100%">
<viz:VizFrame id="idVizFrame" uiConfig="{applicationSet:'fiori'}"
                height='800px' width="800px" vizType='pie'>
                <viz:dataset>
                    <viz.data:FlattenedDataset data="{/milk}">
                        <viz.data:dimensions>
                            <viz.data:DimensionDefinition name="Store Name"
                                value="{Store Name}" />
                        </viz.data:dimensions>
                        <viz.data:measures>
                            <viz.data:MeasureDefinition name="Revenue"
                                value="{Revenue}" />
                        </viz.data:measures>
                    </viz.data:FlattenedDataset>
                </viz:dataset>

                <viz:feeds>
                    <viz.feeds:FeedItem uid="size" type="Measure"
                        values="Revenue" />
                    <viz.feeds:FeedItem uid="color" type="Dimension"
                        values="Store Name" />
                </viz:feeds>
            </viz:VizFrame>
            <VBox class="vbox0">
             <VBox class="vbox1">
            <viz:VizFrame id="idViz" uiConfig="{applicationSet:'fiori'}"
                height='400px' width="800px" vizType='pie'>
                <viz:dataset>
                    <viz.data:FlattenedDataset data="{/milk}">
                        <viz.data:dimensions>
                            <viz.data:DimensionDefinition name="Store Name"
                                value="{Store Name}" />
                        </viz.data:dimensions>
                        <viz.data:measures>
                            <viz.data:MeasureDefinition name="Revenue"
                                value="{Revenue}" />
                        </viz.data:measures>
                    </viz.data:FlattenedDataset>
                </viz:dataset>

                <viz:feeds>
                    <viz.feeds:FeedItem uid="size" type="Measure"
                        values="Revenue" />
                    <viz.feeds:FeedItem uid="color" type="Dimension"
                        values="Store Name" />
                </viz:feeds>
            </viz:VizFrame>
            </VBox>
            <VBox class="vbox2">
            <viz:VizFrame id="id" uiConfig="{applicationSet:'fiori'}"
                height='400px' width="800px" vizType='pie'>
                <viz:dataset>
                    <viz.data:FlattenedDataset data="{/milk}">
                        <viz.data:dimensions>
                            <viz.data:DimensionDefinition name="Store Name"
                                value="{Store Name}" />
                        </viz.data:dimensions>
                        <viz.data:measures>
                            <viz.data:MeasureDefinition name="Revenue"
                                value="{Revenue}" />
                        </viz.data:measures>
                    </viz.data:FlattenedDataset>
                </viz:dataset>

                <viz:feeds>
                    <viz.feeds:FeedItem uid="size" type="Measure"
                        values="Revenue" />
                    <viz.feeds:FeedItem uid="color" type="Dimension"
                        values="Store Name" />
                </viz:feeds>
            </viz:VizFrame>
            </VBox>
             </VBox>
            </HBox>
</content>
</Page>

</core:View>
CONTROLLER.JS
sap.ui.controller("chart20.chart20", {

onInit: function() {
    var oData = {
      "milk": [{
        "Store Name": "2nd Jan",
        "Revenue": "400"
      }, {
        "Store Name": "2nd Feb",
        "Revenue": "275"
      }, {
        "Store Name": "4th May",
        "Revenue": "356"
      }, {
        "Store Name": "6th June",
        "Revenue": "310"
      }]
    };
    var oModel = new sap.ui.model.json.JSONModel(oData);
    this.getView().setModel(oModel);
  },
});

 INDEX.HTML
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal">

</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->
<link rel="stylesheet" type="text/css" href="Style/myCSS.css">
<script>
sap.ui.localResources("chart20");
var app = new sap.m.App({initialPage:"idchart201"});
var page = sap.ui.view({id:"idchart201", viewName:"chart20.chart20", type:sap.ui.core.mvc.ViewType.XML});
app.addPage(page);
app.placeAt("content");
</script>

</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>

</html>
OUTPUT

CSS
/* .hbox1{

margin: 4px auto;
border:10px solid ;

} */
 .vbox1{

margin:4px 4px 4px 4px;

.vbox2{

margin:4px 4px 4px 4px;
}
#idVizFrame{

margin:8px 8px 8px 8px;
}
#idViz{
margin:4px 4px 4px 4px;


}

SAPUI5 ONE LINE CHART JS


VIEW.JS
sap.ui.jsview("chart2.chart2", {


getControllerName : function() {
return "chart2.chart2";
},


createContent : function(oController) {


var Vbox = new sap.m.VBox({
id:"vbox1",

items:[
       new sap.m.Label({
       id:"lb0",
       text:" 1995 no profit"
       }), 
     
       new sap.m.Label({
       id:"lb1",
       text:" 1996 is profit "
       }), 
]
});
var oModel = new sap.ui.model.json.JSONModel({

businessData : [

{Year :"1995",revenue:410.87,profit:-141.25, population:34789000},

{Year :"1996",revenue:338.29,profit:133.82, population:1339724852},

{Year :"1997",revenue:487.66,profit:348.76, population:65350000},

{Year :"1998",revenue:470.23,profit:217.29, population:81799600},

{Year :"1999",revenue:170.93,profit:117.00, population:1210193422},

{Year :"2000",revenue:905.08,profit:609.16, population:313490000}

]

});

  // A Dataset defines how the model data is mapped to the chart

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

// a Bar Chart requires exactly one dimension (x-axis)

dimensions : [

{

axis : 1, // must be one for the x-axis, 2 for y-axis

name : 'Year',

value : "{Year}"

}

],

// it can show multiple measures, each results in a new set of bars in a new color

measures : [

// measure 1

{

name : 'Profit', // 'name' is used as label in the Legend

value : '{profit}' // 'value' defines the binding for the displayed value

}



],

// 'data' is used to bind the whole data collection that is to be displayed in the chart

data : {

path : "/businessData"

}

});

  // create a Bar chart

  // you also might use Combination, Line, StackedColumn100, StackedColumn or Column

  // for Donut and Pie please remove one of the two measures in the above Dataset.

var oChart = new sap.viz.ui5.Line({

width : "80%",

height : "400px",

plotArea : {

//'colorPalette' : d3.scale.category20().range()

},

title : {

visible : true,

text : 'Profit and Revenue By Country'

},

dataset : oDataset

});

  // attach the model to the chart and display it

oChart.setModel(oModel);
var Vboxa = new sap.m.VBox({
id:"vbox2",

items:[
Vbox,oChart
     
       ]
});

  return new sap.m.Page({
title: "Title",
content: [
Vboxa
]
});
}


});

OUTPUT

SAPUI5 TWO LINE CHART (JS)




VIEW.JS
sap.ui.jsview("chart1.chart1", {


getControllerName : function() {
return "chart1.chart1";
},

createContent : function(oController) {


var Vbox = new sap.m.VBox({
id:"vbox11",

items:[
       new sap.m.Label({
       id:"lb10",
       text:" 1999  profit 117"
       }), 
     
       new sap.m.Label({
       id:"lb11",
       text:" 1996 revenue profit "
       }), 
]
});

var oModel = new sap.ui.model.json.JSONModel({

businessData : [

{Year :"1995",revenue:410.87,profit:-141.25, population:34789000},

{Year :"1996",revenue:338.29,profit:133.82, population:1339724852},

{Year :"1997",revenue:487.66,profit:348.76, population:65350000},

{Year :"1998",revenue:470.23,profit:217.29, population:81799600},

{Year :"1999",revenue:170.93,profit:117.00, population:1210193422},

{Year :"2000",revenue:905.08,profit:609.16, population:313490000}

]

});

  // A Dataset defines how the model data is mapped to the chart

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

// a Bar Chart requires exactly one dimension (x-axis)

dimensions : [

{

axis : 1, // must be one for the x-axis, 2 for y-axis

name : 'Year',

value : "{Year}"

}

],

// it can show multiple measures, each results in a new set of bars in a new color

measures : [

// measure 1

{

name : 'Profit', // 'name' is used as label in the Legend

value : '{profit}' // 'value' defines the binding for the displayed value

},

{

name : 'Revenue',

value : '{revenue}'

}

],

// 'data' is used to bind the whole data collection that is to be displayed in the chart

data : {

path : "/businessData"

}

});

  // create a Bar chart

  // you also might use Combination, Line, StackedColumn100, StackedColumn or Column

  // for Donut and Pie please remove one of the two measures in the above Dataset.

var oChart = new sap.viz.ui5.Line({

width : "80%",

height : "400px",

plotArea : {

//'colorPalette' : d3.scale.category20().range()

},

title : {

visible : true,

text : 'Profit and Revenue By Country'

},

dataset : oDataset

});

  // attach the model to the chart and display it

oChart.setModel(oModel);
var Vbox1a = new sap.m.VBox({
id:"vbox12",

items:[
Vbox,oChart
     
       ]
});


  return new sap.m.Page({
title: "Title",
content: [
Vbox1a
]
});
}


});
INDEX.HTML
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m,sap.viz,sap.ui.layout,sap.ui.table,sap.ui.commons"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

<script>
sap.ui.localResources("chart1");
var app = new sap.m.App({initialPage:"idchart11"});
var page = sap.ui.view({id:"idchart11", viewName:"chart1.chart1", type:sap.ui.core.mvc.ViewType.JS});
app.addPage(page);
app.placeAt("content");
</script>
<style>
#lb10{
margin-left: 490px;
font-size:100%;
font-weight:bolder;
color:#333;

}
#lb11{
margin-left: 490px;
font-size:100%;
font-weight:bolder;
color:#333;
}
</style>

</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>

</html>
OUTPUT

SAPUI5 BAR CHART JS

VIEW.JS
sap.ui.jsview("chart.chart", {


getControllerName : function() {
return "chart.chart";
},

createContent : function(oController) {

var oModel = new sap.ui.model.json.JSONModel({
businessData : [
{Country :"Canada",revenue:410.87,profit:-141.25, population:34789000},
{Country :"China",revenue:338.29,profit:133.82, population:1339724852},
{Country :"France",revenue:487.66,profit:348.76, population:65350000},
{Country :"Germany",revenue:470.23,profit:217.29, population:81799600},
{Country :"India",revenue:170.93,profit:117.00, population:1210193422},
{Country :"United States",revenue:905.08,profit:609.16, population:313490000}
]
});

   
var oDataset = new sap.viz.ui5.data.FlattenedDataset({
dimensions : [
{
axis : 1, 
name : 'Country',
value : "{Country}"
}
],
measures : [
{
name : 'Profit', 
value : '{profit}'   
}

],
data : {
path : "/businessData"
}

});

var oBarChart = new sap.viz.ui5.Bar({
width : "80%",
height : "400px",
plotArea : {
},
title : {
visible : true,
text : 'Profit and Revenue By Country'
},
dataset : oDataset
});
oBarChart.setModel(oModel);
  return new sap.m.Page({
title: "Title",
content: [
oBarChart
]
});
}


});
INDEX.HTML
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m,sap.viz,sap.ui.layout,sap.ui.table,sap.ui.commons"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

<script>
sap.ui.localResources("chart");
var app = new sap.m.App({initialPage:"idchart1"});
var page = sap.ui.view({id:"idchart1", viewName:"chart.chart", type:sap.ui.core.mvc.ViewType.JS});
app.addPage(page);
app.placeAt("content");
</script>

</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>

</html>
OUTPUT

SIMPLE LABEL SAPUI5
view.js
sap.ui.jsview("1.1", {
 
getControllerName : function() {
return "1.1";
},

 
createContent : function(oController) {
var Vbox = new sap.m.VBox({
id:"vid",
 
items:[
       new sap.m.Label({
      text:"Name",
      
       }),
       new sap.m.Input(),
       
       new sap.m.Label({
      text:"age", 
       }),
       new sap.m.Input(),
       
       new sap.m.Label({
      text:"company", 
       }),
   new sap.m.Input(),
       
       ]
}).addStyleClass("123");
 
var Vbo = new sap.m.VBox({
id:"vbox",
 
 
items:[
       new sap.m.Label({
      text:"date", 
       }),
       new sap.ui.commons.DatePicker(),
       
       new sap.m.Label({
      text:"address", 
       }),
       new sap.ui.commons.TextArea({
cols : 20,
rows : 5,
       }).addStyleClass("vbo"),
             
       ]
});
var oHBox1 = new sap.m.HBox({
id:"hb",
items:[
Vbox,Vbo,
 
]
}).addStyleClass("im");
 

  return new sap.m.Page({
title: "Title",
content: [
oHBox1
]
});
}

});

index.html

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m,sap.ui.commons,sap.ui.core"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

<script>
sap.ui.localResources("1");
var app = new sap.m.App({initialPage:"id11"});
var page = sap.ui.view({id:"id11", viewName:"1.1", type:sap.ui.core.mvc.ViewType.JS});
app.addPage(page);
app.placeAt("content");
</script>
<style>
 
#vbox{
margin-left:700px;
padding-right:100px;
}

</style>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
OUTPUT


Friday, 9 November 2018

sapui5 pure xml create chart

view
 <core:View xmlns:core="sap.ui.core" xmlns:viz="sap.viz.ui5.controls" xmlns:viz.feeds="sap.viz.ui5.controls.common.feeds" xmlns:viz.data="sap.viz.ui5.data" xmlns="sap.m" controllerName="chart10.chart10">
    <App>
      <Page title="SAPUI5 App">
        <viz:VizFrame xmlns:viz="sap.viz.ui5.controls" id="lineChartCard" uiConfig="{applicationSet:'fiori'}" vizType="column" width="100%">
          <viz:dataset>
            <dataSet:FlattenedDataset xmlns:dataSet="sap.viz.ui5.data" data="{/SalesShare}">
              <dataSet:dimensions>
                <dataSet:DimensionDefinition name="Date" value="{Date}">
                </dataSet:DimensionDefinition>
              </dataSet:dimensions>
              <dataSet:measures>
                <dataSet:MeasureDefinition name="Price" value="{Price}">
                </dataSet:MeasureDefinition>

              </dataSet:measures>
            </dataSet:FlattenedDataset>
          </viz:dataset>
          <viz:feeds>
            <feed:FeedItem xmlns:feed="sap.viz.ui5.controls.common.feeds" uid="valueAxis" type="Measure" values="Price" />
            <feed:FeedItem xmlns:feed="sap.viz.ui5.controls.common.feeds" uid="categoryAxis" type="Dimension" values="Date" />

          </viz:feeds>
        </viz:VizFrame>
      </Page>
    </App>
  </core:View>

controller

sap.ui.controller("chart10.chart10", {


  onInit: function() {
    var oData = {
      "SalesShare": [{
        "Date": "2nd Jan",
        "Price": "400"
      }, {
        "Date": "2nd Feb",
        "Price": "275"
      }, {
        "Date": "4th May",
        "Price": "356"
      }, {
        "Date": "6th June",
        "Price": "310"
      }]
    };
    var oModel = new sap.ui.model.json.JSONModel(oData);
    this.getView().setModel(oModel);
  },
});


output


test ganaral binding(testing )

  /home/user/projects/project1/webapp/model/record.json: {     "text" : "outer text" ,     "myrecorsd" : [    ...