Quantcast
Viewing all articles
Browse latest Browse all 2801

VizFrame: How to bind using i18n model in FeedItems?

Hi,

I want to bind data using i18n model in Viz frame chart on both the axis.

 

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

  dimensions: [{

  name: "{i18n>s3UDRequestedDate}",

  value:

// "{dealer>RequestedDate}"

  {

  path : "dealer>RequestedDate",

  formatter : formatter.DateFormat

  }

 

 

  }, {

  name: "{i18n>s3UDDescription}",

  value: "{dealer>Description}"

  }],

 

 

  measures: [{

  name: "{i18n>s3UDQuantity}",

  value: "{dealer>Quantity}"

  }],

  data: {

  path: loHeaderPath + "/UpcomingDeliveries"

  }

  });

// if (loUpcomingDeliveriesCharts.getDataset() === null) {

 

 

  loUpcomingDeliveriesCharts.setDataset(loUCDataset);

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

  'uid': "valueAxis",

  'type': "Measure",

  'values': "[Quantity]"

  });

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

  'uid': "categoryAxis",

  'type': "Dimension",

  'values': "[RequestedDate]"

 

 

  });

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

  "uid": "color",

  "type": "Dimension",

  "values": "[Description]"

 

 

  });

 

Here the value in values field in FeedItem should be same as the name field in dimensions and measures. Hence when I use English language, but when I use german language, it throws an error, eventhough I have maintained german file for i18n.

 

I found the solution however:

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

  'uid': "valueAxis",

  'type': "Measure",

  'values': "{i18n>s3UDQuantity}"

  });

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

  'uid': "categoryAxis",

  'type': "Dimension",

  'values': "{i18n>s3UDRequestedDate}"

 

 

  });

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

  "uid": "color",

  "type": "Dimension",

  "values": "{i18n>s3UDDescription}"

 

 

  });

 

By this way, everything works fine. But still there is a problem. If I have to enter 2 or more than 2 values in Values field in Feed Items, I am not able to do so.

 

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

  'uid': "valueAxis",

  'type': "Measure",

  'values': ["{i18n>s3UDQuantity},{i18n>s3UDDescription}"]    // This doesn't work

  });

 

 

 

Any solution??

 

Thanks,

Sanjo Thomas


Viewing all articles
Browse latest Browse all 2801

Trending Articles



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