3

I am using pane to draw Candle sticks (AddJapaneseCandleStick):

XAxis = AxisType.DateAsOrdinal;

Everything till this point works perfect.

Problem:

I would like to add another curve (simple linear graph) to the same pane Xaxis are dates as well and the values of YAxis are in the same ranges as the candle sticks The linear graph has less points than the candle stick graph, causing the linear graph not to draw correctly and appear in the beginning of the pane and not according to the points dates

(I do not have enough credits to upload the image.) Any ideas how can I overcome this problem?

4

1 回答 1

2

我不知道我是否正确理解了你的问题。例如,我假设您有 20 个日期的 20 个烛台,但您只想为最后 10 个日期绘制折线图?

如果是,请NaN用作占位符。因此,在上面的示例中,您必须在包含 values 的线图数据的开头添加 10 个点double.NaN
Zedgraph 将NaN其视为空元素,不会为其绘制曲线。如果你要在NaN里面的某个地方添加,你会有两条曲线分开一些间隙。NaN在 ZG中使用 s 作为占位符非常有用。

于 2011-07-05T16:02:27.780 回答