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.