Error: Cannot read property 'getColor' of undefined - Stacked Area Chart
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here
I’m trying to display a Stacked Area Chart
<ngx-charts-bar-horizontal-stacked
[view]="[400, 300]"
[results]="results"
[xAxis]="true"
[yAxis]="true"
[legend]="true"
[legendPosition]="'below'"
[scheme]="colorScheme"
[xAxisLabel]="'Date'"
[yAxisLabel]="'Number'"
[showXAxisLabel]="true"
[showYAxisLabel]="true">
</ngx-charts-bar-horizontal-stacked>
Current behavior
In browser logs:
ERROR TypeError: Cannot read property 'getColor' of undefined
at Object.eval [as updateDirectives] (AreaSeriesComponent.html:6)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:39364)
at checkAndUpdateView (core.js:38376)
at callViewAction (core.js:38742)
at execComponentViewsAction (core.js:38670)
at checkAndUpdateView (core.js:38383)
at callViewAction (core.js:38742)
at execEmbeddedViewsAction (core.js:38699)
at checkAndUpdateView (core.js:38377)
at callViewAction (core.js:38742)
Expected behavior
Display the Stacked Area Chart in browser.
Please tell us about your environment:
- macOS Mojave: version 10.14.6
- Google Chrome: version 77.0.3865.90 (Official Build) (64-bit)
- @swimlane/ngx-charts: ^12.0.1
- Angular: 8.1.3
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:15 (1 by maintainers)
Top Results From Across the Web
ngx-charts-line-chart failing with Cannot read property ...
I'm setting up a simple example of the line chart and it fails with the getColor on undefined error. If I remove the...
Read more >Developers - Error: Cannot read property 'getColor' of undefined
Error : Cannot read property 'getColor' of undefined - Stacked Area Chart.
Read more >swimlane/ngx-charts - Gitter
... use a ngx-charts-line-chart and I am getting loads of errors in the console of this type. ERROR TypeError: Cannot read property 'getColor'...
Read more >Stack | Vega-Lite
null or false - No-stacking. This will produce layered bar and area chart. Default value: zero for plots with all of the following...
Read more >Uncaught TypeError: Cannot read property '_controlCorners'
Learned: console.log everything! Console.log of map variable revealed it was undefined. Needed to move control code down below where I ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’re seeing this as well using ngx-charts-line-chart and ngx-charts in version 11.2.0. The issue only appears in a production build, not in a dev build.
I believe this may be related to #1288. It appears the downgrade mentioned there fixes our issue.