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

fix barCharts rendering for zero values #41

Merged
merged 1 commit into from
Nov 25, 2020
Merged

fix barCharts rendering for zero values #41

merged 1 commit into from
Nov 25, 2020

Commits on Nov 20, 2020

  1. fix barCharts rendering for zero values

    This is a fix for regression that was caused when d3 package was
    replaced by d3-scale package and others. Latest version of `d3-scale`
    package introduced change related to the issue d3/d3-scale#117
    that caused to half fill barChart for 0 value.
    
    Now, `normalizeClosedDomain` checks if domain start and end values
    are equal or not, and in case they are equal, it increases last value
    by one. Note, it doesn't change actual values, but only domain range of
    possible values.
    
    Most of the time barChart renders bars with range from 0% to 100% and
    it should show 0% value when we have values [0, 0].
    - With introduced "breaking" change in d3-scale, it returns middle point
    for range [0, 0] and it equals 50% (for range0 from % to 100%).
    - With fix and as it was before, for 0 value scaling within [0, 0] domain
    will return 0%
    koorosh committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    2b275de View commit details
    Browse the repository at this point in the history