一种方法是添加另一个 SeriesChartType Point 并仅将零 Points 添加为红点..:
// add a new Series:
Series sz = chart1.Series.Add("Zeroes");
sz.ChartType = SeriesChartType.Point;
sz.Color = Color.Red;
sz.BorderWidth = 3;
// add Points wherever the other series is zero or less
foreach (DataPoint dp in chart1.Series[0].Points )
{
if (dp.YValues[0] <= 0) sz.Points.AddXY(dp.XValue, 0);
}
1 回答
一种方法是添加另一个
Series
ChartType Point
并仅将零Points
添加为红点..:如果你需要检查更多
Series
,你可以为它们重复循环..