Home > Net >  C # chart controls how to set the color of the point of the curve
C # chart controls how to set the color of the point of the curve

Time:05-11

Drawing curve, the curve of abnormal value point, let his color to red, and showed abnormal point value

Please bring chart controls to have this function or other have the function of control recommend

thank you

CodePudding user response:

Series. The Points [x] MarkerColor setting of a color

CodePudding user response:

Public void DrawPoints (System. Windows. Forms. DataVisualization. Charting. Chart Chart, int channel, double v)
{




Chart. The Series [channel]. Points. AddXY (m_xValue, v);


If (v & gt; 80)
{

Chart. The Series [channel]. Points [r]. (int) m_xValue MarkerColor=Color. Red;
}

I wrote, I found no color change

CodePudding user response:

reference 1st floor SMYZRJY response:
series. The Points [x] MarkerColor set the color of a certain point


Public void DrawPoints (System. Windows. Forms. DataVisualization. Charting. Chart Chart, int channel, double v)
{
Chart. The Series [channel]. Points. AddXY (m_xValue, v);

Chart. The Series [channel] MarkerStyle=MarkerStyle. Circle;//the specified tag style
Chart. The Series [channel]. MarkerSize=1;//the specified markup size

If (v & gt; 80 & amp; & M_xValue & gt;=0)
{
//Label lbT=new Label ();
//lbT. Location=new Point (100, v) (int).
//lbT. Text=v.T oString ();
//lbT. The Show ();

Chart. The Series [channel]. Points [r]. (int) m_xValue MarkerColor=Color. Red;
}
The else
{

}

Ok, but not V<80 is also a bit, I don't know why

CodePudding user response:

  •  Tags:  
  • C#
  • Related