Question

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?

Était-ce utile?

La solution

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.

Autres conseils

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;
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top