- 获取一组数当中的最大值、最小值
CGFloat yMax = 0.0f;
CGFloat yMin = MAXFLOAT;
for (DataItem *item in self.dataSourceArr) {
CGFloat yValue = item.yValue;
yMax = fmaxf(yMax, yValue);
yMin = fminf(yMin, yValue);
}
self.yValueMax = yMax;
self.yValueMin = yMin;