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

How to set vizFrame scales not visible

$
0
0

Hello experts,

 

vizFrame is a powerful but difficult controller for new developers, I've made a demo following.

 

Only a little question:

I've set : 

oVizFrame.setVizScales(null);

in the code, But it still show scales:

Is that possible to hide all the scales in the chart?

 

Here is the code:

JS Bin - Collaborative JavaScript Debugging

 

 

 

2016-05-15 17_09_51-JS Bin - Collaborative JavaScript Debugging.png

 

 

 

 

Demo Source Code:

<!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='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js'

  id="sap-ui-bootstrap"

  data-sap-ui-libs="sap.ui.commons,sap.ui.table,sap.viz"

  data-sap-ui-theme="sap_bluecrystal">

  </script>

 

   <script>

 

 

 

   

  

 

 

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

        'businessData' : [

            {

                "Country" : "",

                "Profit" : 60,

                "Forcast" : 100,

                "Target" : 300,

                "Revenue" : 200

            }

        ]

    });

 

 

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

        dimensions : [

            {

                name : 'Country',

                value : "{Country}"

            }

        ],

        measures : [

            {

                name : 'Profit',

                value : '{Profit}'

            }, {

                name : 'Target',

                value : '{Target}'

            }, {

                name : "Forcast",

                value : "{Forcast}"

            }, {

                name : "Revenue",

                value : "{Revenue}"

            }

        ],

        'data' : {

            'path' : "/businessData"

        }

    });

 

 

    var oVizFrame = new sap.viz.ui5.controls.VizFrame({

        'uiConfig' : {

            'applicationSet' : 'fiori'

        },

        'vizType' : 'bullet'

    });

      oVizFrame.setVizProperties({

        plotArea : {

          dataLabel: {

                        visible: true

                    },

          primaryScale:{fixedRange: true, maxValue: 350, minValue: 0 },

            colorPalette : null,

            gap : {

                visible : false

            }

        },

        valueAxis: {

                        title: {

                            visible: false

                        }

                    },

        categoryAxis: {

                        title: {

                            visible: false

                        }

                    },

      

        legend : {

            title : {

                visible : false

            }

        },

 

 

        title : {

            visible : false,

            text : 'Bullet (with gap enabled)'

        }

    });

oVizFrame.setDataset(oDataset);

    oVizFrame.setModel(oModel);

     oVizFrame.setVizScales(null);

   

    var feedPrimaryValues = new sap.viz.ui5.controls.common.feeds.FeedItem({

        'uid' : "primaryValues",

        'type' : "Measure",

        'values' : [

            "Profit"

        ]

    }), feedAxisLabels = new sap.viz.ui5.controls.common.feeds.FeedItem({

        'uid' : "axisLabels",

        'type' : "Dimension",

        'values' : [

            "Country"

        ]

    }), feedTargetValues = new sap.viz.ui5.controls.common.feeds.FeedItem({

        'uid' : "targetValues",

        'type' : "Measure",

        'values' : [

            "Target"

        ]

    }), feedForecastValues = new sap.viz.ui5.controls.common.feeds.FeedItem({

        'uid' : "forecastValues",

        'type' : "Measure",

        'values' : ["Forcast"]

    }), feedAdditionalValues = new sap.viz.ui5.controls.common.feeds.FeedItem({

        'uid' : "additionalValues",

        'type' : "Measure",

        'values' : ["Revenue"]

    });

 

 

    oVizFrame.addFeed(feedPrimaryValues);

    oVizFrame.addFeed(feedAxisLabels);

   

    oVizFrame.addFeed(feedAdditionalValues);

   

    oVizFrame.addFeed(feedForecastValues);

    oVizFrame.addFeed(feedTargetValues);

 

 

 

   

        oVizFrame.placeAt("content");

   

      </script>

  

  </head>

  <body class="sapUiBody" role="application">

  <div id="content"></div>

  </body>

</html>


Viewing all articles
Browse latest Browse all 8944

Trending Articles



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