Reputation: 31
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?
Upvotes: 3
Views: 1137
Reputation: 10312
I don't know if I understand your problem correctly. I assume you have for example 20 candlesticks for 20 dates, but you want to draw a line graph for only last 10 of them?
If yes, use NaN
as a placeholder. So in the example above, you would have to add 10 points at the beginning of your line plot data containing values double.NaN
.
Zedgraph treats NaN
as an empty element and does not draw the curve for it. If you would add NaN
somewhere inside, you would have two curves separated by some gap. It is quite useful to use NaN
s as placeholders in ZG.
Upvotes: 2