Draw vertical delimiters
- Hello,
is there a way to draw vertical lines that does not represent datas but simple delimiters ?
These delimiters would be used to highlight important X values (dates), for example the beginning of a new year.
Thanks.
답변
- Check Axis.StripLines collection. You can find more information about striplines in the samples.
Alex.
http://blogs.msdn.com/alexgor- 답변으로 제안됨Alex GorevMSFT, 소유자2009년 6월 17일 수요일 오후 4:28
- 답변으로 표시됨seriousme 2009년 7월 3일 금요일 오전 10:15
- You can do it with code like this:
DateTime date = new DateTime(2003, 1, 2); StripLine sl = new StripLine() { BorderColor = Color.Red, BorderWidth = 3, BorderDashStyle = ChartDashStyle.Solid, IntervalOffset = date.ToOADate() };
Alex.
http://blogs.msdn.com/alexgor- 답변으로 표시됨seriousme 2009년 7월 3일 금요일 오전 10:15
- If stripline width is set to zero it should be drawn on top of the gridline.
Alex.
http://blogs.msdn.com/alexgor- 답변으로 표시됨seriousme 2009년 7월 3일 금요일 오전 10:14
모든 응답
- Check Axis.StripLines collection. You can find more information about striplines in the samples.
Alex.
http://blogs.msdn.com/alexgor- 답변으로 제안됨Alex GorevMSFT, 소유자2009년 6월 17일 수요일 오후 4:28
- 답변으로 표시됨seriousme 2009년 7월 3일 금요일 오전 10:15
- Thanks for your answer, it is almost that.
But I would like to highlight arbitrary dates, for example the "01/02/2003" date.
"StripLine" does not seem to contain such a property.
Is there a way to set arbitrary dates ? - You can do it with code like this:
DateTime date = new DateTime(2003, 1, 2); StripLine sl = new StripLine() { BorderColor = Color.Red, BorderWidth = 3, BorderDashStyle = ChartDashStyle.Solid, IntervalOffset = date.ToOADate() };
Alex.
http://blogs.msdn.com/alexgor- 답변으로 표시됨seriousme 2009년 7월 3일 금요일 오전 10:15
- Thanks a lot.
The only remaining problem is that when a custom stripline is at the same position that an original one, the black ones, it is hidden.
How to give the priority to the custom ones ?
- If stripline width is set to zero it should be drawn on top of the gridline.
Alex.
http://blogs.msdn.com/alexgor- 답변으로 표시됨seriousme 2009년 7월 3일 금요일 오전 10:14
- Thanks, it is perfect.

