开发者

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

开发者 https://www.devze.com 2023-02-24 05:57 出处:网络
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

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

精彩评论

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