Opened 8 years ago

Closed 5 years ago

#10794 closed enhancement (wontfix)

[cla][patch]add tooltip to dojox gfx

Reported by: liyang Owned by: Eugene Lazutkin
Priority: high Milestone: future
Component: DojoX GFX Version: 1.4.0
Keywords: Cc: ruanqi@…, Eugene Lazutkin
Blocked By: Blocking:

Description (last modified by bill)

Tooltip is available in dijit but not in gfx, this patch adds tooltip support to gfx, so you can:

var rect = surface.createRect({x:0,y:0,width:100,height:100}).setFill("black");
rect.showTooltip("hello gfx tooltip");

Patch of source code and test case have been submitted to IBM internal issue tracker and shall be uploaded here soon by IBM committer.

Attachments (2)

gfx.tooltip.patch (2.7 KB) - added by Adam Peller 8 years ago.
patch from liyang (ibm, ccla)
gfx.tooltip-test.html (2.0 KB) - added by Adam Peller 8 years ago.
patch from liyang (ibm, ccla)

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by Adam Peller

It is my understanding that this functionality -- even tooltips with rich text -- is already available in Dojo 1.4, but I'm not sure if it's specific to charting.

Changed 8 years ago by Adam Peller

Attachment: gfx.tooltip.patch added

patch from liyang (ibm, ccla)

Changed 8 years ago by Adam Peller

Attachment: gfx.tooltip-test.html added

patch from liyang (ibm, ccla)

comment:2 Changed 8 years ago by bill

Cc: Eugene Lazutkin added

See #4721. There's already a dojox.charting.action2d.Tooltip which may be overlapping with this functionality. I'm not sure why #4721 is still open though...

comment:3 Changed 8 years ago by liyang

A general GFX tooltip will be appreciated, as besides charting, more widgets (like Map, Diagrammer) are being developed on top of GFX, and they all need tooltip. Better to have a general GFX tooltip first and let the higher level widgets to reuse it.

comment:4 Changed 8 years ago by bill

Description: modified (diff)

Makes sense to me. I was thinking that the charting tooltip could leverage the GFX tooltip, rather than vice-versa, since charts are made of GFX objects.

Although looking at the charting tooltip code not sure how much can be delegated to a GFX tooltip, maybe some of the aroundRect calculations.

comment:5 Changed 8 years ago by Adam Peller

It should also be noted that this code (both the proposed gfx patch and the existing charting code) has a dijit dependency, presumably on dijit css and js. Is this the only dijit dependency in these packages?

comment:6 Changed 8 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned
Summary: add tooltip to dojox gfx[cla][patch]add tooltip to dojox gfx

comment:7 Changed 5 years ago by bill

Resolution: wontfix
Status: assignedclosed

You can now use dijit tooltips against GFX objects, so no need for a separate widget in GFX. Actually I think at one point we did have a separate widget, but it's gone now.

Note: See TracTickets for help on using tickets.