Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] handle hiding labels and line markers separately #443

Closed
wants to merge 3 commits into from
Closed

[WIP] handle hiding labels and line markers separately #443

wants to merge 3 commits into from

Conversation

elrayle
Copy link
Contributor

@elrayle elrayle commented Sep 6, 2020

[WIP] Work in Progress -- DO NOT MERGE

The initial refactor of Gruff::Base #setup_graph_measurements has been moved to PR #444 which is green and ready for merge. This PR has been rebased on PR #444 and waiting for tests to complete to determine whether there are test failures related to the new processing of @hide_labels and @hide_line_markers.


Fixes #139

Description

@hide_labels (new) - hides column labels whether they appear under the graph or to the left of the graph.

@hide_line_markers - code modified to only hide line markers and base hiding of labels on new @hide_labels

Added tests for bar, line, and dot. Dot was used to test labels on the left instead of the bottom.

Related Work:

PR #444 - refactor Gruff::Base #setup_graph_measurements to reduce complexity

@elrayle
Copy link
Contributor Author

elrayle commented Sep 6, 2020

RE: Tests - I was not able to get the Docker testing framework to run. I ran the tests locally and saw a large number of failures. Looking at the graphs, they were essentially the same, so I am hopping Travis will see no failures.

There might be an issue with the graphs I added for new tests as it seems likely my setup is generating the graphs ever so slightly different than the Docker setup would.

Refactored Gruff::Base #setup_graph_measurements to use private methods to calculate each measurement. This moves the intertwined calculations based on hidden aspects of the graph to separate methods to make the decision points easier to follow.
@elrayle elrayle changed the title handle hiding labels and line markers separately [WIP] handle hiding labels and line markers separately Sep 7, 2020
… parameters

The parameters for this method changed when it moved from `Gruff::Base #render_gradated_background` to `Gruff::Renderer #gradated_background`.  The rescue retry was not updated to retry with the new set of parameters.  This commit fixes that.

**Related Work:**  PR #357 - refactor: Move setup phase of RMagick object into Gruff::Renderer
@elrayle
Copy link
Contributor Author

elrayle commented Sep 13, 2020

Closing: PR #446 adds this functionality for bar charts only. It establishes a pattern that can be used for other graph types.

@elrayle elrayle closed this Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hiding line markers results in series labels being hidden
1 participant