public PeriodChoiceControlPointsConvertor(YearMonth firstDate, YearMonth lastDate, DiagramIntervalMode intervalMode) { _firstDate = firstDate; _lastDate = lastDate; _delta = YearMonth.PeriodInMonths(_lastDate, _firstDate); _pointsInMonth = 100 / _delta; _intervalMode = intervalMode; }
public void YearMonthPeriodToPoints(Tuple <YearMonth, YearMonth> period, out double fromPoint, out double toPoint) { fromPoint = YearMonth.PeriodInMonths(period.Item1, _firstDate) / _delta; toPoint = YearMonth.PeriodInMonths(period.Item2, _firstDate) / _delta; }