Opened 10 years ago

Closed 8 years ago

#10505 closed defect (worksforme)

DojoX GFX - Actions not Extendable

Reported by: Mike Wilcox Owned by: Eugene Lazutkin
Priority: high Milestone: future
Component: Charting Version: 1.4.0
Keywords: Cc: cjolif
Blocked By: Blocking:

Description

In an attempt to make my own action and extend dojox.charting.action2d.Highlight, I ran into the problem that this code depends upon a closure. It can't be extended without copying over that entire closure.

After doing that, I found I can't use my custom Action with the Chart widget. It anticipates that all Actions will have a prefix of "dojox.charting", which the custom Action does not. I further can't patch this limitation because the attribute-action collection happens within a closure. The only recourse is to rewrite the entire widget.

Change History (3)

comment:1 Changed 10 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

Only short names are expected to be in dojox.charting. If it is not found there, it is assumed to be an absolute name, and used as is. If it doesn't work it is a bug. I'll look into that.

comment:2 Changed 8 years ago by cjolif

Cc: cjolif added

I do reproduce, when parsed from HTML the name of the action must be the short name and will look for the action in the action2d package. The workaround is easy: specify your custom action in Javascript not HTML tags.

Last edited 8 years ago by cjolif (previous) (diff)

comment:3 Changed 8 years ago by cjolif

Resolution: worksforme
Status: assignedclosed

Sorry I wrongly used the "name" attribute to specify my action instead of the "type" one. If I use type it works correctly.

Example that works perfectly:

<div dojoType="dojox.charting.widget.Chart" id="pieChart"
    theme="dojox.charting.themes.PlotKit.green"
    style="width: 500px;height: 500px">
      <div class="plot" name="default" type="dojox.charting.plot2d.Pie" 
  	     fontColor="black" labelOffset="-20"></div>
      <div class="series" name="January" array="pieData"></div>
      <div class="action" type="manual.MyAction"></div>
</div> 

Feel free to re-open the bug with an example that reproduces the issue if it is still here.

Note: See TracTickets for help on using tickets.