cancel
Showing results for 
Search instead for 
Did you mean: 

GanttChartWithTable timestamp

0 Kudos

Hi all,

I wan't to retrieve a timestamp by clicking the chart of GanttChartWithTable in order to use it for creation of new shapes. As far as i know, GanttChartWithTable only provides a shapePress-Event. As I try to create new shapes, I can not retrieve the time from a clicked shape but need to get it from the chart itself. Is there a way to get the timestamp fitting to my StepwiseZoomStrategy? Also i can see a cursor line when moving the mouse over the chart with a label that shows the timestamp i need.

Maybe there is a way to get the time shown by the cursor line label (label shown in screenshot)?

What I already did is adding an event delegate to get a click event. But timeStamp there is a float value such as in the screenshot below. That does not event fit to my viewRange (also in the screenshot).

Maybe TimeAxis has some function to fit this timestamp to my axis?

For further understanding here my event delegate for the gantt click event:

var onAfterRenderingGantt = function(oEvent) {

var that = this; var onGanttClicked = function(oEvent) {

var timeStamp = oEvent.timeStamp;
}.bind(this);

var GanttChart = this.byId("GanttChartWithTable");
GanttChart.addEventDelegate({ onclick: onGanttClicked }); }.bind(this);

I would be grateful for any help.

Thank you in advance! 🙂

sveabecker
Community Advocate
Community Advocate
0 Kudos

Hi Tom, Thank you for visiting SAP Community to get answers to your questions. If you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.

Regards, Svea

SAP Community moderator

Accepted Solutions (0)

Answers (0)