cancel
Showing results for 
Search instead for 
Did you mean: 

Vizframe problem rendering on new data (refresh data)

Former Member
0 Kudos

So I am using a vizframe to show performance of staff members on a process step.

The user is presented with a list of users where they navigate to a page displaying this vizframe chart. Navigating to the first employee works great, however when going back to the previous page and selecting a different employee, I get some odd rendering of the chart data labels (they all bunch up on the left side).

_chartBuilder: function(kpi,vizFrameProperties,oJSON,mString,chart,formatPattern){		
		var oVizFrame = this.getView().byId("idVizFrame_"+ kpi);
	    var oPopover = this.getView().byId("idPopOver_"+ kpi);	

	    oJSON.loadData(mString, null, false);
	    console.log(this.em102json_xMonth);
		var oModel = new sap.ui.model.json.JSONModel();
		var oFrameData = oJSON.oData.d;
		oModel.setData()
		oModel.setData(oFrameData)
		
		var oDataset = new sap.viz.ui5.data.FlattenedDataset({
			dimensions : [{
				name:chart, value:"{"+chart+"}"
			}],
			measures:[{
				name:'Performance', value:"{Performance}"
			}],
			data : { path : "/results" }
		})
		
        var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
           'uid':"valueAxis",'type':"Measure",'values':["Performance"]
        })
        var feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
       	   'uid':"categoryAxis",'type':"Dimension",'values':[chart]
        })
	oVizFrame.destroyFeeds();
	oVizFrame.setDataset();
        oVizFrame.setModel();
        oVizFrame.setVizProperties();
        oVizFrame.setVizType('stacked_column');
        
        oVizFrame.setDataset(oDataset);
	oVizFrame.setModel(oModel);
        oVizFrame.setVizProperties(vizFrameProperties);
        oVizFrame.addFeed(feedValueAxis);
        oVizFrame.addFeed(feedCategoryAxis);
        oPopover.connect(oVizFrame.getVizUid());
        oPopover.setFormatString(formatPattern.STANDARDPERCENT_MFD2);
	}
former_member196805
Contributor
0 Kudos

Could you replicate your issue on a snippix? You could use http://jsbin.com/vuyonabata/edit?html,output .

Former Member
0 Kudos

I am not so sure it will be easily replicated. The issue seems to occur when i navigate away from the view and then back with new data. My feeling is I need to clear something before refreshing the data or maybe I am refreshing the data incorrectly.... That being said I will try to set something up.

Former Member
0 Kudos

jun.wu5 you have been helpful in the past. chapman.wong suggested I replicate my issue on something like jsbin. However my issue only occurs in the navigating back and forth.

I start at page one, clicking on an individual to look at there performance. This takes me to page 2 which is all good. It's only when I navigate back to page 1 then again to page 2 looking at a second persons performance that the issue occurs.

0 Kudos

hi can u share how did u resolve the issue. i am facing similar issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

gregorw
Active Contributor
0 Kudos

Please check the simmilar issue: vizFrame Charts (stacked_column) doesn't render properly, after pressing back button (level 2). It was solved by adjusting the navigation handling.