Files
Upsilon/apps/statistics/box_range.cpp
2019-08-08 17:22:04 +02:00

25 lines
541 B
C++

#include "box_range.h"
namespace Statistics {
BoxRange::BoxRange(Store * store) :
m_store(store)
{
}
float BoxRange::xMin() const {
float min = m_store->minValueForAllSeries();
float max = m_store->maxValueForAllSeries();
max = min >= max ? min + 1 : max;
return min - k_displayLeftMarginRatio*(max-min);
}
float BoxRange::xMax() const {
float min = m_store->minValueForAllSeries();
float max = m_store->maxValueForAllSeries();
max = min >= max ? min + 1 : max;
return max + k_displayRightMarginRatio*(max - min);
}
}