Merge pull request #67 from MihaelaStoica/CA-135489

CA-135489: Make sure that the y-axis units and scale match
This commit is contained in:
Gabor Apati-Nagy 2014-05-15 14:53:02 +01:00
commit 0160aa923f

View File

@ -117,6 +117,10 @@ namespace XenAdmin.Controls.CustomDataGraph
for (double i = args.Range.Min; i <= args.Range.Max; i += args.Range.Resolution)
{
// make sure that the last point is args.Range.Max
if (i + args.Range.Resolution > args.Range.Max)
i = args.Range.Max;
string label = args.Range.GetRelativeString(i);
LongPoint pt = LongPoint.TranslateToScreen(new LongPoint(0, (long)i), DataTimeRange.UnitRange, args.Range, new LongRectangle(args.Rectangle));