mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
Scenario: just zoom in in a graph Fix: - Do not truncate labels. - Label size is computed depending on available size and number of labels. - If labels cannot be displayed properly, just display the minimal and maximal labels!
31 lines
671 B
C++
31 lines
671 B
C++
#ifndef STATISTICS_BOX_AXIS_VIEW_H
|
|
#define STATISTICS_BOX_AXIS_VIEW_H
|
|
|
|
#include "box_range.h"
|
|
#include "store.h"
|
|
#include "../shared/curve_view.h"
|
|
#include "../constant.h"
|
|
#include <poincare/print_float.h>
|
|
|
|
namespace Statistics {
|
|
|
|
class BoxAxisView : public Shared::CurveView {
|
|
public:
|
|
BoxAxisView(Store * store) :
|
|
CurveView(&m_boxRange),
|
|
m_labels{},
|
|
m_boxRange(BoxRange(store))
|
|
{}
|
|
void drawRect(KDContext * ctx, KDRect rect) const override;
|
|
private:
|
|
constexpr static KDCoordinate k_axisMargin = 3;
|
|
char * label(Axis axis, int index) const override;
|
|
char m_labels[k_maxNumberOfXLabels][k_labelBufferMaxSize];
|
|
BoxRange m_boxRange;
|
|
};
|
|
|
|
}
|
|
|
|
|
|
#endif
|