Opened 10 years ago
Closed 10 years ago
#16009 closed defect (duplicate)
dojox/charting/widget/Chart doesn't properly use dojo/parser, data-dojo-*
Reported by: | dylan | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9 |
Component: | Charting | Version: | 1.8.0 |
Keywords: | Cc: | cjolif | |
Blocked By: | Blocking: |
Description
The source code for dojox/charting/widget/Chart doesn't seem to use the parser as expected, so properties defined inline cannot use data-dojo-* appropriately.
For example:
<div data-dojo-type="dojox/charting/widget/Chart" data-dojo-props="theme:dojox.charting.themes.Claro" id="viewsChart" style="width: 550px; height: 550px;">
<div class="plot" name="default" type="Pie" radius="200" fontColor="#000" labelOffset="-20"></div> <div class="series" name="Last Week's Visits" array="chartData"></div>
</div>
Notice that type, radius, array, etc. are specified as custom attributes. Any attempts I've made to embed them in data-dojo-props, etc. fails.
There is code in the chart widget like this: var name = node.getAttribute("name"), type = node.getAttribute("type");
Which shows that while it's inheriting from _WidgetBase, it's not actually using it effectively.
Also, theme names do not work with MIDs, and instead must use the older dot-separate syntax.