{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "chart-default",
  "framework": "winforms",
  "type": "registry:component",
  "component": "Chart",
  "variant": "default",
  "dependencies": [
    "Syncfusion.Chart.Windows"
  ],
  "description": "Column chart of annual sales with per-point BrushInfo colors applied through PrepareStyle, an embed border skin, and a fixed y-axis range.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 2 (v34.1.29)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/winforms/llms.txt",
    "skillPack": "syncfusion/winforms-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/winforms/chart-default.md"
  },
  "files": [
    {
      "target": "src/components/chart-default/Form1.cs",
      "content": "#region Copyright Syncfusion Inc. 2001 - 2006\n//\n//  Copyright Syncfusion Inc. 2001 - 2006. All rights reserved.\n//\n//  Use of this code is subject to the terms of our license.\n//  A copy of the current license can be obtained at any time by e-mailing\n//  licensing@syncfusion.com. Any infringement will be prosecuted under\n//  applicable laws. \n//\n#endregion\n\nusing System;\nusing System.Drawing;\nusing System.Collections;\nusing System.ComponentModel;\nusing System.Windows.Forms;\nusing System.Data;\nusing Syncfusion.Drawing;\n\nusing Syncfusion.Windows.Forms.Chart;\nusing Syncfusion.Windows.Forms;\n\nnamespace GettingStartedSample\n{\n    public class Form1 : MetroForm\n    {\n        #region Private Members\n        private System.Windows.Forms.Panel panel1;\n        private System.Windows.Forms.Label label2;\n        private Syncfusion.Windows.Forms.Chart.ChartControl chartControl1;\n        private Label label6;\n\n        /// <summary>\n        /// Required designer variable.\n        /// </summary>\n        private System.ComponentModel.Container components = null;\n        #endregion\n\n        #region Form Constructor, Main, Dispose\n        public Form1()\n        {\n            BorderColor = Color.FromArgb(0xFF, 0xCD, 0xCD, 0xCD);\n            BorderThickness = 3;\n            CaptionBarHeight = (int)DpiAware.LogicalToDeviceUnits(75.0f);\n            CaptionBarColor = Color.FromArgb(0xFF, 0x1B, 0xA1, 0xE2);\n            CaptionFont = new Font(\"Segoe UI\", 22.0f);\n            CaptionForeColor = Color.White;\n            CaptionAlign = HorizontalAlignment.Left;\n            ShowIcon = false;\n            CaptionButtonColor = Color.White;\n            CaptionButtonHoverColor = Color.White;\n            InitializeComponent();\n\n        }\n\n        /// <summary>\n        /// The main entry point for the application.\n        /// </summary>\n        [STAThread]\n        static void Main()\n        {\n            Syncfusion.Telemetry.Telemetry.Disable();\n            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(DemoCommon.FindLicenseKey());\n            Application.Run(new Form1());\n        }\n\n\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing)\n            {\n                if (components != null)\n                {\n                    components.Dispose();\n                }\n            }\n            base.Dispose(disposing);\n        }\n        #endregion\n\n        #region Windows Form Designer generated code\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));\n            this.panel1 = new System.Windows.Forms.Panel();\n            this.label6 = new System.Windows.Forms.Label();\n            this.label2 = new System.Windows.Forms.Label();\n            this.chartControl1 = new Syncfusion.Windows.Forms.Chart.ChartControl();\n            this.panel1.SuspendLayout();\n            this.SuspendLayout();\n            // \n            // panel1\n            // \n            this.panel1.Dock = DockStyle.Bottom;\n            this.panel1.BackColor = System.Drawing.Color.White;\n            this.panel1.Controls.Add(this.label6);\n            this.panel1.Controls.Add(this.label2);\n            this.panel1.Font = new System.Drawing.Font(\"Segoe UI\", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.panel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));\n            this.panel1.Location = new System.Drawing.Point(0, 417);\n            this.panel1.Name = \"panel1\";\n            this.panel1.Size = new System.Drawing.Size(942, 155);\n            this.panel1.TabIndex = 0;\n            // \n            // label6\n            // \n            this.label6.AutoSize = true;\n            this.label6.Font = new System.Drawing.Font(\"Segoe UI\", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));\n            this.label6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;\n            this.label6.Location = new System.Drawing.Point(1, 0);\n            this.label6.Name = \"label6\";\n            this.label6.Size = new System.Drawing.Size(255, 21);\n            this.label6.TabIndex = 5;\n            this.label6.Text = \"Getting Started with Essential Chart\";\n            this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n            // \n            // label2\n            // \n            this.label2.BackColor = System.Drawing.Color.White;\n            this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;\n            this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));\n            this.label2.Location = new System.Drawing.Point(15, 30);\n            this.label2.Name = \"label2\";\n            this.label2.Size = new System.Drawing.Size(515, 125);\n            this.label2.TabIndex = 1;\n            this.label2.Tag = \"\";\n            this.label2.Text = \"\\r\\n* Essential Chart can be displayed on a form by dragging and dropping it there.\" +\n    \"\\r\\n\\r\\n* A chart can be initialized by creating a series and adding it to the serie\" +\n    \"s collection.\";\n            // \n            // chartControl1\n            // \n            this.chartControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n            this.chartControl1.BackInterior = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.Color.White, System.Drawing.Color.White);\n            this.chartControl1.BorderAppearance.SkinStyle = Syncfusion.Windows.Forms.Chart.ChartBorderSkinStyle.Embed;\n            this.chartControl1.ChartArea.CursorLocation = new System.Drawing.Point(0, 0);\n            this.chartControl1.ChartArea.CursorReDraw = false;\n            this.chartControl1.ChartArea.XAxesLayoutMode = Syncfusion.Windows.Forms.Chart.ChartAxesLayoutMode.SideBySide;\n            this.chartControl1.ChartArea.YAxesLayoutMode = Syncfusion.Windows.Forms.Chart.ChartAxesLayoutMode.SideBySide;\n            this.chartControl1.ChartAreaMargins = new Syncfusion.Windows.Forms.Chart.ChartMargins(10, 10, 20, 10);\n            this.chartControl1.ChartInterior = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.Color.White, System.Drawing.Color.White);\n            this.chartControl1.DataSourceName = \"\";\n            this.chartControl1.IsWindowLess = false;\n            // \n            // \n            // \n            this.chartControl1.Legend.Alignment = Syncfusion.Windows.Forms.Chart.ChartAlignment.Center;\n            this.chartControl1.Legend.BackInterior = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.Color.Transparent, System.Drawing.Color.Transparent);\n            this.chartControl1.Legend.Font = new System.Drawing.Font(\"Segoe UI\", 10F);\n            this.chartControl1.Legend.Location = new System.Drawing.Point(431, 68);\n            this.chartControl1.Legend.Orientation = Syncfusion.Windows.Forms.Chart.ChartOrientation.Horizontal;\n            this.chartControl1.Legend.Position = Syncfusion.Windows.Forms.Chart.ChartDock.Top;\n            this.chartControl1.LegendsPlacement = Syncfusion.Windows.Forms.Chart.ChartPlacement.Outside;\n            this.chartControl1.Localize = null;\n            this.chartControl1.Location = new System.Drawing.Point(3, 8);\n            this.chartControl1.Name = \"chartControl1\";\n            this.chartControl1.PrimaryXAxis.Crossing = double.NaN;\n            this.chartControl1.PrimaryXAxis.Margin = true;\n            this.chartControl1.PrimaryYAxis.Crossing = double.NaN;\n            this.chartControl1.PrimaryYAxis.Margin = true;\n            this.chartControl1.PrimaryYAxis.Range = new Syncfusion.Windows.Forms.Chart.MinMaxInfo(0D, 500D, 100D);\n            this.chartControl1.PrimaryYAxis.RangeType = Syncfusion.Windows.Forms.Chart.ChartAxisRangeType.Set;\n            this.chartControl1.Size = new System.Drawing.Size(942, 406);\n            this.chartControl1.TabIndex = 1;\n            this.chartControl1.Text = \"Essential Chart\";\n            // \n            // \n            // \n            this.chartControl1.Title.Font = new System.Drawing.Font(\"Segoe UI\", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.chartControl1.Title.Name = \"Default\";\n            this.chartControl1.Titles.Add(this.chartControl1.Title);\n            this.chartControl1.ZoomOutIncrement = 0.20000000298023224D;\n            // \n            // Form1\n            // \n            this.BackColor = System.Drawing.Color.White;\n            this.ClientSize = new System.Drawing.Size(954, 581);\n            this.Controls.Add(this.chartControl1);\n            this.Controls.Add(this.panel1);\n            this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n            this.MinimumSize = new System.Drawing.Size(531, 547);\n            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.Name = \"Form1\";\n            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n            this.Text = \"Getting Started\";\n            this.Load += new System.EventHandler(this.Form1_Load);\n            this.panel1.ResumeLayout(false);\n            this.panel1.PerformLayout();\n            this.ResumeLayout(false);\n\n        }\n        #endregion\n\n        #region Form_Load\n        private void Form1_Load(object sender, System.EventArgs e)\n        {\n            //Creates series and associate with the Chart control\n            InitializeChartData();\n            \n            //Customize the basic appearance and behaviour of Chart Control\n            ChartAppearance.ApplyChartStyles(this.chartControl1);\n            this.chartControl1.Dock = DockStyle.Fill;\n           \n        }\n        #endregion\n\n        #region Helper Method\n\n        #region InitializeChartData\n\n        private void InitializeChartData()\n        {\n            ChartSeries series = new ChartSeries();\n            series.Name = \"Sales\";\n            series.Points.Add(1999, 3);\n            series.Points.Add(2000, 7);\n            series.Points.Add(2001, 12);\n            series.Points.Add(2002, 18);\n            series.Points.Add(2003, 22);\n            series.Points.Add(2004, 30);\n            series.Points.Add(2005, 40);\n            series.Points.Add(2006, 50);\n            series.Points.Add(2007, 65);\n            series.Points.Add(2008, 75);\n            series.Type = ChartSeriesType.Column;\n            series.Text = series.Name;\n            this.chartControl1.Series.Add(series);           \n            this.chartControl1.Series[0].PrepareStyle += new ChartPrepareStyleInfoHandler(Form1_PrepareStyle);\n        }\n\n        void Form1_PrepareStyle(object sender, ChartPrepareStyleInfoEventArgs args)\n        {\n            ChartSeries series = this.chartControl1.Series[0];\n            if(series!=null)\n            {\n\n                if (args.Index == 0)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0x1B, 0xA1, 0xE2));\n                }\n                else if (args.Index == 1)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0xA0, 0x50, 0x00));\n                }\n                else if (args.Index == 2)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0x33, 0x99, 0x33));\n                }\n                else if (args.Index == 3)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0xA2, 0xC1, 0x39));\n                }    \n                else if (args.Index == 4)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0xD8, 0x00, 0x73));\n                }\n                else if (args.Index == 5)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0xF0, 0x96, 0x09));\n                }\n                else if (args.Index == 6)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0xE6, 0x71, 0xB8));\n                }\n                else if (args.Index == 7)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0xA2, 0x00, 0xFF));\n                }\n                else if (args.Index == 8)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0xE5, 0x14, 0x00));\n                }\n                else if (args.Index == 9)\n                {\n                    args.Style.Interior = new BrushInfo(Color.FromArgb(0xFF, 0x00, 0xAB, 0xA9));\n                }\n            }\n        }\n        #endregion\n\n        #endregion\n    }\n    /// <summary>\n    /// Represents a class that is used to find the licensing file for Syncfusion controls.\n    /// </summary>\n    internal class DemoCommon\n    {\n\n        /// <summary>\n        /// Finds the license key from the Common folder.\n        /// </summary>\n        /// <returns>Returns the license key.</returns>\n        public static string FindLicenseKey()\n        {\n            string licenseKeyFile = \"..\\\\Common\\\\SyncfusionLicense.txt\";\n            for (int n = 0; n < 20; n++)\n            {\n                if (!System.IO.File.Exists(licenseKeyFile))\n                {\n                    licenseKeyFile = @\"..\\\" + licenseKeyFile;\n                    continue;\n                }\n                return System.IO.File.ReadAllText(licenseKeyFile);\n            }\n            return string.Empty;\n        }\n    }\n}\n"
    }
  ]
}