cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with Sapui5 VizFrame dual_combination

Former Member
0 Kudos

Hi All,

     My requirement is to show data in combination(Column + Column + Line) with dual y axis,

     So I used dual_combination (not working), So i tried dual_stacked_column(working),dual_column(working),dual_line(working)

     This is my View

My View:-


<viz:VizFrame id="idVizFrame" uiConfig="{applicationSet:'fiori'}"

             vizType='dual_column'>

                <viz:dataset>

                    <viz.data:FlattenedDataset data="{/data}">

                        <viz.data:dimensions>

                            <viz.data:DimensionDefinition axis="1"

                                name="Country" value="{C}" />

                        </viz.data:dimensions>

                        <viz.data:measures>

                            <viz.data:MeasureDefinition group="1"

                                name="P" value="{P}" />

                            <viz.data:MeasureDefinition group="1"

                                name="P1" value="{P1}" />

                            <viz.data:MeasureDefinition group="1"

                                name="P2" value="{P2}" />

                        </viz.data:measures>

                    </viz.data:FlattenedDataset>

                </viz:dataset>

                <viz:feeds>                   

                    <viz.feeds:FeedItem uid="valueAxis" type="Measure"

                        values="P2" />

                     <viz.feeds:FeedItem uid="valueAxis" type="Measure"

                        values="P1" />                       

                     <viz.feeds:FeedItem uid="valueAxis2" type="Measure"

                        values="P" />

                    <viz.feeds:FeedItem uid="categoryAxis" type="Dimension"

                        values="Country" />

                </viz:feeds>

            </viz:VizFrame>

My Controller:-


var oVizFrame1 = this.getView().byId("idVizFrame");

var oModel1 = new sap.ui.model.json.JSONModel("../ui/model/test.json");

oVizFrame1.setModel(oModel1);

oVizFrame1.setVizProperties({

plotArea: {

                     dataLabel: {

                                visible: true

                            },

                     dataShape: {

                                primaryAxis: ["bar","bar"],

                                secondaryAxis: ["line"]

                            },

                           

                            secondaryScale: {

                                fixedRange : true, 

                                minValue: 0,

                                maxValue: 100 }

                        },   

               valueAxis: {

                         label: { visible: true},

                    title:      {

                             visible: true,

                             text:'Total'

                         }

                    },    

               valueAxis2: {

                     label: {

                        visible: true

                    },

                    title: {

                             visible: true,

                             text:'Percentage'

                         }

                   },

categoryAxis: {

                    title: {

                        visible: true

                    }

                },

                title: {

                    visible: false,

                    text: 'Country data'

                }

            });

    This is my view and controller, there is no problem with binding, Please give me some suggestions for this dual_combination char or chart with Two columns and one line with 2-yaxis.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member196805
Contributor
0 Kudos

Hello Karthik,

Could you share a screen shot on what you see on screen? Would vizFrame be in blank with the above xml code, or an error is prompted?

  The above code sound correct to me.

BR,

Chapman

Former Member
0 Kudos

hello Champman,

     vizFrame be in blank and in the console it is showing this error "Cannot read property 'valueAxis' of null"

thanks,

karthik.

former_member196805
Contributor
0 Kudos

Please check this snippix http://jsbin.com/susajoqazo/edit?html,output

Could you try modify it with your workflow?

Former Member
0 Kudos

Hello Champman,

     Thanks for your snippix,

          In this snippix vizType = "dual_column", if i am changing it to "dual_combination" blank page is populating,My requirement is (column + column + line) so I am using dual_combination,If you know any other way to get data on my requirement?  

former_member196805
Contributor
0 Kudos

The reason is because dual combination chart was not supported until SAPUI5 1.40. Please wait for 1.40 to release publicly. the latest version on sapui5.hana.ondemand.com is 1.38.

P.S.

The fact is 1.40 has already released a while ago. it is just version referenced on sapui5.hana.ondemand.com is still 1.38.