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

Bind DataSet to OData URL

$
0
0

Hello,

 

I want to bind the dataset of VizFrame to an OData URL.

 

 

I do it like :

 

var oDataset = new FlattenedDataset({

   dimensions: [

  {

   name: 'Timestamp',

   value: "{DateTime}",

   dataType : 'date'
   }

  ],

   measures: [

  {

   name : "Consumption",

   value : "{Value}"
   }

  ]

});

 

oDataset.bindData(bindUrl);

 

oVizFrame.setDataset(oDataset);

 

 

However, the type DateTime in OData cannot be DateTime, because according to OData, the DateTime instance is pass as a string like "/Date(milliseconds )/". JSON Format (OData Version 2.0) · OData - the Best Way to REST

 

According to this discussion: Working with OData Dates and Times

 

If I set my data to an ODataModel, the date can be parsed correctly.

 

But I don't know how to do it. Can anyone help me?

 

Thanks a lot.


Viewing all articles
Browse latest Browse all 3354

Trending Articles



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