Skip to content

Nicer legend#958

Merged
j9ac9k merged 11 commits intopyqtgraph:developfrom
samschott:nicer-legend
Nov 20, 2019
Merged

Nicer legend#958
j9ac9k merged 11 commits intopyqtgraph:developfrom
samschott:nicer-legend

Conversation

@samschott
Copy link
Copy Markdown
Contributor

Improvements to the legend appearance:

  • Give options for legend frame and background color (pen and brush, respectively) instead of hard-coded values. Default to no legend background or frame. This is especially useful for a white background.
  • Control spacing of legend items through horSpacing and verSpacing (taken from PR Small Improvements for LegendItem #64).
  • Give separate option labelTextColor for legend text color.
  • New method self.clear to clear all legend items.
  • New methods to get and set the offset relative to the legend's parent.
  • Horizontal instead of tilted lines for legend pictures (also fixes Need a few spaces between LegendItem symbols and their names #578).

An example of how the modified legend will look like from keithleygui:

keithleygui screenshot

SamSchott added 11 commits June 17, 2019 23:00
- Give kwargs for legend frame and background colors instead of hard-coded values.
- Reduce spacing for more compact legend
- Give separate kwarg `labelTextColor`.
- New method to clear all legend items.
- New methods to get and change `offset` relative to the legend's parent.
- Horizontal instead of tilted lines for legend pictures.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Nov 20, 2019

Closing and Opening to Trigger Another CI run

@j9ac9k j9ac9k closed this Nov 20, 2019
@j9ac9k j9ac9k reopened this Nov 20, 2019
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Nov 20, 2019

CI seemed to have a hickup, trying to re-run but it's being temperamental.... will revisit later

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Nov 20, 2019

Since I cannot seem to re-queue up the job via the the azure interface, I'm going to close/open the PR again.

@j9ac9k j9ac9k closed this Nov 20, 2019
@j9ac9k j9ac9k reopened this Nov 20, 2019
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Nov 20, 2019

CI looks good, merging. Thanks for the PR @samschott sorry it took us so long to get to this.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 18.86792% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.74%. Comparing base (7506ee3) to head (6d794eb).
⚠️ Report is 285 commits behind head on develop.

Files with missing lines Patch % Lines
pyqtgraph/graphicsItems/LegendItem.py 18.86% 43 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #958      +/-   ##
===========================================
- Coverage    31.74%   31.74%   -0.01%     
===========================================
  Files          209      209              
  Lines        28366    28399      +33     
  Branches      4593     4595       +2     
===========================================
+ Hits          9005     9014       +9     
- Misses       18486    18510      +24     
  Partials       875      875              
Files with missing lines Coverage Δ
pyqtgraph/graphicsItems/LegendItem.py 25.19% <18.86%> (+0.72%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7506ee3...6d794eb. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Need a few spaces between LegendItem symbols and their names

3 participants