We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Drawing StripLines on a chart

I''m trying to draw a range on the Y axis of my chart. The type of numbers on this axis is double. and the scale is between 0 to 500. I need the range to be between 200 to 300. Thanks, Orit

1 Reply

DJ Davis Jebaraj Syncfusion Team April 14, 2005 02:21 PM UTC

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

Loader.
Up arrow icon