Special vertical line can be in the chart area as per our requirement. Special lines can be customized, below code illustrates drawing vertical line for each day.
|
var self = this; $(document).ready(function () { var cgcb = self.CreateCustomChartBackgroundRanges(); ..... $gantt_container.GanttControl({ ..... CustomChartBackgroundRanges: cgcb, ..... }); });
// Provides custom range info function CreateCustomChartBackgroundRanges() { var customRangesInfos = new RadiantQ.Gantt.CustomRangesInfos(); customRangesInfos.ProvideRepeatingCustomRanges.subscribe(ProvideRepeatingCustomRangesEvent); function ProvideRepeatingCustomRangesEvent(sender, args) { var viewSpan = args.ViewEndTime.clone() - args.ViewStartTime.clone(); var start = args.ViewStartTime.clone(); var end = args.ViewEndTime.clone(); while (start < end) { var spl = new RadiantQ.Gantt.SpecialLineInfo() spl.LineDateTime = start.clone(); spl.ToolTipText = 'today'; spl.LineColor = "green"; $gantt_container.data("GanttControl").options.SpecialLineInfos.add(spl); start = start.addDays(1); } } return customRangesInfos; } |
� RadiantQ 2022. All Rights Reserved.