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

Add support for colored legend #47

Merged
merged 2 commits into from
Mar 24, 2024
Merged

Conversation

EwanMe
Copy link
Contributor

@EwanMe EwanMe commented Aug 24, 2023

Legend can be added to a graph by including the option asciigraph.LegendTexts. This option is a list of strings making up the legend texts, whose indexes correspond to the series in the graph. Each legend item has a colored box matching the series it is mean to explain.

@EwanMe EwanMe mentioned this pull request Aug 24, 2023
@coveralls
Copy link

coveralls commented Aug 24, 2023

Pull Request Test Coverage Report for Build 8411757830

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 35 of 37 (94.59%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 95.89%

Changes Missing Coverage Covered Lines Changed/Added Lines %
legend.go 28 30 93.33%
Totals Coverage Status
Change from base Build 5568018373: -0.1%
Covered Lines: 350
Relevant Lines: 365

💛 - Coveralls

@guptarohit
Copy link
Owner

This is looking great @EwanMe ! ⭐ thanks

I'll add test for this and merge it very soon.

@guptarohit guptarohit linked an issue Mar 24, 2024 that may be closed by this pull request
@guptarohit guptarohit merged commit 27408ca into guptarohit:master Mar 24, 2024
8 checks passed
@EwanMe EwanMe deleted the graph-legend branch March 24, 2024 22:34
@EwanMe
Copy link
Contributor Author

EwanMe commented Mar 24, 2024

@guptarohit Cheers!

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.

Add legend to graph
3 participants