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

ERROR TypeError: n.rgb is not a function #1291

Closed
randymay-insclix opened this issue Oct 29, 2019 · 8 comments
Closed

ERROR TypeError: n.rgb is not a function #1291

randymay-insclix opened this issue Oct 29, 2019 · 8 comments
Labels

Comments

@randymay-insclix
Copy link

Describe the bug
I have added several bar graphs to my Angular 8.2.12 application, and they work beautifully. I recently added a heat map, and I am seeing the following error:

main.663f7eda36bb1abc50f2.js:1 ERROR TypeError: n.rgb is not a function
at MI (main.663f7eda36bb1abc50f2.js:1)
at AI (main.663f7eda36bb1abc50f2.js:1)
at t (main.663f7eda36bb1abc50f2.js:1)
at eR (main.663f7eda36bb1abc50f2.js:1)
at jR (main.663f7eda36bb1abc50f2.js:1)
at n.c [as scale] (main.663f7eda36bb1abc50f2.js:1)
at n.getColor (main.663f7eda36bb1abc50f2.js:1)
at main.663f7eda36bb1abc50f2.js:1
at Array.map ()
at main.663f7eda36bb1abc50f2.js:1

ngx-charts version
I am using nix-charts 12.0.1, and this problem is visible in both Safari, and Chrome.

@Michel73
Copy link

Michel73 commented Nov 5, 2019

I have the same problem. As a workaround I use the angular-cli option --optimization=false.

@Michel73
Copy link

Michel73 commented Nov 5, 2019

I solved my problem. Updated version of @angular-devkit/build-angular from 0.801.0 to 0.803.17.

@NikitaPooja
Copy link

Hello,

I got the error when I have reload the page. In "@angular-devkit/build-angular": "^0.10.6" version

Error TypeError: t.rgb is not a function

@rajitha1998
Copy link

Thanks @Michel73 Updated version of @angular-devkit/build-angular solved the issue

@antoinedepardailhantc
Copy link

Having the same issue with latest angular packages. None of the solutions above worked.

Project works fine in npm start / jit mode, but not int AOT.

@taimoor99
Copy link

I think the issue is related to d3 packages. I solve this kind of problem with this solution.
#1305 (comment)

@marjan-georgiev
Copy link
Member

The d3 packages have been updated in v 13.0.0. Closing this as fixed. Please open a new issue if you still see a problem.

@GoodHow
Copy link

GoodHow commented Apr 21, 2021

Same as the issue: d3/d3-color#68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants