The code I use to do this is:
private void DrawTargets()
{
right = left - 1;
Draw.Line(this, "entry " + Time[i].ToString(), false, left, entry, right, entry, Brushes.White, DashStyleHelper.Solid, lineThickness);
Draw.Line(this, "target " + Time[i].ToString(), false, left, target, right, target, Brushes.Green, DashStyleHelper.Solid, lineThickness);
Draw.Line(this, "targetvert " + Time[i].ToString(), false, right, entry, right, tVert, Brushes.Green, DashStyleHelper.Dot, 1);
Draw.Line(this, "stop " + Time[i].ToString(), false, left, stop, right, stop, Brushes.Red, DashStyleHelper.Solid, lineThickness);
Draw.Line(this, "stopvert " + Time[i].ToString(), false, right, entry, right, sVert, Brushes.Red, DashStyleHelper.Dot, 1);
Draw.Text(this, "40t " + Time[i].ToString(), false, "x", right, t40, 0, Brushes.Yellow, ArielFont12,
TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 100);
Draw.Text(this, "40s " + Time[i].ToString(), false, "x", right, s40, 0, Brushes.Yellow, ArielFont12,
TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 100);
Draw.Text(this, "tBE " + Time[i].ToString(), false, "-", right, tBE, 0, Brushes.White, ArielFont12,
TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 100);
Values[0][0] = target;
Values[1][0] = stop;
}​
The only time I call DrawTargets() is when I need to print to the screen. It draws the lines correctly. But somehow adds extra values to the series as well as missing some of the values. Since it always draws the target and stop lines correctly, how do I get it draw the series crosses correctly?
This would also allow me to switch to only having the series and saving a lot of resources that are drawing the lines
Comment