As per title: I have created a Gantt using the new "Graph" (image attached) and need some way of indicating the current date, either using a vertical line or a coloured area. Is this possible with graph?
1 Answer, 1 is accepted
answered on 04 Dec 2013, 02:49 PM
You have two ways to accomplish this:
The simplest approach is to add an another area series which will use the already created coordinate system and set its X to =Date.Now(), Y0 to the minimum and Y to the maximum of your Y axis.
The slightly more complicated approach is to create a second coordinate system which will use the already created X axis. Its Y axis will be used to mark the current date. To change its placement you need to have two CrossAxisPositions to the X axis. The first one will be used as a standard Y axis with Position = Auto. You have to set the second one programmatically in order to set its value to the current date.
You can use the following code snippet as an example:
var scale = this.dateTimeAxis.Scale as DateTimeScale;
var crossAxisPosition = new DateTimeScaleCrossAxisPosition()
Position = GraphScaleCrossAxisPosition.Specific,
Value = DateTime.Now.AddDays(3).Date
Hope it helps.
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.