public LineCurve(ChartGraph chart, string name, int maxPointCount) : base(chart) { this.Name = name; this.LineWidth = 1; this.LineColor = Color.Lime; this.yAxes = new YAxes(); this.TimeDayAlign = false; }
private void MakeYAxes() { if (yAxes.Mode == YAxesMode.Auto) { if (float.IsNaN(maxVal)) { yAxes.YAxesMax = 0; yAxes.YAxesMin = 0; } else { if (maxVal - minVal < 1) { yAxes.YAxesMax = maxVal + 5; yAxes.YAxesMin = minVal - 5; } else { yAxes.YAxesMax = (maxVal + minVal) / 2 + (maxVal - minVal) * 0.7f; yAxes.YAxesMin = (maxVal + minVal) / 2 - (maxVal - minVal) * 0.7f; } } YAxes shareYAxes = this.LineArea.SharedYAxes; if (shareYAxes.YAxesMax <= shareYAxes.YAxesMin) //无效坐标 { shareYAxes.YAxesMax = yAxes.YAxesMax; shareYAxes.YAxesMin = yAxes.YAxesMin; } else { if (shareYAxes.YAxesMax < yAxes.YAxesMax) { shareYAxes.YAxesMax = yAxes.YAxesMax; } if (shareYAxes.YAxesMin > yAxes.YAxesMin) { shareYAxes.YAxesMin = yAxes.YAxesMin; } } } }