mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/statistics] Update and replace comment
This commit is contained in:
committed by
LeaNumworks
parent
83722342f7
commit
5e7d93b331
@@ -27,8 +27,14 @@ HistogramController::HistogramController(Responder * parentResponder, InputEvent
|
||||
|
||||
void HistogramController::setCurrentDrawnSeries(int series) {
|
||||
initYRangeParameters(series);
|
||||
/* The range of it CurveView has changed, the CurveView must be reloaded.
|
||||
* See comment in HistogramView::drawRect. */
|
||||
/* The histogram's CurveView range has been updated along the Vertical axis.
|
||||
* To call drawLabelsAndGraduations (in HistogramView::drawRect()), the
|
||||
* CurveView must be reloaded so that labels and their values match the new
|
||||
* range.
|
||||
* In this situation, we update CurveView's Vertical axis, and draw horizontal
|
||||
* labels, which are independent. To avoid having to call CurveView::reload(),
|
||||
* axis could be taken into account when checking if labels are up to date,
|
||||
* instead of using rangeChecksum(), which mixes all axis. */
|
||||
m_view.dataViewAtIndex(series)->CurveView::reload();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,14 +38,6 @@ void HistogramView::reloadSelectedBar() {
|
||||
}
|
||||
|
||||
void HistogramView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
/* When setting the current drawn series, the histogram's CurveView range is
|
||||
* updated along the Vertical axis. To call drawLabelsAndGraduations,
|
||||
* CurveView must be reloaded (in setCurrentDrawnSeries method) so that labels
|
||||
* and their values match the new range.
|
||||
* In this situation, we update CurveView's Vertical axis, and draw horizontal
|
||||
* labels, which are independent. To avoid having to call CurveView::reload(),
|
||||
* axis could be taken into account when checking if labels are up to date,
|
||||
* instead of using rangeChecksum(), which mixes all axis. */
|
||||
m_controller->setCurrentDrawnSeries(m_series);
|
||||
ctx->fillRect(rect, KDColorWhite);
|
||||
drawAxis(ctx, rect, Axis::Horizontal);
|
||||
|
||||
Reference in New Issue
Block a user