# chart-stripline

> Chart that adds a horizontal Y-axis strip line over a column series to mark a temperature band, with crosshair tooltips and X/Y zooming enabled.

**Framework:** winforms  **Component:** Chart  **Variant:** stripline

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/winforms/chart-stripline.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.Chart.Windows
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/chart-stripline/chart.Designer.cs

```cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Syncfusion.Windows.Forms;
using Syncfusion.Windows.Forms.Chart;
using Syncfusion.Drawing;

namespace ChartStripline
{
    public partial class Form1 : Syncfusion.Windows.Forms.MetroForm
    {
        #region Windows Form Designer generated code
        /// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
        {
            chartControl1 = new ChartControl();
            SuspendLayout();
            // 
            // Form1
            // 
            BackColor = Color.White;
            ClientSize = new Size(954, 581);
            Controls.Add(chartControl1);
            MinimumSize = new Size(580, 439);
            AutoScaleDimensions = new SizeF(6F, 13F);
            AutoScaleMode = AutoScaleMode.Font;
            Name = "Form1";
            StartPosition = FormStartPosition.CenterScreen;
            Text = "From CSV";
            Load += Form1_Load;
            ResumeLayout(false);

        }

        #endregion

        #region Private Members
        private Syncfusion.Windows.Forms.Chart.ChartControl chartControl1;
        private System.ComponentModel.IContainer components = null;
        #endregion

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
    }
}

```

### src/components/chart-stripline/chart.cs

```cs
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using System.Xml;
using System.Data.OleDb;
using System.IO;
using Syncfusion.Windows.Forms;
using Syncfusion.Drawing;
using Syncfusion.Windows.Forms.Chart;

namespace ChartStripline
{
    public partial class Form1 : Syncfusion.Windows.Forms.MetroForm
    {
        #region Form Constructor

        public Form1()
        {
            BorderColor = Color.FromArgb(0xFF, 0xCD, 0xCD, 0xCD);
            BorderThickness = 3;
            CaptionBarHeight = 75;
            CaptionBarColor = Color.FromArgb(0xFF, 0x1B, 0xA1, 0xE2);
            CaptionFont = new Font("Segoe UI", 22.0f);
            CaptionForeColor = Color.White;
            CaptionAlign = HorizontalAlignment.Left;
            ShowIcon = false;
            CaptionButtonColor = Color.White;
            CaptionButtonHoverColor = Color.White;
            InitializeComponent();
        }

        #endregion

        #region Form Load
        private void Form1_Load(object sender, System.EventArgs e)
        {
            InitializeChart();
            this.chartControl1.Dock = DockStyle.Fill;

        }
        #endregion

        #region Helper Methods

        #region InitializeChartData

        private void InitializeChart()
        {
            ChartSeries series = new ChartSeries("Temperature", ChartSeriesType.Column);

            series.Points.Add(1, 22);
            series.Points.Add(2, 25);
            series.Points.Add(3, 28);
            series.Points.Add(4, 30);
            series.Points.Add(5, 27);
            series.Points.Add(6, 24);

            chartControl1.Series.Add(series);

            chartControl1.Text = "Average Temperature Analysis";

            chartControl1.PrimaryXAxis.Title = "Region";

            chartControl1.PrimaryYAxis.Title = "Temperature (°C)";

            chartControl1.Crosshair.Visible = true;
            chartControl1.PrimaryXAxis.ShowCrosshairTooltip = true;
            chartControl1.PrimaryYAxis.ShowCrosshairTooltip = true;

            // stripline
            ChartStripLine stripLine = new ChartStripLine();
            stripLine.Enabled = true;
            stripLine.Vertical = false;
            stripLine.Start = 24;
            stripLine.End = 26;
            stripLine.Width = 2;
            stripLine.Text = "";
            stripLine.Interior = new BrushInfo(230, new BrushInfo(GradientStyle.Vertical, Color.OrangeRed, Color.Orange));
            chartControl1.PrimaryYAxis.StripLines.Add(stripLine);

            chartControl1.ShowLegend = true;
            chartControl1.Legend.Alignment = ChartAlignment.Center;
            chartControl1.Legend.Position = ChartDock.Top;
            chartControl1.LegendsPlacement = ChartPlacement.Outside;

            // Tooltip
            chartControl1.ShowToolTips = true;

            // data label
            series.Style.DisplayText = true;

            // zooming
            chartControl1.EnableXZooming = true;
            chartControl1.EnableYZooming = true;
            chartControl1.Skins = Skins.Metro;
        }

        #endregion

        #endregion
    }
}

```
