This repository has been archived by the owner on Jul 29, 2019. It is now read-only.
Added generic graph drawing loop; isolated point drawing of graph style 'Bar' #2208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Redo of PR #2205, which I messed up in a very bad way.
I hope this is good now.
All graph drawing routines follow the following structure:
It is possible to consolidate this loop and move graph-style specific point drawing
to separate routines. This PR shows how that will look like; I've done only a single
graph style (
Bar
) to illustrate this.Changes:
_redrawDataGraph()
, usable for all graph styles._redrawBarGraphPoint()
, which draws a single point for styleBar
_redrawBar()
, so it can be reused.redraw()
, pass_redrawBarGraphPoint
as a reference to_redrawDataGraph()
The idea is:
Notes
1. This is a very important update in regard to handling multiple graphs in a view.
The reason is that the elements of the multiple graphs will need to be drawn together at the same time, so that the overlap of the various elements are correct in the view.
2. I would much rather prefer to use graph-style specific classes here, instead of passing
a point-drawing method.
However, I fully appreciate that implementing that in one go will be a 'Big Bang' change
which is totally unoverseeable for reviewing. For this reason, I am offering the changes in smaller,
bite-size chunks. The classes will have to wait.