Skip to content

Commit 5d8292a

Browse files
committed
Использовать параметр TooltipFormat при форматировании значения дельты
Это позволяет показывать в тултипе даже дробные дельты, наблюдаемые, например, на Байбит.
1 parent 915ea42 commit 5d8292a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎Options/SingleSeriesProfile.cs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,19 +354,19 @@ public InteractiveSeries Execute(double time, InteractiveSeries smile, IOptionSe
354354
//if (info.ContinuousFunction.TryGetValue(f - 100 * futStep, out deltaLeft) &&
355355
// info.ContinuousFunctionD1.TryGetValue(f + 100 * futStep, out deltaRight))
356356
{
357-
//int adLeft = (int)Math.Round(deltaLeft);
358-
//int adRight = (int)Math.Round(deltaRight);
359-
ip.Tooltip = String.Format(CultureInfo.InvariantCulture, " {0}\r\n LeftD:{1:0.0}; RightD:{2:0.0}",
360-
ip.Tooltip, deltaLeft, deltaRight);
357+
string deltaLeftStr = deltaLeft.ToString(m_tooltipFormat, CultureInfo.InvariantCulture);
358+
string deltaRightStr = deltaRight.ToString(m_tooltipFormat, CultureInfo.InvariantCulture);
359+
ip.Tooltip = String.Format(CultureInfo.InvariantCulture, " {0}\r\n LeftD:{1}; RightD:{2}",
360+
ip.Tooltip, deltaLeftStr, deltaRightStr);
361361
}
362362
}
363363
else
364364
{
365365
// Мы передвинули улыбку в точку f и считаем дельту позиции В ЭТОЙ ЖЕ ТОЧКЕ(!)
366366
if (info.ContinuousFunctionD1.TryGetValue(f, out actualDelta))
367367
{
368-
//int ad = (int)Math.Round(actualDelta);
369-
ip.Tooltip = String.Format(CultureInfo.InvariantCulture, " {0}\r\n D:{1:0.0}", ip.Tooltip, actualDelta);
368+
string actualDeltaStr = actualDelta.ToString(m_tooltipFormat, CultureInfo.InvariantCulture);
369+
ip.Tooltip = String.Format(CultureInfo.InvariantCulture, " {0}\r\n D:{1}", ip.Tooltip, actualDeltaStr);
370370
}
371371
}
372372
}

0 commit comments

Comments
 (0)