4,817
社区成员
发帖
与我相关
我的任务
分享
for (int i = 0; i < Chart1.Series["Series2"].Points.Count; i++)
{
Chart1.Series["Series2"].Points[i].Label = Chart1.Series["Series2"].Points[i].AxisLabel.ToString().Substring(
Chart1.Series["Series2"].Points[i].AxisLabel.ToString().IndexOf('|') + 1, Chart1.Series["Series2"].Points[i].AxisLabel.ToString().Length - 1
- Chart1.Series["Series2"].Points[i].AxisLabel.ToString().IndexOf('|')) + "\\n#PERCENT{P1}";
string pName = Chart1.Series["Series2"].Points[i].AxisLabel.ToString().Substring(0, Chart1.Series["Series2"].Points[i].AxisLabel.ToString().IndexOf('|'));
if (pName == Chart1.Series["Series1"].Points[j].AxisLabel.ToString())
{
a = a - 50;
if (a < 0)
{
a = a + 150;
}
Chart1.Series["Series2"].Points[i].Color = System.Drawing.Color.FromArgb(a, r, g, b);
}
}