# how to delete or remove a point in MSCHART C# • ### General discussion

• I would like to remove a point in mschart on a tangent graph. This means i need to remove an x and y value everytime the period = the domain. I have the math done correctly but now i need to remove those points. Here is the code for the tangent graph. It doesnt include the button to place the points on the chart.

```  private void tan()
{
chart1.Series["xxx"].IsXValueIndexed = true;
//loop till pointTan draws 10 values
for (int pointTan = 0; pointTan <= 10; pointTan++)
{
//declare vairaibles
double kTR;
double dTR;
double domain;
double periodT = 0;
double n = 0;

//incrment aymptote number
n++;

kTR = ((kT * Math.PI) / 180);
dTR = ((dT * Math.PI) / 180);

if (kTR == 0)
{
periodT = periodT + (Math.PI /2);
}
else
{
periodT = ((2 * Math.PI) / kTR);
}

//find asymptotes
domain = (((2 * n) - 1) * Math.PI) / 2;

label1.Text = periodT.ToString();

//find theta
double xT = Convert.ToDouble(x);
double theta = (kTR * (xT + dTR));

if (theta == 0)
{
//label1.Text = "matt";
theta = xT + dTR;
}

//convert y value to double
double yT = Convert.ToDouble(y);

yT = ((aT * (Math.Tan(theta)) + cT));

int xP = Convert.ToInt32(x);
int yP = Convert.ToInt32(yT);

//tell the chart to stop drawing
if (periodT == domain)
{
chart1.Series.;
chart1.Series["xxx"].Points[yP].IsEmpty = true;
label1.Text = "matt";
}

//draw the tan function

//increment x value
x++;
}
x = -5;```
Thursday, January 3, 2013 3:51 PM

### All replies

• Hi Awesomeprogrammer1000 - this forum is for Microsoft Project - I will try and find a more appropriate forum to move this thread to.

Best regards,

Brian Smith

Blog | Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page

Thursday, January 3, 2013 4:59 PM
• Thank You! I thought that since this was a project im working on it would be appropriate but i geuss not. Thank You in advance!

Thursday, January 3, 2013 5:09 PM
• im not sure if it makes a deffrience but its not an app imcreating for microsoft store. But im kind of currious now and i was wondering how do make it an app

Thursday, January 3, 2013 5:12 PM
• This would be a good place to start - http://msdn.microsoft.com/en-us/library/jj229830(office.15).aspx - and I hope someone here can also help with the mschart question.

Best regards,

Brian

Blog | Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page

Thursday, January 3, 2013 5:14 PM