Skip to content

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

@divido

Description

@divido

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions