I encountered an issue with my Angular 2 project that was created using angular-cli version 1.0.0-beta.30 and utilizing the ngx-charts version 4.1.2 library. The bar chart component functions properly, however, when I tried to add a line chart, I faced a TypeError exception upon running the application. This error specifically points to the "includes" function in line 240 of the [line-chart.component.ts][1] source file while using Chrome version 38. Interestingly, the line chart displays correctly in Firefox.
if (!values.includes(d.name)) {
values.push(d.name);
}
I am seeking guidance on how to make the array include function recognized within my application.
In my tsconfig.json file, I have specified:
"lib": ["es6", "dom"],
The package.json file includes:
{
"name": "dashboards",
"version": "0.0.0",
"license": "MIT",
// other dependencies...
}
The polyfills.ts file contains:
import 'core-js/es6/array';
Despite referring to the ngx-charts demo and other examples, I haven't been able to pinpoint the reason behind this error.
Appreciate any help or insight on this matter.