拜托,我有一段功能代码。它用红色画笔(在X轴上)强调指向第四个指数。
var mapper = new CartesianMapper<double>()
.X((value, index) => index)
.Y(value => value)
.Fill((value, index) => index == 4 ? Brushes.Red : Brushes.Green);
当我在int []数组中有多个要点时,我该怎么办?
int[] pointsToHighlight = new int[] {4, 5, 6};
答案 0 :(得分:1)
var mapper = new CartesianMapper<double>()
.X((value, index) => index)
.Y(value => value)
.Fill((value, index) => pointsToHighlight.Contains(index) ? Brushes.Red : Brushes.Green);