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

Uncaught TypeError: Cannot read property 'height' of undefined #9278

Closed
lucapollani opened this issue Jun 17, 2021 · 0 comments · Fixed by #9290
Closed

Uncaught TypeError: Cannot read property 'height' of undefined #9278

lucapollani opened this issue Jun 17, 2021 · 0 comments · Fixed by #9290

Comments

@lucapollani
Copy link

lucapollani commented Jun 17, 2021

Expected Behavior

I should be able to add data dinamically to a pie chart with legend positioned on left position

Current Behavior

The issue occurs when the legend is at left position in a pie chart and the data is added dinamically.
The chart disappears and I'm not able to add new data to it.
I suppose the issue is related to the legend requiring to be split in a new column to be responsive.
In the provided example the issue happens adding the 11th element.

Update: I've noticed that removing options.layout.padding or setting an integer this behavior doesn't happen.

Uncaught TypeError: Cannot read property 'height' of undefined

y = cursor.y = _alignStartEnd(align, me.top + titleHeight + padding, me.bottom - columnSizes[cursor.line].height);

Steps to Reproduce

https://codesandbox.io/s/stoic-kalam-jxuu0?file=/index.html

Environment

  • Chart.js version: 3.3.2
  • Browser name and version: Chrome 91.0.4472.77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants