开发者

C# MS Chart Control - highlight today's date in Gantt Chart

The title of this开发者_如何学编程 question says it all.

I've got a gantt chart (RangeBar) made using the MS Chart Control, and at present I have some StripLines to highlight weekends and the start of each month, but I need one to appear on today's date only so the user can see where we are at the mo.

Is this possible with this control, or am I fishing for unicorns?

If it's possible, how?

Cheers


Nevermind, figured it out:

StripLine strpToday = new StripLine();
        strpToday.IntervalOffset = DateTime.Today.ToOADate();
        strpToday.StripWidth = 1;
        strpToday.BackColor = Color.ForestGreen;
        chtHC.ChartAreas[0].AxisY.StripLines.Add(strpToday);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜