문제

Now I'd like to draw a candlestick chart in C#. Problem I have is how to skip certain time of the x Axis. Say, the data starts from 9:00 and ends at 11:30. Then restart at 13:00 and ends in 15:00. If I fill data in it, period 11:30 to 13:00 will also be shown as a line. How to skip it and make it a consequence chart?

도움이 되었습니까?

해결책

Set series.IsXValueIndexed to true, that should fix your problem

series.IsXValueIndexed = true;

All data points in a series use sequential indices, and if this property is true then data points will be plotted sequentially, regardless of their associated X-values. This means that there will be no "missing" data points.

Take a look at documentation for more info.

다른 팁

I had same problem but after setting series.IsXValueIndexed = true, it not worked for me. So I've found another way of achieving this.

series.XAxisType = AxisType.Secondary;
series.IsXValueIndexed = true;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top