Skip to Content
0

Vizframe problem rendering on new data (refresh data)

Feb 22 at 03:18 PM

112

avatar image
Former Member

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);
	}
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member
Feb 26 at 02:45 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0
avatar image
Former Member Mar 22 at 03:43 PM
0

@jun.wu5 you have been helpful in the past. Former Member 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.

Share
10 |10000 characters needed characters left characters exceeded