I draw a line in a zedgraph pane, but sometimes it will be like this:
while it should be:
i can't find anything wrong from my code, anyone know how to solve this, thanks very much!
here is part of my code:
MasterPane master = zdg_stock.MasterPane;
var stockValueList = new PointPairList();
for (int i = 0; i < _dtUserStockHistory.Rows.Count; i++)
{
XDate time = XDate.DateTimeToXLDate((DateTime)_dtUserStockHistory.Rows[i]["ush_time"]);
stockValueList.Add(
time,
double.Parse(_dtUserStockHistory.Rows[i]["stock_value"].ToString()));
}
var pValue = new GraphPane();
LineItem lValue = pValue.AddCurve(string.Empty, stockValueList, Color.Red);
master.Add(pValue);
using (Graphics g = zdg_stock.CreateGraphics())
{
master.SetLayout(g, PaneLayout.SingleColumn);
zdg_stock.AxisChange();
zdg_stock.IsSynchronizeXAxes = true;
zdg_stock.IsAutoScrollRange = true;
zdg_stock.IsShowHScrollBar = true;
zdg_stock.IsEnableVZoom = false;
zdg_stock.IsShowPointValues = true;
}
zdg_stock.AxisChange();