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

fixed the BADPREC issue when both the maximum and minimum values in a series are 0 #10

Merged
merged 1 commit into from
Jan 12, 2019

Conversation

JeffreySE
Copy link

Currently, if each value of a series is 0, here are the test code, this PR can fix the issue and avoid if the series's value is always 0.

package main

import (
    "fmt"
    "github.com/guptarohit/asciigraph"
)

func main() {
    data := []float64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    graph := asciigraph.Plot(data)

    fmt.Println(graph)
}

Output:

%!(BADPREC)            0.000000 ┼──────────

@coveralls
Copy link

Pull Request Test Coverage Report for Build 45

  • 4 of 6 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-20.2%) to 78.279%

Changes Missing Coverage Covered Lines Changed/Added Lines %
asciigraph.go 4 6 66.67%
Totals Coverage Status
Change from base Build 44: -20.2%
Covered Lines: 191
Relevant Lines: 244

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 45

  • 4 of 6 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-20.2%) to 78.279%

Changes Missing Coverage Covered Lines Changed/Added Lines %
asciigraph.go 4 6 66.67%
Totals Coverage Status
Change from base Build 44: -20.2%
Covered Lines: 191
Relevant Lines: 244

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jan 11, 2019

Pull Request Test Coverage Report for Build 39

  • 4 of 6 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-20.2%) to 78.279%

Changes Missing Coverage Covered Lines Changed/Added Lines %
asciigraph.go 4 6 66.67%
Totals Coverage Status
Change from base Build 44: -20.2%
Covered Lines: 191
Relevant Lines: 244

💛 - Coveralls

@guptarohit guptarohit merged commit a6c5ba7 into guptarohit:master Jan 12, 2019
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.

4 participants