-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Possible regression on 2.8.0 #6143
Comments
@vletoux since you said you "checked the source code of chart.js and the code seems to be fine", it seems to me like there's no bug in Chart.js here. We have thousands of other users and no other reports of this bug, so I think the more likely explanation is that the bug is in BundlerMinifier. You'll really have to do a bit more leg work demonstrating where the bug lies. There's only a few of us working to maintain this project in our spare time and we already have hundreds of open bugs. It just doesn't scale for us to have to do a lot of investigation using different tools like BundlerMinifier for each new bug. We need the bug reporters to take on that burden or else it'll just be impossible to keep up with incoming bugs If you can share more information showing this bug is in Chart.js or show how to reproduce the bug just in Chart.js without having to use other tools then we'll gladly look at it |
Although it looks to me like there actually may be an issue here and you just linked to the wrong line of code. I think the issue might be in:
|
Great you found it. |
The bug is in the color-convert library. I sent a PR to upgrade it here: chartjs/chartjs-color#6 |
I can confirm that declaring r,g,b in the hwb2rgb function does fix the problem. |
Fix here: #6663 |
Context
Here is a "bug report" issued, to track the issue I'm facing which can be related to Chart.js or my own configuration.
I writing it just in case someone is in the same trouble than me.
I'm developing using asp.net core in Visual studio 2017 (latest release).
I'm preparing a .js file which is the concatenation of all .js files of my solution.
Expected Behavior
When running the project, during the compilation phase, the .js file is created and minimized.
Current Behavior
The "bundle and minifier" component triggers an error about strict compilation.
No line number or source files is indicated.
The error is not triggered on 2.7.0 and an update of chartjs to 2.8.0 triggers the error.
The error is about undeclared variables "r" "g" "b" multiple times in strict mode.
The problem occured both with chart.js and chart.bundle.js
Possible Solution
I checked the source code of chart.js and the code seems to be fine.
Indeed, you can see the following code, which is fine.
var r = rgb[0]/255, g = rgb[1]/255, b = rgb[2]/255
Maybe this is a problem in the bundle and minifier (latest version in my case - https://github.com/madskristensen/BundlerMinifier)
What is strange is that my solution is using 20+ other .js files and that the problem is triggered only when incorporating the latest version of chart.js
Steps to Reproduce (for bugs)
I was not able to have a simple reproduction step.
Investigation in progress.
Environment
The text was updated successfully, but these errors were encountered: