Hi,
Please find the attached sample for an implementation of a StripLine along the Y axis:
ChartStripLineYAxis_7593.zip
The releavnt code is also shown below:
private ChartStripLine optimalZone = new ChartStripLine();
private void CreateStripLine()
{
optimalZone.Enabled = true;
optimalZone.Vertical = false;
optimalZone.StartAtAxisPosition = false;
optimalZone.Start = 200;
optimalZone.End = 300;
optimalZone.Width = 100;
optimalZone.Period = 100;
optimalZone.Text = "Optimal";
optimalZone.Font = new Font(optimalZone.Font.FontFamily.Name,18);
optimalZone.TextColor = Color.CadetBlue;
optimalZone.Interior = new BrushInfo(100, new BrushInfo(GradientStyle.Vertical,Color.Red , Color.Red ));
}
private void SetStripLine()
{
if(this.checkBox1.Checked)
this.chartControl1.PrimaryYAxis.StripLines.Add(optimalZone);
else
this.chartControl1.PrimaryYAxis.StripLines.Remove(optimalZone);
}
Thanks,
Davis