Description
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
- Chart.js version: 2.8.0