-2

I have a TeeChart (C#.NET) with 1-5 line series. Its X axis is type of DateTime, and Y is Double.

I want to draw vertical lines to mark interesting time positions, like start and end of sequences, but I can't find a method for drawing vertical lines. Am I just blind or do I need to detour?

Travenin
  • 1,511
  • 1
  • 13
  • 24

1 Answers1

2

There's ColorLine tool for that. You'll find examples at All Features\Welcome !\Tools\Color Line in the features demo, available at TeeChart's program group and more info at the TeeChart .NET tutorials, specifically at tutorial number 18.

Narcís Calvet
  • 7,304
  • 5
  • 27
  • 47
  • Hey thank you! I got it close, but when i put `colorLine.Value = new DateTime(2016, 1, 1, 0, 34, 0);` I get error _Cannot implicitly convert type 'System.DateTime' to 'double'_ so which kind of conversion would help me out? – Travenin Feb 26 '16 at 15:27
  • Also `Convert.ToDouble(DateTime)`complains invalid cast. – Travenin Feb 26 '16 at 15:32
  • 1
    @Travenin you should use [DateTime.ToOADate()](https://msdn.microsoft.com/en-us/library/system.datetime.tooadate(v=vs.110).aspx). – Narcís Calvet Feb 26 '16 at 15:34
  • Yess, I just found it at the same time you commented. Thanks! – Travenin Feb 26 '16 at 15:36