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

Re: How to make UI5 Bar Chart treat string like "20140402" as Date type

$
0
0

Hi,

      I have already tried the method you described as:

==============================================

measures : [

       {

       name : 'AGS', 

       value: { path:"quarter>end_ags",

                     formatter: function(fValue) {  

                           jQuery.sap.require("sap.ui.core.format.DateFormat"); 

                           var oDateFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({pattern: "yyyyMMdd"});  

                           return oDateFormat.format(new Date(fValue)); 

                     }    

                 } 

       },

       {

       name : 'IT',

       value: { path:"quarter>devclose_ags",

                     formatter: function(fValue) {  

                           jQuery.sap.require("sap.ui.core.format.DateFormat"); 

                           var oDateFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({pattern: "yyyyMMdd"});  

                           return oDateFormat.format(new Date(fValue)); 

                     }    

                 }

      }

],

======================================================

If I use this code, the chart will show nothing. The formatter does not work.


Viewing all articles
Browse latest Browse all 9990

Trending Articles



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