Home
Analytics
Changing dates dinamically in Gantt chart
andrelo
Hi everyone,
I'm designing a report with a Gantt chart in it. It is already displaying the bars of the duration of the tasks and it looks quite fine.
I am wondering if it is possible to modify dinamically the dates of start and finish of activities. I need to select just the days of a desired year, for instance 2009. I am using this expression:
x=new Date(params["Anios"],0,1)
y=new Date(params["Anios"],11,31)
if (x>row["PROPOSED_START"]){
x
}else if(y<row["PROPOSED_START"]){
x=y
}else{
x=row["PROPOSED_START"]
}
x
but it is not return the date that I want. For example if my PROPOSED_START is 2008/11/25 I need to change it to 2009/01/01.
Any ideas??
Thanks in advance
Find more posts tagged with
Comments
mwilliams
Hi andrelo,
So, you're doing this code in the expression builder for the "Start Date" in the Gantt Chart Builder?
andrelo
Hi Michael
Thanks for answering.
Yes, that's right. There is where I'm using this expression
I use a similar expression for the finish date.
regards,
andrelo
mwilliams
andrelo,
Ok, so the user picks a year and you figure your start and end dates off of that? Can you explain more of how you want to decide what dates are entered for start and end? Thanks.
andrelo
I think I found the way to do it using the same expression that I was using and the scale property of the y axis of the chart.
I´m performing some tests right now. I´ll be posting the results
mwilliams
andrelo,
Sounds good. Let me know. If it doesn't work, respond to my last question when you post the new info and I'll try to help.