Skip to Content
0

Define the Y-axis parameter as "time"

Nov 02, 2016 at 06:12 AM

436

avatar image
Former Member

Hi All,

I am using Scatter chart with time axis.

I want to have, time on the Y-axis (in HH:mm) format And Date on the x-axis.

I have used timeAxis due to which i am able to get the Date on the x-axis, but when I try to format the value axis as "time" I get error

[50005] - valueAxis : does not meet the minimum or maximum number of feeds definition.

I have to plot the day and on what did the event happened.Please find the screenshot attached.

Below is the code snippet that i tried:

var oDatasetDuration = new sap.viz.ui5.data.FlattenedDataset({
dimensions: [{
 name: 'TakenOn',
 value: '{TakenOn}',
dataType: 'date'
 }

],
measures: [
 {
name: 'TakenOn',
 dataType: 'time',
value: {
    parts: ['TakenOn'],
  formatter: function(sTime) {
 var sTime = new Date(sTime);
 jQuery.sap.require("sap.ui.core.format.DateFormat");
var oDateFormat = sap.ui.core.format.DateFormat.getTimeInstance({
 pattern: "HH:mm"
				                            });
 return oDateFormat.format(sTime);
				                        }
				                    }
				                }
	            ]

  var feedx = new sap.viz.ui5.controls.common.feeds.FeedItem({	                                                            uid: "valueAxis",
				                type: "Measure",
				                values: ['TakenOn']
				            });

 var feedy = new sap.viz.ui5.controls.common.feeds.FeedItem({
				                uid: "timeAxis",
				                type: "Dimension",
				                values: ['TakenOn']
				            });
capture.png
capture.png (32.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Tridwip Das Nov 08, 2017 at 01:27 PM
0

Hi!!

Have you solved this? I am going through the same problem!

Share
10 |10000 characters needed characters left characters exceeded