You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chart.esm.js:7584 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'top')
at Legend.setDimensions (chart.esm.js:7584)
at Legend.update (chart.esm.js:7573)
at eval (chart.esm.js:3038)
at each (helpers.segment.js:224)
at Object.update (chart.esm.js:3035)
at Chart._updateLayout (chart.esm.js:5654)
at Chart.update (chart.esm.js:5636)
at Chart.eval (chart.esm.js:5390)
at Chart.eval [as _doResize] (helpers.segment.js:159)
at Chart._resize (chart.esm.js:5467)
at Chart.resize (chart.esm.js:5446)
at attached (chart.esm.js:5933)
at Chart.bindResponsiveEvents (chart.esm.js:5945)
at Chart.bindEvents (chart.esm.js:5889)
at Chart._initialize (chart.esm.js:5432)
at new Chart (chart.esm.js:5398)
at ChartjsModule.redraw (chartjsModule.js:222)
at eval (chart.js:321)
Possible Solution
downgrade or fix bug
Steps to Reproduce
Set Legend position to 'chartArea', as documented here
It comes from this pr: #9290 the margins are set in the first time it gets passed it but a second time for some reason it gets undefined passed. This breakes it since it cant read top and left from undefined.
Only workaround I can think of is checking is its unefined and if so dont update the margins but I think the issue should be solved in the place where it is getting made undefined
I have a possible fix in #9915. Items on the chart area don't have margins, but instead of sending undefined it now sends an object indicating that the margins are 0
Expected Behavior
Chart loaded with Legend drawn on chart area, see fiddle - version 3.3.0
Current Behavior
Chart is not loaded, error in console.
Error can be reproduced in this fiddle
Possible Solution
downgrade or fix bug
Steps to Reproduce
Set Legend position to 'chartArea', as documented here
Open fiddle fiddle
Context
I cannot use legend layout 'cartArea'
Environment
The text was updated successfully, but these errors were encountered: