I'm new here, I'm trying to draw multiple stock price at real-time. here is the code I'm using when I get realtime price point, if I only have one instrument (single series), the line is very smooth. If I have more than one, I only see separate point (the lines are broken), I guess different series data point are different (in time?), but I thought that each series should be indenpendent. Is there anything I'm doing wrong? thanks a lot.
private void AddPoint(DateTime datetime, double value, int seriesIdx)
How to draw multiple realtime line smoothly?
in Windows Forms
Posted
Hi, everyone,
I'm new here, I'm trying to draw multiple stock price at real-time. here is the code I'm using when I get realtime price point, if I only have one instrument (single series), the line is very smooth. If I have more than one, I only see separate point (the lines are broken), I guess different series data point are different (in time?), but I thought that each series should be indenpendent. Is there anything I'm doing wrong? thanks a lot.
{
chart1.RealTime.BeginAddData(1, RealTimeAction.Append);chart1.Data.X[seriesIdx, 0] = datetime.ToOADate();
chart1.Data.Y[seriesIdx, 0] = value;
chart1.RealTime.EndAddData(true, true);chart1.AxisX.LabelsFormat.Format =
AxisFormat.Time;chart1.AxisX.LabelsFormat.CustomFormat =
"HH:mm:ss";}