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

series.kwArgs is undefined in charting/widget/Chart #303

Open
divido opened this issue Nov 16, 2018 · 1 comment
Open

series.kwArgs is undefined in charting/widget/Chart #303

divido opened this issue Nov 16, 2018 · 1 comment

Comments

@divido
Copy link

divido commented Nov 16, 2018

I believe this is a duplicate of https://bugs.dojotoolkit.org/ticket/19029

However, I wanted to add a few comments. (Sorry if this isn't the right forum for these comments).

First, I use programmatic style, and the bug exists there as well (not only declarative style, as the trac ticket suggests). Furthermore, the root of the cause was introduced by dojo 1.11, _base/lang.js. In there, the definition of "isArray" was altered to use the built in Array.isArray method instead of the old way that checked for "instanceof Array".

This new technique of checking for Arrays means that NodeLists are not considered arrays. When charting/widget/Chart.js's buildRendering() is invoked, it scans for data series using dojo/query. Later, it will "foldl" those elements. foldl (dojox/lang/functional/fold.js) does a different behavior for arrays vs. objects. As of v1.11, NodeLists (as returned by query) are considered objects. It therefore invokes the callback with 0 (the value of the length attribute). Chart does not expect this.

I'm using firefox 60.3 on Windows 7.

@jason0x43
Copy link
Member

Updating foldl to use lang.isArrayLike rather than lang.isArray looks like a possible fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants