Insert blank value in a serie in a chart Line using ASP.NET Chart Control

Hello,
I have the following code:
protected void Page_Load(object sender, EventArgs e)
        {
            Chart2.Width = 412;
            Chart2.Height = 296;
            Chart2.RenderType = RenderType.ImageTag;

            Chart2.Palette = ChartColorPalette.BrightPastel;
            var t = new Title("No Code Behind Page", Docking.Top, new System.Drawing.Font("Trebuchet MS", 14, System.Drawing.FontStyle.Bold), System.Drawing.Color.FromArgb(26, 59, 105));
            Chart2.Titles.Add(t);
            Chart2.ChartAreas.Add("Series 1");

            Chart2.Series.Add("Series 1");
            // add points to series 1
            for (int value = 0; value < 12; value++)
            {
                if (value == 4)
                {
                      Chart2.Series["Series 1"].Points.AddY(null);
                }
                else
                {
                    Chart2.Series["Series 1"].Points.AddY(value);
                }
            }

            var ser = Chart2.Series[0];
            ser.ChartType = SeriesChartType.Line;
            ser.MarkerStyle = MarkerStyle.Circle;
            Chart2.BorderSkin.SkinStyle = BorderSkinStyle.Emboss;
            Chart2.BorderColor = System.Drawing.Color.FromArgb(26, 59, 105);
            Chart2.BorderlineDashStyle = ChartDashStyle.Solid;
            Chart2.BorderWidth = 2;
            Chart2.Legends.Add("Legend1");
            Chart2.Legends[0].Alignment = System.Drawing.StringAlignment.Center;
            Chart2.Legends[0].LegendStyle = LegendStyle.Table;
            Chart2.Legends[0].TableStyle = LegendTableStyle.Auto;
            Chart2.Legends[0].Docking = Docking.Bottom;
            // Render chart control
            Chart2.Page = this;
        }

Basically what I want to do is insert a null value when the X axis = 4.
Thank you for your help.
GaspTeamAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaspTeamAuthor Commented:
Ok sorry, I found my answer instead of
Chart2.Series["Series 1"].Points.AddY(null);
it sould be
Chart2.Series["Series 1"].Points.AddY(DBNull.Value);

Thanks anyway.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GaspTeamAuthor Commented:
I found it myself and it fixed my problem. but i still want to share it with others.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.