// ZedGraph ignores points with double.NaN so invalid value must set to this. private double[] MakeChartValue(DataValues dv) { double[] retList = new double[dv.Count]; for (int idx = 0; idx < dv.Count; idx++) { retList[idx] = (idx<dv.FirstValidValue?double.NaN:dv.Values[idx]); } return retList; }
private CurveItem PlotCurveLine(string curveName, Charts.Controls.baseGraphPanel graphPane, DataValues xValues, DataValues yValues, Color color, int weight) { graphPane.myGraphObj.SetSeriesX(xValues.Values, Charts.AxisType.DateAsOrdinal); CurveItem curveItem = graphPane.myGraphObj.AddCurveLine(curveName, MakeChartValue(yValues), SymbolType.None, color, weight); myCurveList.Add(curveItem, curveName, graphPane.myGraphObj.myGraphPane, graphPane.Name); return curveItem; }
private CurveItem PlotCurveLine(string curveName, Charts.Controls.baseGraphPanel graphPane, commonClass.DataValues xSeries, commonClass.DataValues ySeries, Color color, int weight) { pricePane.myGraphObj.SetSeriesX(xSeries.Values, Charts.AxisType.DateAsOrdinal); CurveItem curveItem = graphPane.myGraphObj.AddCurveLine(curveName, ySeries.Values, SymbolType.None, color, weight); return(curveItem); }