8000 Fix levelColor generation and its call for gauges (#2324) by aleksandr-erin · Pull Request #2534 · c3js/c3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix levelColor generation and its call for gauges (#2324) #2534

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

Merged
merged 1 commit into from
Dec 4, 2018
Merged

Fix levelColor generation and its call for gauges (#2324) #2534

merged 1 commit into from
Dec 4, 2018

Conversation

aleksandr-erin
Copy link
Contributor

Possible fix of #2324. Seems to be arc.js:347 is the only line that does not check levelColor for emptiness before calling it. Moreover, we can remove config.color_pattern.length > 0 check and create non-null levelColor function if config.color_pattern is not empty - otherwise undefined color that would be returned from levelColor does not make much sense.

@codecov-io
Copy link
codecov-io commented Nov 27, 2018

Codecov Report

Merging #2534 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2534   +/-   ##
=======================================
  Coverage   80.54%   80.54%           
=======================================
  Files          54       54           
  Lines        4282     4282           
=======================================
  Hits         3449     3449           
  Misses        833      833
Impacted Files Coverage Δ
src/arc.js 73.95% <100%> (ø) ⬆️
src/color.js 96.77% <100%> (ø) ⬆️

Continue to review full report at Codecov.

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

Copy link
Member
@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Confirmed the example in #2324 (http://jsfiddle.net/7kYJu/4756/) is fixed with this change.

@kt3k kt3k merged commit ca9fd2b into c3js:master Dec 4, 2018
@aleksandr-erin aleksandr-erin deleted the bugfix/level_color branch December 4, 2018 07:48
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.

3 participants
0